summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-08-24 12:49:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:48 -0500
commit6717e0d467bea50cb7712e6b5278ddb403fdf828 (patch)
tree87ebd387c2ea0bcfe755523f199c81f09b9c91fd /source3
parent8cac7c139908eff0124a4a6f9d25f3b3fe10a254 (diff)
downloadsamba-6717e0d467bea50cb7712e6b5278ddb403fdf828.tar.gz
samba-6717e0d467bea50cb7712e6b5278ddb403fdf828.tar.bz2
samba-6717e0d467bea50cb7712e6b5278ddb403fdf828.zip
r17797: Just say "ok" when trying to rename a local group to its same name.
(This used to be commit e6e54125003373f83e6900668ceb9981e8620776)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_samr_nt.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 31e434cbfb..67fa7f283c 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -4612,7 +4612,7 @@ NTSTATUS _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_
switch (ctr->level) {
case 2:
{
- fstring group_name;
+ fstring group_name, acct_name;
NTSTATUS status;
/* We currently do not support renaming groups in the
@@ -4624,12 +4624,19 @@ NTSTATUS _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_
return NT_STATUS_SPECIAL_ACCOUNT;
}
- /* There has to be a valid name */
+ /* There has to be a valid name (and it has to be different) */
+
if ( !ctr->alias.info2.name.string )
return NT_STATUS_INVALID_PARAMETER;
- unistr2_to_ascii( info.acct_name, ctr->alias.info2.name.string,
- sizeof(info.acct_name)-1 );
+ unistr2_to_ascii( acct_name, ctr->alias.info2.name.string,
+ sizeof(acct_name)-1 );
+
+ /* If the name is the same just reply "ok". Yes this
+ doesn't allow you to change the case of a group name. */
+
+ if ( strequal( acct_name, info.acct_name ) )
+ return NT_STATUS_OK;
/* make sure the name doesn't already exist as a user
or local group */