mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 20:56:04 +00:00
[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. svn path=/trunk/; revision=60728
This commit is contained in:
parent
e64f2a9675
commit
89f9c12117
2 changed files with 34 additions and 1 deletions
|
@ -2469,6 +2469,16 @@ SamrCreateUserInDomain(IN SAMPR_HANDLE DomainHandle,
|
||||||
goto done;
|
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*/
|
/* FIXME: Set SecDesc attribute*/
|
||||||
|
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
|
@ -3191,7 +3201,6 @@ TRACE("Open %S\n", MemberSidString);
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
SampRegCloseKey(&MembersKeyHandle);
|
|
||||||
SampRegCloseKey(&MembersKeyHandle);
|
SampRegCloseKey(&MembersKeyHandle);
|
||||||
SampRegCloseKey(&AliasesKeyHandle);
|
SampRegCloseKey(&AliasesKeyHandle);
|
||||||
|
|
||||||
|
@ -6810,6 +6819,7 @@ SampQueryUserAll(PSAM_DB_OBJECT UserObject,
|
||||||
|
|
||||||
if (InfoBuffer->All.WhichFields & USER_ALL_SECURITYDESCRIPTOR)
|
if (InfoBuffer->All.WhichFields & USER_ALL_SECURITYDESCRIPTOR)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
Length = 0;
|
Length = 0;
|
||||||
SampGetObjectAttribute(UserObject,
|
SampGetObjectAttribute(UserObject,
|
||||||
L"SecDesc",
|
L"SecDesc",
|
||||||
|
@ -6836,6 +6846,7 @@ SampQueryUserAll(PSAM_DB_OBJECT UserObject,
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
*Buffer = InfoBuffer;
|
*Buffer = InfoBuffer;
|
||||||
|
@ -7607,11 +7618,13 @@ SampSetUserAll(PSAM_DB_OBJECT UserObject,
|
||||||
|
|
||||||
if (WhichFields & USER_ALL_SECURITYDESCRIPTOR)
|
if (WhichFields & USER_ALL_SECURITYDESCRIPTOR)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
Status = SampSetObjectAttribute(UserObject,
|
Status = SampSetObjectAttribute(UserObject,
|
||||||
L"SecDesc",
|
L"SecDesc",
|
||||||
REG_BINARY,
|
REG_BINARY,
|
||||||
Buffer->All.SecurityDescriptor.SecurityDescriptor,
|
Buffer->All.SecurityDescriptor.SecurityDescriptor,
|
||||||
Buffer->All.SecurityDescriptor.Length);
|
Buffer->All.SecurityDescriptor.Length);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WriteFixedData == TRUE)
|
if (WriteFixedData == TRUE)
|
||||||
|
@ -8786,6 +8799,16 @@ SamrCreateUser2InDomain(IN SAMPR_HANDLE DomainHandle,
|
||||||
goto done;
|
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*/
|
/* FIXME: Set SecDesc attribute*/
|
||||||
|
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
|
|
|
@ -510,6 +510,16 @@ SampSetupCreateUserAccount(HANDLE hDomainKey,
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto done;
|
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*/
|
/* FIXME: Set SecDesc attribute*/
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue