summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2001-07-09 18:15:28 +0000
committerJean-François Micouleau <jfm@samba.org>2001-07-09 18:15:28 +0000
commit647a680b00f8fc36a2282d774c4a6104fef8a01b (patch)
tree6436e32c7f643f7dd06deef80d5cd72b419827fe
parent282d295a376cff8f1d038ff7fc129f2f91cba6b8 (diff)
downloadsamba-647a680b00f8fc36a2282d774c4a6104fef8a01b.tar.gz
samba-647a680b00f8fc36a2282d774c4a6104fef8a01b.tar.bz2
samba-647a680b00f8fc36a2282d774c4a6104fef8a01b.zip
allow to rename an NT group
(This used to be commit 42fc4f4154ccf2e93322da6b0b234f8f846991dc)
-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();