diff options
author | Sebastien Tricaud <toady@gscore.org> | 2004-11-16 14:27:40 +0000 |
---|---|---|
committer | Sebastien Tricaud <toady@gscore.org> | 2004-11-16 14:27:40 +0000 |
commit | 6d6eebcafec81d696b621d8453b13d55a1f9be1d (patch) | |
tree | 441c3d1fc820ffa2d83b3e1cd592715a3724d0ed /modules/pam_access/pam_access.c | |
parent | f135e2b8bca4998e100d412690e493dfff90dbbd (diff) | |
download | pam-6d6eebcafec81d696b621d8453b13d55a1f9be1d.tar.gz pam-6d6eebcafec81d696b621d8453b13d55a1f9be1d.tar.bz2 pam-6d6eebcafec81d696b621d8453b13d55a1f9be1d.zip |
Applied debian patches
Diffstat (limited to 'modules/pam_access/pam_access.c')
-rw-r--r-- | modules/pam_access/pam_access.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c index 42e03527..4f6cf574 100644 --- a/modules/pam_access/pam_access.c +++ b/modules/pam_access/pam_access.c @@ -194,10 +194,11 @@ login_access (pam_handle_t *pamh, struct login_info *item) line[end] = 0; /* strip trailing whitespace */ if (line[0] == 0) /* skip blank lines */ continue; + + /* Allow trailing: in last field fo froms */ if (!(perm = strtok(line, fs)) || !(users = strtok((char *) 0, fs)) - || !(froms = strtok((char *) 0, fs)) - || strtok((char *) 0, fs)) { + || !(froms = strtok((char *) 0, fs))) { _log_err("%s: line %d: bad field count", item->config_file, lineno); continue; @@ -438,10 +439,12 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh,int flags,int argc return PAM_ABORT; } } - if (strncmp("/dev/",from,5) == 0) { /* strip leading /dev/ */ - from += 5; - } + if (from[0] == '/') { /* full path */ + from++; + from = strchr(from, '/'); + from++; + } } if ((user_pw=_pammodutil_getpwnam(pamh, user))==NULL) return (PAM_USER_UNKNOWN); |