From 2624e7ee723e4ad4e516331d3511c616dea2d419 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 25 Jul 1994 22:32:30 +0000 Subject: [PATCH] be_root/be_user is now down in sudo_realpath() --- logging.c | 6 ------ sudo.c | 3 --- 2 files changed, 9 deletions(-) diff --git a/logging.c b/logging.c index 536399654..2e723f579 100644 --- a/logging.c +++ b/logging.c @@ -375,17 +375,11 @@ static void send_mail() (void) bzero((char *)(&action), sizeof(action)); #endif /* POSIX_SIGNALS */ - /* become root for find_path() */ - be_root(); - if ((mailer = find_path(mailer)) == NULL) { (void) fprintf(stderr, "%s: mailer (%s) not found\n", Argv[0], mailer); exit(1); } - /* relinquish root */ - be_user(); - /* catch children as they die */ #ifdef POSIX_SIGNALS action.sa_handler = reapchild; diff --git a/sudo.c b/sudo.c index 4e4469798..073fbfed7 100644 --- a/sudo.c +++ b/sudo.c @@ -294,10 +294,7 @@ static void load_globals() cmnd = "validate"; } else { strncpy(path, Argv[1], MAXPATHLEN)[MAXPATHLEN] = 0; - /* become root for find_path() only */ - be_root(); cmnd = find_path(path); /* get the absolute path */ - be_user(); if (cmnd == NULL) { (void) fprintf(stderr, "%s: %s: command not found\n", Argv[0], Argv[1]); exit(1); -- 2.40.0