From: Todd C. Miller Date: Sat, 28 Mar 2009 13:07:17 +0000 (+0000) Subject: Rename find_alias -> alias_find for consistency. X-Git-Tag: SUDO_1_7_1~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0656629980ed58705d739e877f0e2096897e1382;p=sudo Rename find_alias -> alias_find for consistency. --- diff --git a/alias.c b/alias.c index bba35dbed..8b8b29e06 100644 --- a/alias.c +++ b/alias.c @@ -88,7 +88,7 @@ alias_compare(v1, v2) * Returns a pointer to the alias structure or NULL if not found. */ struct alias * -find_alias(name, type) +alias_find(name, type) char *name; int type; { diff --git a/match.c b/match.c index 97d5aa547..3f6a4d966 100644 --- a/match.c +++ b/match.c @@ -133,7 +133,7 @@ _userlist_matches(pw, list) matched = !m->negated; break; case ALIAS: - if ((a = find_alias(m->name, USERALIAS)) != NULL) { + if ((a = alias_find(m->name, USERALIAS)) != NULL) { rval = _userlist_matches(pw, &a->members); if (rval != UNSPEC) matched = m->negated ? !rval : rval; @@ -196,7 +196,7 @@ _runaslist_matches(user_list, group_list) matched = !m->negated; break; case ALIAS: - if ((a = find_alias(m->name, RUNASALIAS)) != NULL) { + if ((a = alias_find(m->name, RUNASALIAS)) != NULL) { rval = _runaslist_matches(&a->members, &empty); if (rval != UNSPEC) matched = m->negated ? !rval : rval; @@ -220,7 +220,7 @@ _runaslist_matches(user_list, group_list) matched = !m->negated; break; case ALIAS: - if ((a = find_alias(m->name, RUNASALIAS)) != NULL) { + if ((a = alias_find(m->name, RUNASALIAS)) != NULL) { rval = _runaslist_matches(&a->members, &empty); if (rval != UNSPEC) matched = m->negated ? !rval : rval; @@ -276,7 +276,7 @@ _hostlist_matches(list) matched = !m->negated; break; case ALIAS: - if ((a = find_alias(m->name, HOSTALIAS)) != NULL) { + if ((a = alias_find(m->name, HOSTALIAS)) != NULL) { rval = _hostlist_matches(&a->members); if (rval != UNSPEC) matched = m->negated ? !rval : rval; @@ -349,7 +349,7 @@ cmnd_matches(m) break; case ALIAS: alias_seqno++; - if ((a = find_alias(m->name, CMNDALIAS)) != NULL) { + if ((a = alias_find(m->name, CMNDALIAS)) != NULL) { rval = _cmndlist_matches(&a->members); if (rval != UNSPEC) matched = m->negated ? !rval : rval; diff --git a/parse.c b/parse.c index 1e2f21c3a..d0b4cf124 100644 --- a/parse.c +++ b/parse.c @@ -639,7 +639,7 @@ _print_member(lbuf, name, type, negated, alias_type) } break; case ALIAS: - if ((a = find_alias(name, alias_type)) != NULL) { + if ((a = alias_find(name, alias_type)) != NULL) { tq_foreach_fwd(&a->members, m) { if (m != tq_first(&a->members)) lbuf_append(lbuf, ", ", NULL); diff --git a/parse.h b/parse.h index 3149eccfa..010f0b36f 100644 --- a/parse.h +++ b/parse.h @@ -181,7 +181,7 @@ int userlist_matches __P((struct passwd *, struct member_list *)); int usergr_matches __P((char *, char *, struct passwd *)); int userpw_matches __P((char *, char *, struct passwd *)); int group_matches __P((char *, struct group *)); -struct alias *find_alias __P((char *, int)); +struct alias *alias_find __P((char *, int)); void alias_apply __P((int (*)(void *, void *), void *)); void init_aliases __P((void)); void init_parser __P((char *, int)); diff --git a/visudo.c b/visudo.c index d67e992a0..a80ab2b25 100644 --- a/visudo.c +++ b/visudo.c @@ -943,7 +943,7 @@ alias_remove_recursive(name, type) struct alias *a; alias_seqno++; - if ((a = find_alias(name, type)) != NULL) { + if ((a = alias_find(name, type)) != NULL) { tq_foreach_fwd(&a->members, m) { if (m->type == ALIAS) { alias_remove_recursive(m->name, type); @@ -973,7 +973,7 @@ check_aliases(strict) tq_foreach_fwd(&us->users, m) { if (m->type == ALIAS) { alias_seqno++; - if (find_alias(m->name, USERALIAS) == NULL) { + if (alias_find(m->name, USERALIAS) == NULL) { warningx("%s: User_Alias `%s' referenced but not defined", strict ? "Error" : "Warning", m->name); error++; @@ -984,7 +984,7 @@ check_aliases(strict) tq_foreach_fwd(&priv->hostlist, m) { if (m->type == ALIAS) { alias_seqno++; - if (find_alias(m->name, HOSTALIAS) == NULL) { + if (alias_find(m->name, HOSTALIAS) == NULL) { warningx("%s: Host_Alias `%s' referenced but not defined", strict ? "Error" : "Warning", m->name); error++; @@ -995,7 +995,7 @@ check_aliases(strict) tq_foreach_fwd(&cs->runasuserlist, m) { if (m->type == ALIAS) { alias_seqno++; - if (find_alias(m->name, RUNASALIAS) == NULL) { + if (alias_find(m->name, RUNASALIAS) == NULL) { warningx("%s: Runas_Alias `%s' referenced but not defined", strict ? "Error" : "Warning", m->name); error++; @@ -1004,7 +1004,7 @@ check_aliases(strict) } if ((m = cs->cmnd)->type == ALIAS) { alias_seqno++; - if (find_alias(m->name, CMNDALIAS) == NULL) { + if (alias_find(m->name, CMNDALIAS) == NULL) { warningx("%s: Cmnd_Alias `%s' referenced but not defined", strict ? "Error" : "Warning", m->name); error++;