]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: http://bugs.debian.org/439268
authorThorsten Kukuk <kukuk@thkukuk.de>
Thu, 25 Sep 2008 11:53:02 +0000 (11:53 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Thu, 25 Sep 2008 11:53:02 +0000 (11:53 +0000)
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.

ChangeLog
modules/pam_mail/pam_mail.8.xml
modules/pam_mail/pam_mail.c

index 4f12970ef40050c3053ae4abc5b8b0a922e376b8..395188c359c198d8c1824bfe6f996e0bac499641 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
 2008-09-23  Tomas Mraz <t8m@centrum.cz>
 
        * modules/pam_limits/limits.conf.5.xml: Comment that rss limit is
index a6dff87007f62730059bbe585e9d4f31a5aa5fa1..3015145dae2ff70c7d765022a4879c64c9aa8656 100644 (file)
@@ -40,7 +40,7 @@
        nopen
       </arg>
       <arg choice="opt">
-       quit
+       quiet
       </arg>
       <arg choice="opt">
        standard
index 46395b53175b6ae1015fe35ffd8371607e5b4074..a5473605533ef68cd71372f150ff06418ed0ebb5 100644 (file)
@@ -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;