]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: 533668
authorJan Rekorajski <baggins@sith.mimuw.edu.pl>
Tue, 7 May 2002 17:26:40 +0000 (17:26 +0000)
committerJan Rekorajski <baggins@sith.mimuw.edu.pl>
Tue, 7 May 2002 17:26:40 +0000 (17:26 +0000)
Purpose of commit: cleanup

Commit summary:
---------------
put not so interesting log messages under debug arg

CHANGELOG
modules/pam_limits/pam_limits.c

index 6d14d69f25f4b90e0d07eb4dcc631a973636451e..4948535b86ed6f950ff61f560e1b58de2c243653 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -55,6 +55,8 @@ bug report - outstanding bugs are listed here:
 0.76: please submit patches for this section with actual code/doc
       patches!
 
+* pam_limits: put not so interesting log messages under debug arg
+  (Bug 533668 - baggins)
 * pam_access: added the 'fieldsep=' argument (Bug 547051 - agmorgan),
   made a PAM_RHOST of "" equivalent to NULL (Bug 547521 - agmorgan).
 * pam_limits: keep well know behaviour of maxlogins default ('*') limit
index 841b1a371e3cc78792ff5e7940f4220856e72539..71727f51e50b1a3148525ea8a205addfd56a116d 100644 (file)
@@ -505,8 +505,10 @@ static int parse_config_file(const char *uname, int ctrl,
             if (strcmp(uname, domain) == 0) /* this user have a limit */
                 process_limit(LIMITS_DEF_USER, ltype, item, value, ctrl, pl);
             else if (domain[0]=='@') {
-               _pam_log(LOG_DEBUG, "checking if %s is in group %s",
-                        uname, domain + 1);
+                   if (ctrl & PAM_DEBUG_ARG) {
+                       _pam_log(LOG_DEBUG, "checking if %s is in group %s",
+                               uname, domain + 1);
+                   }
                 if (is_in_group(uname, domain+1))
                     process_limit(LIMITS_DEF_GROUP, ltype, item, value, ctrl,
                                  pl);
@@ -515,12 +517,16 @@ static int parse_config_file(const char *uname, int ctrl,
                              pl);
        } else if (i == 2 && ltype[0] == '-') { /* Probably a no-limit line */
            if (strcmp(uname, domain) == 0) {
-               _pam_log(LOG_DEBUG, "no limits for '%s'", uname);
+               if (ctrl & PAM_DEBUG_ARG) {
+                   _pam_log(LOG_DEBUG, "no limits for '%s'", uname);
+               }
                fclose(fil);
                return PAM_IGNORE;
            } else if (domain[0] == '@' && is_in_group(uname, domain+1)) {
-               _pam_log(LOG_DEBUG, "no limits for '%s' in group '%s'",
-                        uname, domain+1);
+               if (ctrl & PAM_DEBUG_ARG) {
+                   _pam_log(LOG_DEBUG, "no limits for '%s' in group '%s'",
+                            uname, domain+1);
+               }
                fclose(fil);
                return PAM_IGNORE;
            }