r22096: become_root_uid_only() is unneeded - it's only used in
[jra/samba/.git] / source3 / lib / util_sec.c
index 3d997ee76accd2c38b3ea691f1ef56fb0e9e83a4..189920869750cc7e515be4c4bd9dbca335290e7a 100644 (file)
@@ -265,7 +265,7 @@ void save_re_uid(void)
  and restore them!
 ****************************************************************************/
 
-static void restore_re_uid_fromroot(void)
+void restore_re_uid_fromroot(void)
 {
 #if USE_SETRESUID
        setresuid(saved_ruid, saved_euid, -1);
@@ -291,28 +291,6 @@ void restore_re_uid(void)
        restore_re_uid_fromroot();
 }
 
-/****************************************************************************
- Lightweight become root - no group change.
-****************************************************************************/
-
-void become_root_uid_only(void)
-{
-       save_re_uid();
-       set_effective_uid(0);
-}
-
-/****************************************************************************
- Lightweight unbecome root - no group change. Expects we are root already,
- saves errno across call boundary.
-****************************************************************************/
-
-void unbecome_root_uid_only(void)
-{
-       int saved_errno = errno;
-       restore_re_uid_fromroot();
-       errno = saved_errno;
-}
-
 /****************************************************************************
  save the real and effective gid for later restoration. Used by the 
  getgroups code