From 3dc7717878d28aa4c1ee3e8dc2ef987c14b269bc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 24 Jul 2002 05:01:49 +0000 Subject: 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 used to be commit 83360b211a7e834306d3e549c18bc41576534417) --- source3/smbd/uid.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index a18f62c9cc..2dcef54a5b 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -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 -- cgit