]> granicus.if.org Git - sudo/commitdiff
be_* -> setperms()
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 8 Nov 1994 01:40:27 +0000 (01:40 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 8 Nov 1994 01:40:27 +0000 (01:40 +0000)
sudo_realpath.c

index 6724ccb617320765f0bdf01b35eb55914f7ed1c8..deef352bf18b515711853dd8a5b4567757d9ef8d 100644 (file)
@@ -102,7 +102,7 @@ char * sudo_realpath(old, new)
     (void) strncpy(new, old, MAXPATHLEN);
 
     /* we need to be root for this section */
-    be_root();
+    set_perms(PERM_ROOT);
 
     /*
      * Resolve the last component of the path if it is a link
@@ -200,7 +200,7 @@ static void realpath_restore(cwd)
     char * cwd;
 {
     /* relinquish root privs and chdir to where we started... */
-    be_user();
+    set_perms(PERM_USER);
     if (chdir(cwd)) {
        fprintf(stderr, "Error: cannot change dir back to %s, sudo aborting!\n",
                        cwd);