=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/match.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/sudo/Attic/match.c 2009/06/21 14:48:42 1.3 --- src/usr.bin/sudo/Attic/match.c 2009/12/07 18:43:10 1.4 *************** *** 94,100 **** #endif /* USING_NONUNIX_GROUPS */ #ifndef lint ! __unused static const char rcsid[] = "$Sudo: match.c,v 1.46 2009/05/27 00:49:07 millert Exp $"; #endif /* lint */ static struct member_list empty; --- 94,100 ---- #endif /* USING_NONUNIX_GROUPS */ #ifndef lint ! __unused static const char rcsid[] = "$Sudo: match.c,v 1.48 2009/11/23 15:56:14 millert Exp $"; #endif /* lint */ static struct member_list empty; *************** *** 318,331 **** struct member_list *list; { struct member *m; ! int rval, matched = UNSPEC; tq_foreach_rev(list, m) { ! rval = cmnd_matches(m); ! if (rval != UNSPEC) { ! matched = m->negated ? !rval : rval; break; - } } return(matched); } --- 318,329 ---- struct member_list *list; { struct member *m; ! int matched = UNSPEC; tq_foreach_rev(list, m) { ! matched = cmnd_matches(m); ! if (matched != UNSPEC) break; } return(matched); } *************** *** 580,587 **** if (dirp == NULL) return(FALSE); ! if (strlcpy(buf, sudoers_dir, sizeof(buf)) >= sizeof(buf)) return(FALSE); while ((dent = readdir(dirp)) != NULL) { /* ignore paths > PATH_MAX (XXX - log) */ buf[dlen] = '\0'; --- 578,587 ---- if (dirp == NULL) return(FALSE); ! if (strlcpy(buf, sudoers_dir, sizeof(buf)) >= sizeof(buf)) { ! closedir(dirp); return(FALSE); + } while ((dent = readdir(dirp)) != NULL) { /* ignore paths > PATH_MAX (XXX - log) */ buf[dlen] = '\0';