diff options
author | Volker Lendecke <vlendec@samba.org> | 2002-09-23 16:21:01 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2002-09-23 16:21:01 +0000 |
commit | 06ce201a29bb90a428a59a3d85752ccf2dca1bdd (patch) | |
tree | d9d5b595b3e2dfa5ce5dd04685c39c5e22763474 /source3/utils | |
parent | 83ca90a67dd3db225706d32ffe58b114e1faf7d3 (diff) | |
download | samba-06ce201a29bb90a428a59a3d85752ccf2dca1bdd.tar.gz samba-06ce201a29bb90a428a59a3d85752ccf2dca1bdd.tar.bz2 samba-06ce201a29bb90a428a59a3d85752ccf2dca1bdd.zip |
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)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 */ |