Skip to content

Commit

Permalink
pam_login_access: Fix negative entry matching logic
Browse files Browse the repository at this point in the history
PR:		252194
Approved by:	so
Security:	CVE-2020-25580
Security:	FreeBSD-SA-21:03.pam_login_access

(cherry picked from commit 6ab923c)
(cherry picked from commit c99e3e2)
  • Loading branch information
markjdb authored and amotin committed Feb 25, 2021
1 parent 4c18bc7 commit b80a270
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/libpam/modules/pam_login_access/login_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ list_match(char *list, const char *item,
if (match != NO) {
while ((tok = strtok((char *) 0, listsep)) && strcmp(tok, "EXCEPT")) {
/* VOID */ ;
if (tok == NULL || list_match((char *) 0, item, match_fn,
login_access_opts) == NO) {
}
if (tok == NULL ||
list_match((char *) 0, item, match_fn, login_access_opts) == NO) {
return (match);
}
}
}
return (NO);
Expand Down

0 comments on commit b80a270

Please sign in to comment.