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:
parent
6c52a37ac1
commit
ee4ae0e7ad
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user