summaryrefslogtreecommitdiff
path: root/modules/pam_mail/pam_mail.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_mail/pam_mail.c')
-rw-r--r--modules/pam_mail/pam_mail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_mail/pam_mail.c b/modules/pam_mail/pam_mail.c
index 6cd173b4..2c4b641a 100644
--- a/modules/pam_mail/pam_mail.c
+++ b/modules/pam_mail/pam_mail.c
@@ -474,7 +474,7 @@ static int _do_mail(pam_handle_t *pamh, int flags, int argc,
}
/* Delete environment variable? */
- if (!est)
+ if ( ! est && ! (ctrl & PAM_NO_ENV) )
(void) pam_putenv(pamh, MAIL_ENV_NAME);
_pam_overwrite(folder); /* clean up */