mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[SAMSRV]
SamrCreateUserInDomain and SamrCreateUser2InDomain: Implement the user name length limit of 20 characters. svn path=/trunk/; revision=59589
This commit is contained in:
parent
d3e871ccdf
commit
b466c46646
1 changed files with 12 additions and 0 deletions
|
@ -2128,6 +2128,12 @@ SamrCreateUserInDomain(IN SAMPR_HANDLE DomainHandle,
|
|||
return Status;
|
||||
}
|
||||
|
||||
if (Name->Length > 20 * sizeof(WCHAR))
|
||||
{
|
||||
TRACE("User name is too long!\n");
|
||||
return STATUS_INVALID_ACCOUNT_NAME;
|
||||
}
|
||||
|
||||
/* Check if the user name already exists in the domain */
|
||||
Status = SampCheckAccountNameInDomain(DomainObject,
|
||||
Name->Buffer);
|
||||
|
@ -8091,6 +8097,12 @@ SamrCreateUser2InDomain(IN SAMPR_HANDLE DomainHandle,
|
|||
return Status;
|
||||
}
|
||||
|
||||
if (Name->Length > 20 * sizeof(WCHAR))
|
||||
{
|
||||
TRACE("User name is too long!\n");
|
||||
return STATUS_INVALID_ACCOUNT_NAME;
|
||||
}
|
||||
|
||||
/* Check if the user name already exists in the domain */
|
||||
Status = SampCheckAccountNameInDomain(DomainObject,
|
||||
Name->Buffer);
|
||||
|
|
Loading…
Reference in a new issue