[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Warning from pam_listfile



I found that pam_listfile log the warning "Non-sense use for apply= parameter"
on every authentication based on username.
The patch below fix the problem: warning should be logged only
if apply parameter is used in conjunction with authentication based on user or
group name.

					Andrey V.
					Savochkin


diff -ru Linux-PAM-0.56.orig/modules/pam_listfile/pam_listfile.c Linux-PAM-0.56/modules/pam_listfile/pam_listfile.c
--- Linux-PAM-0.56.orig/modules/pam_listfile/pam_listfile.c	Sat Feb 15 20:30:22 1997
+++ Linux-PAM-0.56/modules/pam_listfile/pam_listfile.c	Fri Feb 28 19:53:59 1997
@@ -247,13 +247,15 @@
      }
      
      /* Check if it makes sense to use the apply= parameter */
-     if((citem==PAM_USER) || (citem==PAM_RUSER)) {
-       _pam_log(LOG_WARNING,"Non-sense use for apply= parameter");
-       apply_type=APPLY_TYPE_NULL;
-     }
-     if(extitem && (extitem==EI_GROUP)) {
-       _pam_log(LOG_WARNING,"Non-sense use for apply= parameter");
-       apply_type=APPLY_TYPE_NULL;
+     if(apply_type!=APPLY_TYPE_NULL) {
+       if((citem==PAM_USER) || (citem==PAM_RUSER)) {
+         _pam_log(LOG_WARNING,"Non-sense use for apply= parameter");
+         apply_type=APPLY_TYPE_NULL;
+       }
+       if(extitem && (extitem==EI_GROUP)) {
+         _pam_log(LOG_WARNING,"Non-sense use for apply= parameter");
+         apply_type=APPLY_TYPE_NULL;
+       }
      }
      
      /* Short-circuit - test if this session apply for this user */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []