From: Todd C. Miller Date: Sun, 1 Aug 1999 15:42:12 +0000 (+0000) Subject: rename validate() to the more descriptive sudoers_lookup() X-Git-Tag: SUDO_1_6_0~177 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b3909c780202c3f04e1a8e3b2038580342d674c;p=sudo rename validate() to the more descriptive sudoers_lookup() --- diff --git a/parse.c b/parse.c index 2f88462fa..005958b5e 100644 --- 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 d2469fa7b..f43162b2e 100644 --- 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 6a1ed7d26..645fa8e1d 100644 --- 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 *));