summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-05-09 00:02:00 +0200
committerGünther Deschner <gd@samba.org>2009-05-09 00:02:00 +0200
commit705f36b804093f656498f7963768a418672cd422 (patch)
treec7d985dd687ea2afe7ccbc212e6b61429f63e5af /source3
parentd0100947002a892dff22aefd2491e3a66aaf3a07 (diff)
downloadsamba-705f36b804093f656498f7963768a418672cd422.tar.gz
samba-705f36b804093f656498f7963768a418672cd422.tar.bz2
samba-705f36b804093f656498f7963768a418672cd422.zip
s3-samr: Fix SetUserInfo level 7 when there has been no name change.
Found by torture test. Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_samr_nt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 0d87ad84ae..17e111d4ea 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -4013,6 +4013,12 @@ static NTSTATUS set_user_info_7(TALLOC_CTX *mem_ctx,
code (like UNSUCCESSFUL instead of ALREADY_EXISTS). */
rc = can_create(mem_ctx, id7->account_name.string);
+
+ /* when there is nothing to change, we're done here */
+ if (NT_STATUS_EQUAL(rc, NT_STATUS_USER_EXISTS) &&
+ strequal(id7->account_name.string, pdb_get_username(pwd))) {
+ return NT_STATUS_OK;
+ }
if (!NT_STATUS_IS_OK(rc)) {
return rc;
}