1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

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>
This commit is contained in:
Andrew Tridgell 2010-03-05 17:49:11 +11:00
parent 6c52a37ac1
commit ee4ae0e7ad

View File

@ -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;
}