1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

s3-samr: Fix SetUserInfo level 7 when there has been no name change.

Found by torture test.

Guenther
This commit is contained in:
Günther Deschner 2009-05-09 00:02:00 +02:00
parent d010094700
commit 705f36b804

View File

@ -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;
}