From 51f6bfea3be59139b4a8b6376efe53eb78ad0abf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 11 Aug 2006 18:09:59 +0000 Subject: r17496: net groupmap add could add uninitialized sid_name_type entries to the group mapping db. Ensure this can't happen. Jeremy. (This used to be commit 2ba0d93d53868c8b28dccf91dfa26e86817da511) --- source3/utils/net_groupmap.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'source3/utils/net_groupmap.c') diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c index 86bec385e7..b95e8c65e4 100644 --- a/source3/utils/net_groupmap.c +++ b/source3/utils/net_groupmap.c @@ -188,7 +188,14 @@ static int net_groupmap_add(int argc, const char **argv) uint32 rid = 0; int i; GROUP_MAP map; - + const char *name_type; + + ZERO_STRUCT(map); + + /* Default is domain group. */ + map.sid_name_use = SID_NAME_DOM_GRP; + name_type = "domain group"; + /* get the options */ for ( i=0; i