now set uid to that of SUDOERS_OWNER while parsing sudoers file

This commit is contained in:
Todd C. Miller
1995-03-30 04:03:49 +00:00
parent b6b88fea98
commit 8e89a08f2c

View File

@@ -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)