Author: ekohl
Date: Sat Jul 27 17:59:28 2013
New Revision: 59589
URL:
http://svn.reactos.org/svn/reactos?rev=59589&view=rev
Log:
[SAMSRV]
SamrCreateUserInDomain and SamrCreateUser2InDomain: Implement the user name length limit
of 20 characters.
Modified:
trunk/reactos/dll/win32/samsrv/samrpc.c
Modified: trunk/reactos/dll/win32/samsrv/samrpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samrpc.c?…
==============================================================================
--- trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] Sat Jul 27 17:59:28 2013
@@ -2126,6 +2126,12 @@
{
TRACE("failed with status 0x%08lx\n", Status);
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 */
@@ -8091,6 +8097,12 @@
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);