diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2001-03-29 04:21:16 +0000 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2001-03-29 04:21:16 +0000 |
commit | 688f3612e1c9b3a1524bd826a2a7d2546156808f (patch) | |
tree | 6bbdff4c016c7266371591501c41db4a51cc36de /modules/pam_limits/pam_limits.c | |
parent | a7181f94c8d5e7f42938b7fa6133589608760f2c (diff) | |
download | pam-688f3612e1c9b3a1524bd826a2a7d2546156808f.tar.gz pam-688f3612e1c9b3a1524bd826a2a7d2546156808f.tar.bz2 pam-688f3612e1c9b3a1524bd826a2a7d2546156808f.zip |
Relevant BUGIDs: 404953
Purpose of commit: bugfix
Commit summary:
---------------
The syntax "<domain> -" was not recognized.
Diffstat (limited to 'modules/pam_limits/pam_limits.c')
-rw-r--r-- | modules/pam_limits/pam_limits.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c index 34d76bf5..7a5ec472 100644 --- a/modules/pam_limits/pam_limits.c +++ b/modules/pam_limits/pam_limits.c @@ -452,6 +452,9 @@ static int parse_config_file(const char *uname, int ctrl, memset(value, 0, sizeof(value)); i = sscanf(buf,"%s%s%s%s", domain, ltype, item, value); + D(("scanned line[%d]: domain[%s], ltype[%s], item[%s], value[%s]", + i, domain, ltype, item, value)); + for(j=0; j < strlen(domain); j++) domain[j]=tolower(domain[j]); for(j=0; j < strlen(ltype); j++) @@ -483,7 +486,7 @@ static int parse_config_file(const char *uname, int ctrl, return PAM_IGNORE; } } else { - _pam_log(LOG_DEBUG,"invalid line '%s'", buf); + _pam_log(LOG_DEBUG,"invalid line '%s' - skipped", buf); } } fclose(fil); @@ -563,6 +566,10 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, } retval = parse_config_file(pwd->pw_name, ctrl, &pl); + if (retval == PAM_IGNORE) { + D(("the configuration file has an applicable '<domain> -' entry")); + return PAM_SUCCESS; + } if (retval != PAM_SUCCESS) { _pam_log(LOG_WARNING, "error parsing the configuration file"); return PAM_IGNORE; |