rename validate() to the more descriptive sudoers_lookup()
This commit is contained in:
6
parse.c
6
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;
|
||||
|
2
sudo.c
2
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:
|
||||
|
4
sudo.h
4
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 *));
|
||||
|
Reference in New Issue
Block a user