summaryrefslogtreecommitdiff
path: root/source3/lib/util_sec.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-05 23:56:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:11 -0500
commitbc45c82904e268327bfbf72cd3f35699ae6e7397 (patch)
tree1ff4f7e3d1befc81659a01f1dedf72756ff020a6 /source3/lib/util_sec.c
parent90dc2613153bb8c865a1cfda0318ae4db3cf212e (diff)
downloadsamba-bc45c82904e268327bfbf72cd3f35699ae6e7397.tar.gz
samba-bc45c82904e268327bfbf72cd3f35699ae6e7397.tar.bz2
samba-bc45c82904e268327bfbf72cd3f35699ae6e7397.zip
r22096: become_root_uid_only() is unneeded - it's only used in
messages.c. Refactor to use become_root() instead and make it local to messages.c Jeremy. (This used to be commit f3ffb3f98472b69b476b702dfe5c0575b32da018)
Diffstat (limited to 'source3/lib/util_sec.c')
-rw-r--r--source3/lib/util_sec.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c
index 3d997ee76a..1899208697 100644
--- a/source3/lib/util_sec.c
+++ b/source3/lib/util_sec.c
@@ -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);
@@ -292,28 +292,6 @@ void restore_re_uid(void)
}
/****************************************************************************
- 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
****************************************************************************/