mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 09:14:59 +02:00
don't set $MAIL if UsePam=yes
PAM typically specifies the user environment if it's enabled, so don't second guess. bz#2937; ok dtucker@
This commit is contained in:
parent
03e92dd27d
commit
2ff2e19653
@ -1050,8 +1050,11 @@ do_setup_env(struct ssh *ssh, Session *s, const char *shell)
|
||||
# endif /* HAVE_CYGWIN */
|
||||
#endif /* HAVE_LOGIN_CAP */
|
||||
|
||||
snprintf(buf, sizeof buf, "%.200s/%.50s", _PATH_MAILDIR, pw->pw_name);
|
||||
child_set_env(&env, &envsize, "MAIL", buf);
|
||||
if (!options.use_pam) {
|
||||
snprintf(buf, sizeof buf, "%.200s/%.50s",
|
||||
_PATH_MAILDIR, pw->pw_name);
|
||||
child_set_env(&env, &envsize, "MAIL", buf);
|
||||
}
|
||||
|
||||
/* Normal systems set SHELL by default. */
|
||||
child_set_env(&env, &envsize, "SHELL", shell);
|
||||
|
Loading…
x
Reference in New Issue
Block a user