]> granicus.if.org Git - sudo/commitdiff
rename validate() to the more descriptive sudoers_lookup()
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 1 Aug 1999 15:42:12 +0000 (15:42 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 1 Aug 1999 15:42:12 +0000 (15:42 +0000)
parse.c
sudo.c
sudo.h

diff --git a/parse.c b/parse.c
index 2f88462fa9966ed58fddab21c06dc8f594add7d2..005958b5ed7e005b8a47fdead9968e1c3ddfbb78 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -107,11 +107,11 @@ static int has_meta       __P((char *));
        void init_parser        __P((void));
 
 /*
- * This routine is called from the sudo.c module and tries to validate
- * the user, host and command triplet.
+ * Look up the user in the sudoers file and check to see if they are
+ * allowed to run the specified command on this host as the target user.
  */
 int
-validate(check_cmnd)
+sudoers_lookup(check_cmnd)
     int check_cmnd;
 {
     int return_code;
diff --git a/sudo.c b/sudo.c
index d2469fa7b3f941a3e9a63bdde9bcbea89674bde7..f43162b2ef03e5481974f9d62da971cc54bff4d5 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -263,7 +263,7 @@ main(argc, argv)
     add_env(!(sudo_mode & MODE_SHELL));        /* add in SUDO_* envariables */
 
     /* Validate the user but don't search for pseudo-commands. */
-    validated = validate((sudo_mode != MODE_VALIDATE && sudo_mode != MODE_LIST));
+    validated = sudoers_lookup((sudo_mode != MODE_VALIDATE && sudo_mode != MODE_LIST));
 
     switch (validated) {
        case VALIDATE_OK:
diff --git a/sudo.h b/sudo.h
index 6a1ed7d2624dc04ebdfa826dd6b8cfd99589dfbc..645fa8e1d0ec5acb2cfa64ccaf1f9b3cd43253ce 100644 (file)
--- a/sudo.h
+++ b/sudo.h
@@ -58,7 +58,7 @@ struct sudo_user {
 };
 
 /*
- * Return values for validate()
+ * Return values for sudoers_lookup()
  * Also arguments for log_auth()
  */
 #define VALIDATE_OK              0x00
@@ -150,7 +150,7 @@ char *tgetpass              __P((const char *, int, int));
 int find_path          __P((char *, char **));
 void check_user                __P((void));
 void verify_user       __P((void));
-int validate           __P((int));
+int sudoers_lookup     __P((int));
 void set_perms         __P((int, int));
 void remove_timestamp  __P((int));
 int check_secureware   __P((char *));