Unset PAM environment variables if not set

This commit is contained in:
Roy Marples 2009-05-07 12:20:59 +01:00
parent cc5e43922e
commit b2eb9f8a83

View File

@ -1156,6 +1156,8 @@ start_stop_daemon(int argc, char **argv)
/* Don't add strings unless they set a var */ /* Don't add strings unless they set a var */
if (strchr(*pamenv, '=')) if (strchr(*pamenv, '='))
putenv(xstrdup(*pamenv)); putenv(xstrdup(*pamenv));
else
unsetenv(*pamenv);
pamenv++; pamenv++;
} }
} }