summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-07-24 05:01:49 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-07-24 05:01:49 +0000
commit3dc7717878d28aa4c1ee3e8dc2ef987c14b269bc (patch)
tree296458a62ab3134ac2bc8fcfbc145fbf450e00f2 /source3/smbd
parentfc6ae0994d6038f5b292007fe508af0c892a6f7f (diff)
downloadsamba-3dc7717878d28aa4c1ee3e8dc2ef987c14b269bc.tar.gz
samba-3dc7717878d28aa4c1ee3e8dc2ef987c14b269bc.tar.bz2
samba-3dc7717878d28aa4c1ee3e8dc2ef987c14b269bc.zip
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)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/uid.c6
1 files changed, 5 insertions, 1 deletions
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