summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/utils/smbgroupedit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/utils/smbgroupedit.c b/source3/utils/smbgroupedit.c
index ffaacca102..4e192ed43d 100644
--- a/source3/utils/smbgroupedit.c
+++ b/source3/utils/smbgroupedit.c
@@ -97,7 +97,7 @@ int addgroup(char *group, enum SID_NAME_USE sid_type, char *ntgroup, char *ntcom
/*********************************************************
Change a group.
**********************************************************/
-int changegroup(char *sid_string, char *group, enum SID_NAME_USE sid_type, char *groupdesc, char *privilege)
+int changegroup(char *sid_string, char *group, enum SID_NAME_USE sid_type, char *ntgroup, char *groupdesc, char *privilege)
{
DOM_SID sid;
GROUP_MAP map;
@@ -131,6 +131,9 @@ int changegroup(char *sid_string, char *group, enum SID_NAME_USE sid_type, char
map.sid_name_use=sid_type;
+ if (ntgroup!=NULL)
+ fstrcpy(map.nt_name, ntgroup);
+
/* Change comment if new one */
if (groupdesc!=NULL)
fstrcpy(map.comment, groupdesc);
@@ -332,7 +335,7 @@ int main (int argc, char **argv)
return deletegroup(group);
if (change_group) {
- return changegroup(sid, group, sid_type, group_desc, privilege);
+ return changegroup(sid, group, sid_type, ntgroup, group_desc, privilege);
}
usage();