aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_env
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_env')
-rw-r--r--modules/pam_env/pam_env.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.c
index 592bc4b8..b4cb5477 100644
--- a/modules/pam_env/pam_env.c
+++ b/modules/pam_env/pam_env.c
@@ -673,6 +673,13 @@ _expand_arg(pam_handle_t *pamh, char **value)
const char *orig=*value;
struct string_buffer buf;
+ /*
+ * Return early if there are no special characters present in the value.
+ */
+ if ((*value)[strcspn(*value, "\\$@")] == '\0') {
+ return PAM_SUCCESS;
+ }
+
_strbuf_init(&buf);
/*