1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

We must be root to access the passdb, so ensure all calls to local_lookup_sid()

have become_root()/unbecome_root() wrappers.

(this should be the last of them, the rest were done ages ago).

Andrew Bartlett
This commit is contained in:
Andrew Bartlett -
parent e09c4bd69a
commit 83360b211a

View File

@ -599,7 +599,11 @@ BOOL sid_to_uid(DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype)
/* if we know its local then don't try winbindd */
if (sid_compare_domain(get_global_sam_sid(), psid) == 0) {
return local_sid_to_uid(puid, psid, sidtype);
BOOL result;
become_root();
result = local_sid_to_uid(puid, psid, sidtype);
unbecome_root();
return result;
}
/* (tridge) I commented out the slab of code below in order to support foreign SIDs