diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2024-01-11 20:25:22 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2024-01-12 17:01:04 +0000 |
commit | 47661a8eda337f23baf12d3bf6a479fc738be73f (patch) | |
tree | 947ef3af093b4ff806a47423451689eb3d4f58eb /modules/pam_env/pam_env.c | |
parent | d9494352c571d332cf92bdadcd898894f0af12df (diff) | |
download | pam-47661a8eda337f23baf12d3bf6a479fc738be73f.tar.gz pam-47661a8eda337f23baf12d3bf6a479fc738be73f.tar.bz2 pam-47661a8eda337f23baf12d3bf6a479fc738be73f.zip |
pam_env: allow escaping of escape character
Otherwise it is not possible to add \ into an environment variable.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Diffstat (limited to 'modules/pam_env/pam_env.c')
-rw-r--r-- | modules/pam_env/pam_env.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.c index 5819ed07..778c5345 100644 --- a/modules/pam_env/pam_env.c +++ b/modules/pam_env/pam_env.c @@ -607,7 +607,7 @@ _expand_arg(pam_handle_t *pamh, char **value) while (*orig) { /* while there is some input to deal with */ if ('\\' == *orig) { ++orig; - if ('$' != *orig && '@' != *orig) { + if ('$' != *orig && '@' != *orig && '\\' != *orig) { D(("Unrecognized escaped character: <%c> - ignoring", *orig)); pam_syslog(pamh, LOG_ERR, "Unrecognized escaped character: <%c> - ignoring", |