diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2008-09-25 11:53:02 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2008-09-25 11:53:02 +0000 |
commit | 3022b9383b52422482fcf5104b6d56b8e598cbeb (patch) | |
tree | f86457afc6c7477afd203171c4ce9acda0a6e288 /modules | |
parent | 075f2898e48a008cf36092b83b9621bc077d9f5a (diff) | |
download | pam-3022b9383b52422482fcf5104b6d56b8e598cbeb.tar.gz pam-3022b9383b52422482fcf5104b6d56b8e598cbeb.tar.bz2 pam-3022b9383b52422482fcf5104b6d56b8e598cbeb.zip |
Relevant BUGIDs: http://bugs.debian.org/439268
Purpose of commit: bugfix
Commit summary:
---------------
2008-09-25 Thorsten Kukuk <kukuk@thkukuk.de>
* modules/pam_mail/pam_mail.c (report_mail): Fix logic of
"quiet" option (Patch from Andreas Henriksson <andreas@fatal.se>)
* modules/pam_mail/pam_mail.8.xml: Fix typo.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/pam_mail/pam_mail.8.xml | 2 | ||||
-rw-r--r-- | modules/pam_mail/pam_mail.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/pam_mail/pam_mail.8.xml b/modules/pam_mail/pam_mail.8.xml index a6dff870..3015145d 100644 --- a/modules/pam_mail/pam_mail.8.xml +++ b/modules/pam_mail/pam_mail.8.xml @@ -40,7 +40,7 @@ nopen </arg> <arg choice="opt"> - quit + quiet </arg> <arg choice="opt"> standard diff --git a/modules/pam_mail/pam_mail.c b/modules/pam_mail/pam_mail.c index 46395b53..a5473605 100644 --- a/modules/pam_mail/pam_mail.c +++ b/modules/pam_mail/pam_mail.c @@ -303,8 +303,13 @@ report_mail(pam_handle_t *pamh, int ctrl, int type, const char *folder) { int retval; - if (!(ctrl & PAM_MAIL_SILENT) || - ((ctrl & PAM_QUIET_MAIL) && type == HAVE_NEW_MAIL)) + if ((ctrl & PAM_MAIL_SILENT) || + ((ctrl & PAM_QUIET_MAIL) && type != HAVE_NEW_MAIL)) + { + D(("keeping quiet")); + retval = PAM_SUCCESS; + } + else { if (ctrl & PAM_STANDARD_MAIL) switch (type) @@ -345,11 +350,6 @@ report_mail(pam_handle_t *pamh, int ctrl, int type, const char *folder) break; } } - else - { - D(("keeping quiet")); - retval = PAM_SUCCESS; - } D(("returning %s", pam_strerror(pamh, retval))); return retval; |