rename validate() to the more descriptive sudoers_lookup()

This commit is contained in:
Todd C. Miller
1999-08-01 15:42:12 +00:00
parent ef4302501f
commit 6b3909c780
3 changed files with 6 additions and 6 deletions

View File

@@ -107,11 +107,11 @@ static int has_meta __P((char *));
void init_parser __P((void)); void init_parser __P((void));
/* /*
* This routine is called from the sudo.c module and tries to validate * Look up the user in the sudoers file and check to see if they are
* the user, host and command triplet. * allowed to run the specified command on this host as the target user.
*/ */
int int
validate(check_cmnd) sudoers_lookup(check_cmnd)
int check_cmnd; int check_cmnd;
{ {
int return_code; int return_code;

2
sudo.c
View File

@@ -263,7 +263,7 @@ main(argc, argv)
add_env(!(sudo_mode & MODE_SHELL)); /* add in SUDO_* envariables */ add_env(!(sudo_mode & MODE_SHELL)); /* add in SUDO_* envariables */
/* Validate the user but don't search for pseudo-commands. */ /* 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) { switch (validated) {
case VALIDATE_OK: case VALIDATE_OK:

4
sudo.h
View File

@@ -58,7 +58,7 @@ struct sudo_user {
}; };
/* /*
* Return values for validate() * Return values for sudoers_lookup()
* Also arguments for log_auth() * Also arguments for log_auth()
*/ */
#define VALIDATE_OK 0x00 #define VALIDATE_OK 0x00
@@ -150,7 +150,7 @@ char *tgetpass __P((const char *, int, int));
int find_path __P((char *, char **)); int find_path __P((char *, char **));
void check_user __P((void)); void check_user __P((void));
void verify_user __P((void)); void verify_user __P((void));
int validate __P((int)); int sudoers_lookup __P((int));
void set_perms __P((int, int)); void set_perms __P((int, int));
void remove_timestamp __P((int)); void remove_timestamp __P((int));
int check_secureware __P((char *)); int check_secureware __P((char *));