Author: ekohl
Date: Mon Oct 21 10:25:21 2013
New Revision: 60728
URL:
http://svn.reactos.org/svn/reactos?rev=60728&view=rev
Log:
[SAMSRV]
- SampSetupCreateUserAccount, SamrCreateUserInDomain and SamrCreateUser2InDomain: Set the
PrivateData attribute.
- SamrGetAliasMembership: Remove a superfluous call to SampRegCloseKey.
- SampQueryUserAll and SampSetUserAll: Disable access to the SecDesc attribute as long as
it is not set upon user account creation.
Modified:
trunk/reactos/dll/win32/samsrv/samrpc.c
trunk/reactos/dll/win32/samsrv/setup.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] Mon Oct 21 10:25:21 2013
@@ -2469,6 +2469,16 @@
goto done;
}
+ /* Set the PrivateData attribute */
+ Status = SampSetObjectAttributeString(UserObject,
+ L"PrivateData",
+ NULL);
+ if (!NT_SUCCESS(Status))
+ {
+ TRACE("failed with status 0x%08lx\n", Status);
+ goto done;
+ }
+
/* FIXME: Set SecDesc attribute*/
if (NT_SUCCESS(Status))
@@ -3191,7 +3201,6 @@
}
done:
- SampRegCloseKey(&MembersKeyHandle);
SampRegCloseKey(&MembersKeyHandle);
SampRegCloseKey(&AliasesKeyHandle);
@@ -6810,6 +6819,7 @@
if (InfoBuffer->All.WhichFields & USER_ALL_SECURITYDESCRIPTOR)
{
+#if 0
Length = 0;
SampGetObjectAttribute(UserObject,
L"SecDesc",
@@ -6836,6 +6846,7 @@
if (!NT_SUCCESS(Status))
goto done;
}
+#endif
}
*Buffer = InfoBuffer;
@@ -7607,11 +7618,13 @@
if (WhichFields & USER_ALL_SECURITYDESCRIPTOR)
{
+#if 0
Status = SampSetObjectAttribute(UserObject,
L"SecDesc",
REG_BINARY,
Buffer->All.SecurityDescriptor.SecurityDescriptor,
Buffer->All.SecurityDescriptor.Length);
+#endif
}
if (WriteFixedData == TRUE)
@@ -8786,6 +8799,16 @@
goto done;
}
+ /* Set the PrivateData attribute */
+ Status = SampSetObjectAttributeString(UserObject,
+ L"PrivateData",
+ NULL);
+ if (!NT_SUCCESS(Status))
+ {
+ TRACE("failed with status 0x%08lx\n", Status);
+ goto done;
+ }
+
/* FIXME: Set SecDesc attribute*/
if (NT_SUCCESS(Status))
Modified: trunk/reactos/dll/win32/samsrv/setup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/setup.c?r…
==============================================================================
--- trunk/reactos/dll/win32/samsrv/setup.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/setup.c [iso-8859-1] Mon Oct 21 10:25:21 2013
@@ -509,6 +509,16 @@
0);
if (!NT_SUCCESS(Status))
goto done;
+
+ /* Set PrivateData attribute*/
+ Status = SampRegSetValue(hAccountKey,
+ L"PrivateData",
+ REG_SZ,
+ (LPVOID)lpEmptyString,
+ sizeof(WCHAR));
+ if (!NT_SUCCESS(Status))
+ goto done;
+
/* FIXME: Set SecDesc attribute*/