1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
if MAIL_CHECK_ENAB is disabled, then don't export the MAIL envvar
--- libmisc/setupenv.c
+++ libmisc/setupenv.c
@@ -265,16 +265,18 @@
* knows the prefix.
*/
- if ((cp = getdef_str ("MAIL_DIR")))
- addenv_path ("MAIL", cp, info->pw_name);
- else if ((cp = getdef_str ("MAIL_FILE")))
- addenv_path ("MAIL", info->pw_dir, cp);
- else {
+ if (getdef_bool ("MAIL_CHECK_ENAB")) {
+ if ((cp = getdef_str ("MAIL_DIR")))
+ addenv_path ("MAIL", cp, info->pw_name);
+ else if ((cp = getdef_str ("MAIL_FILE")))
+ addenv_path ("MAIL", info->pw_dir, cp);
+ else {
#if defined(MAIL_SPOOL_FILE)
- addenv_path ("MAIL", info->pw_dir, MAIL_SPOOL_FILE);
+ addenv_path ("MAIL", info->pw_dir, MAIL_SPOOL_FILE);
#elif defined(MAIL_SPOOL_DIR)
- addenv_path ("MAIL", MAIL_SPOOL_DIR, info->pw_name);
+ addenv_path ("MAIL", MAIL_SPOOL_DIR, info->pw_name);
#endif
+ }
}
/*
|