now set uid to that of SUDOERS_OWNER while parsing sudoers file
This commit is contained in:
7
parse.c
7
parse.c
@@ -85,8 +85,8 @@ int validate()
|
||||
FILE *sudoers_fp;
|
||||
int i, return_code;
|
||||
|
||||
/* become root */
|
||||
set_perms(PERM_ROOT);
|
||||
/* become sudoers file owner */
|
||||
set_perms(PERM_SUDOERS);
|
||||
|
||||
if ((sudoers_fp = fopen(_PATH_SUDO_SUDOERS, "r")) == NULL) {
|
||||
perror(_PATH_SUDO_SUDOERS);
|
||||
@@ -103,7 +103,8 @@ int validate()
|
||||
*/
|
||||
(void) fclose(sudoers_fp);
|
||||
|
||||
/* relinquish root */
|
||||
/* relinquish extra privs */
|
||||
set_perms(PERM_ROOT);
|
||||
set_perms(PERM_USER);
|
||||
|
||||
if (return_code || parse_error)
|
||||
|
Reference in New Issue
Block a user