version 1.3, 2009/06/21 14:48:42 |
version 1.4, 2009/12/07 18:43:10 |
|
|
#endif /* USING_NONUNIX_GROUPS */ |
#endif /* USING_NONUNIX_GROUPS */ |
|
|
#ifndef lint |
#ifndef lint |
__unused static const char rcsid[] = "$Sudo: match.c,v 1.46 2009/05/27 00:49:07 millert Exp $"; |
__unused static const char rcsid[] = "$Sudo: match.c,v 1.48 2009/11/23 15:56:14 millert Exp $"; |
#endif /* lint */ |
#endif /* lint */ |
|
|
static struct member_list empty; |
static struct member_list empty; |
|
|
struct member_list *list; |
struct member_list *list; |
{ |
{ |
struct member *m; |
struct member *m; |
int rval, matched = UNSPEC; |
int matched = UNSPEC; |
|
|
tq_foreach_rev(list, m) { |
tq_foreach_rev(list, m) { |
rval = cmnd_matches(m); |
matched = cmnd_matches(m); |
if (rval != UNSPEC) { |
if (matched != UNSPEC) |
matched = m->negated ? !rval : rval; |
|
break; |
break; |
} |
|
} |
} |
return(matched); |
return(matched); |
} |
} |
|
|
if (dirp == NULL) |
if (dirp == NULL) |
return(FALSE); |
return(FALSE); |
|
|
if (strlcpy(buf, sudoers_dir, sizeof(buf)) >= sizeof(buf)) |
if (strlcpy(buf, sudoers_dir, sizeof(buf)) >= sizeof(buf)) { |
|
closedir(dirp); |
return(FALSE); |
return(FALSE); |
|
} |
while ((dent = readdir(dirp)) != NULL) { |
while ((dent = readdir(dirp)) != NULL) { |
/* ignore paths > PATH_MAX (XXX - log) */ |
/* ignore paths > PATH_MAX (XXX - log) */ |
buf[dlen] = '\0'; |
buf[dlen] = '\0'; |