| Summary: | Unable to disable $MAIL setting. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | sergio <sergio+it> | ||||||
| Component: | sshd | Assignee: | Damien Miller <djm> | ||||||
| Status: | CLOSED FIXED | ||||||||
| Severity: | major | CC: | ahmedsayeed1982, djm, dtucker | ||||||
| Priority: | P5 | ||||||||
| Version: | 7.9p1 | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 2915 | ||||||||
| Attachments: |
|
||||||||
|
Description
sergio
2018-11-30 23:11:26 AEDT
MAIL is set implicitly by sshd, it being one of the environment traditionally established by login(1). It might make sense to have sshd skip this when PAM is in use, as that part of the session setup is usually delegated to a PAM module. Created attachment 3210 [details]
Don't set $MAIL is PAM is in use
Comment on attachment 3210 [details] Don't set $MAIL is PAM is in use No that skips it when PAM is compiled in. To skip it when PAM is in use you need to also test options.use_pam: >+#ifndef USE_PAM if (!options.use_pam) { > snprintf(buf, sizeof buf, "%.200s/%.50s", _PATH_MAILDIR, pw->pw_name); > child_set_env(&env, &envsize, "MAIL", buf); } >+#endif with that change ok dtucker. Created attachment 3239 [details]
check use_pam instead of preprocessor
w/ Darren's feedback
This has been committed and will be in the OpenSSH 8.0 release. Closing all resolved bug with release of openssh-8.2 [spam removed] |