]> granicus.if.org Git - sudo/commitdiff
Rename find_alias -> alias_find for consistency.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 Mar 2009 13:07:17 +0000 (13:07 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 Mar 2009 13:07:17 +0000 (13:07 +0000)
alias.c
match.c
parse.c
parse.h
visudo.c

diff --git a/alias.c b/alias.c
index bba35dbeddde1b61b3a7a6d4acf4b0783729b5ac..8b8b29e0623def8a283db384f46235514aef57f9 100644 (file)
--- 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 97d5aa547f5415edaf17ace9611cae0d815db65c..3f6a4d966f49d03c714879faac9b842b24d705d7 100644 (file)
--- 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 1e2f21c3a7f94b8a40848b8406a3e8d0bea5e543..d0b4cf124ffc82865772aa928a93452f32618b6d 100644 (file)
--- 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 3149eccfab53377a005191cb21d746210170c466..010f0b36f543db7763e2a263ec049f1217d612c8 100644 (file)
--- 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));
index d67e992a0a14210089fcd3c672d610110b9b2eee..a80ab2b25be70aa5786692ac879146d2e1224604 100644 (file)
--- 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++;