diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-03-05 17:49:11 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-03-05 23:07:31 +1100 |
commit | ee4ae0e7add840e1702b5630e6d23be19833a612 (patch) | |
tree | 2b7d92729a72855c31aec8385e287c909a585739 /lib | |
parent | 6c52a37ac191679245a1175f40ef961af3b3e0b1 (diff) | |
download | samba-ee4ae0e7add840e1702b5630e6d23be19833a612.tar.gz samba-ee4ae0e7add840e1702b5630e6d23be19833a612.tar.bz2 samba-ee4ae0e7add840e1702b5630e6d23be19833a612.zip |
s4-privs: add root_privileges_original_uid()
This can be used to get the uid we changed away from when we gained
root privileges
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util/unix_privs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/util/unix_privs.c b/lib/util/unix_privs.c index b30b2f5163..9aa9a45918 100644 --- a/lib/util/unix_privs.c +++ b/lib/util/unix_privs.c @@ -85,3 +85,9 @@ void *root_privileges(void) talloc_set_destructor(s, privileges_destructor); return s; } + +uid_t root_privileges_original_uid(void *s) +{ + struct saved_state *saved = talloc_get_type_abort(s, struct saved_state); + return saved->uid; +} |