pdb_ldap may require ROOT privilages to access the group mapping. (yes, it's ugly :-)
authorAndrew Bartlett <abartlet@samba.org>
Thu, 27 Mar 2003 22:01:22 +0000 (22:01 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 27 Mar 2003 22:01:22 +0000 (22:01 +0000)
Andrew Bartlett
(This used to be commit 12579a62945d0d475b53c4ab49761a01be9e8394)

source3/smbd/uid.c

index 6ac3528b1a20a6255127fa4c8c23e7596532ad6d..b9cf0de3bd6bc29281929034511d22f48f0d7833 100644 (file)
@@ -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);