summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-03 00:00:43 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-03 00:00:43 +0000
commite101224d831904f35303682c095e0c6aef8de5df (patch)
treecf6d9d91ef5b1e4371e80c4da41c09821e12ef04
parent633ee99afa1f25fcd16796bedec571471f3617ca (diff)
downloadsamba-e101224d831904f35303682c095e0c6aef8de5df.tar.gz
samba-e101224d831904f35303682c095e0c6aef8de5df.tar.bz2
samba-e101224d831904f35303682c095e0c6aef8de5df.zip
init group db before use
this fixes the smbpasswd segvs (This used to be commit d2bcdfd995b9562872d865e723b23ed84247a73f)
-rw-r--r--source3/groupdb/mapping.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index 32a5286408..a0f6148e90 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -180,6 +180,8 @@ BOOL add_mapping_entry(GROUP_MAP *map, int flag)
int len;
int i;
PRIVILEGE_SET *set;
+
+ init_group_mapping();
sid_to_string(string_sid, &map->sid);
@@ -489,6 +491,8 @@ BOOL get_group_map_from_sid(DOM_SID sid, GROUP_MAP *map)
int i;
PRIVILEGE_SET *set;
+ init_group_mapping();
+
/* the key is the SID, retrieving is direct */
sid_to_string(string_sid, &sid);
@@ -543,6 +547,8 @@ BOOL get_group_map_from_gid(gid_t gid, GROUP_MAP *map)
int i;
PRIVILEGE_SET *set;
+ init_group_mapping();
+
/* we need to enumerate the TDB to find the GID */
for (kbuf = tdb_firstkey(tdb);
@@ -600,6 +606,8 @@ BOOL get_group_map_from_ntname(char *name, GROUP_MAP *map)
int i;
PRIVILEGE_SET *set;
+ init_group_mapping();
+
/* we need to enumerate the TDB to find the name */
for (kbuf = tdb_firstkey(tdb);
@@ -655,6 +663,8 @@ BOOL group_map_remove(DOM_SID sid)
pstring key;
fstring string_sid;
+ init_group_mapping();
+
/* the key is the SID, retrieving is direct */
sid_to_string(string_sid, &sid);
@@ -691,6 +701,8 @@ BOOL enum_group_mapping(enum SID_NAME_USE sid_name_use, GROUP_MAP **rmap,
int i;
PRIVILEGE_SET *set;
+ init_group_mapping();
+
*num_entries=0;
*rmap=NULL;