From 06ce201a29bb90a428a59a3d85752ccf2dca1bdd Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 23 Sep 2002 16:21:01 +0000 Subject: Ok, getting a bit more ambitious. Stop me, if this is wrong. ;-) When creating a group you have to take care of the fact that the underlying unix might not like the group name. This change gets around that problem by giving the add group script the chance to invent a group name. It then must only return the newly created numerical gid. Volker (This used to be commit b959419ed38e66a12b63cad3e5fbfa849f952acc) --- source3/utils/net_rpc_samsync.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 9d54a771fc..95a813dcfd 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -323,14 +323,15 @@ fetch_group_info(uint32 rid, SAM_GROUP_INFO *delta) fstring sid_string; GROUP_MAP map; int flag = TDB_INSERT; + gid_t gid; unistr2_to_ascii(name, &delta->uni_grp_name, sizeof(name)-1); unistr2_to_ascii(comment, &delta->uni_grp_desc, sizeof(comment)-1); if ((grp = getgrnam(name)) == NULL) - smb_create_group(name); + smb_create_group(name, &gid); - if ((grp = getgrnam(name)) == NULL) + if ((grp = getgrgid(gid)) == NULL) return NT_STATUS_ACCESS_DENIED; /* add the group to the mapping table */ -- cgit