On 03/11/2016 12:21 PM, Jakub Hrozek wrote:
On Thu, Mar 10, 2016 at 09:10:30PM +0200, Nikolai Kondrashov wrote:
On 03/04/2016 12:54 PM, Jakub Hrozek wrote:
I was even wondering if it wasn't easiest to always set the original shell as a PAM env variable if a shell is overriden? If we did that, we could just use the existing options to override the shell either globally for all users or using the local overrides. If we don't want to set the env variable always, we could special-case tlog-rec, but I'm not a big fan of special-casing..
I too would prefer to have an env variable set always than have a special case. I.e. it would require setting TLOG_REC_CONF_TEXT to:
{"shell": "ACTUAL_JSON_ESCAPED_USER_SHELL"}As an alternative I can add support for a TLOG_REC_SHELL variable which value wouldn't need escaping. Perhaps I'll do that in any case as it can be useful for others.
Is the escaping easy to do or would it require a dependency?
It's easy to do. It's similar to C string escaping with minor differences. See http://json.org/
Nick