summaryrefslogtreecommitdiff
path: root/source3/smbd/uid.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/uid.c')
-rw-r--r--source3/smbd/uid.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 6ac3528b1a..b9cf0de3bd 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -781,7 +781,9 @@ DOM_SID *gid_to_sid(DOM_SID *psid, gid_t gid)
}
/* Make sure we report failure, (when psid == NULL) */
+ become_root();
psid = local_gid_to_sid(psid, gid);
+ unbecome_root();
DEBUG(10,("gid_to_sid: local %u -> %s\n", (unsigned int)gid, sid_to_string(sid, psid)));
if (psid)
store_gid_sid_cache(psid, SID_NAME_DOM_GRP, gid);