From 47661a8eda337f23baf12d3bf6a479fc738be73f Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Thu, 11 Jan 2024 20:25:22 +0100 Subject: pam_env: allow escaping of escape character Otherwise it is not possible to add \ into an environment variable. Signed-off-by: Tobias Stoeckmann --- modules/pam_env/pam_env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/pam_env/pam_env.c') 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", -- cgit v1.2.3