tags 439268 + patch
thanks

The attached patch fixes the problem for me. HTH, HAND.

--
Regards,
Andreas Henriksson
Make quiet option of pam_mail work. Fixes http://bugs.debian.org/439268

Author: Andreas Henriksson <[EMAIL PROTECTED]>
Upstream status: N/A

diff -uri pam-1.0.1/modules/pam_mail/pam_mail.c pam-1.0.1-quiet/modules/pam_mail/pam_mail.c
--- pam-1.0.1/modules/pam_mail/pam_mail.c	2007-04-30 12:56:24.000000000 +0200
+++ pam-1.0.1-quiet/modules/pam_mail/pam_mail.c	2008-08-22 11:11:07.000000000 +0200
@@ -303,8 +303,13 @@
 {
     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 @@
 	      break;
 	    }
       }
-    else
-      {
-	D(("keeping quiet"));
-	retval = PAM_SUCCESS;
-      }
 
     D(("returning %s", pam_strerror(pamh, retval)));
     return retval;

Reply via email to