mirror of
https://github.com/samba-team/samba.git
synced 2025-11-18 00:23:50 +03:00
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 commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user