mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 01:53:37 +00:00
ntdll: Fix RtlValidSecurityDescriptor() return value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
b62abc1a2c
commit
5a3fd972f4
|
@ -1105,7 +1105,10 @@ BOOL WINAPI InitializeSecurityDescriptor( PSECURITY_DESCRIPTOR descr, DWORD revi
|
|||
*/
|
||||
BOOL WINAPI IsValidSecurityDescriptor( PSECURITY_DESCRIPTOR descr )
|
||||
{
|
||||
return set_ntstatus( RtlValidSecurityDescriptor( descr ));
|
||||
if (!RtlValidSecurityDescriptor( descr ))
|
||||
return set_ntstatus(STATUS_INVALID_SECURITY_DESCR);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
@ -534,25 +534,11 @@ NTSTATUS WINAPI RtlCopySecurityDescriptor(PSECURITY_DESCRIPTOR pSourceSD, PSECUR
|
|||
|
||||
/**************************************************************************
|
||||
* RtlValidSecurityDescriptor [NTDLL.@]
|
||||
*
|
||||
* Determine if a SECURITY_DESCRIPTOR is valid.
|
||||
*
|
||||
* PARAMS
|
||||
* SecurityDescriptor [I] Descriptor to check.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: STATUS_SUCCESS.
|
||||
* Failure: STATUS_INVALID_SECURITY_DESCR or STATUS_UNKNOWN_REVISION.
|
||||
*/
|
||||
NTSTATUS WINAPI RtlValidSecurityDescriptor(
|
||||
PSECURITY_DESCRIPTOR SecurityDescriptor)
|
||||
BOOLEAN WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR descriptor)
|
||||
{
|
||||
if ( ! SecurityDescriptor )
|
||||
return STATUS_INVALID_SECURITY_DESCR;
|
||||
if ( ((SECURITY_DESCRIPTOR*)SecurityDescriptor)->Revision != SECURITY_DESCRIPTOR_REVISION )
|
||||
return STATUS_UNKNOWN_REVISION;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
SECURITY_DESCRIPTOR *sd = descriptor;
|
||||
return sd && sd->Revision == SECURITY_DESCRIPTOR_REVISION;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -4763,7 +4763,7 @@ NTSYSAPI void WINAPI RtlUpperString(STRING *,const STRING *);
|
|||
NTSYSAPI void WINAPI RtlUserThreadStart(PRTL_THREAD_START_ROUTINE,void*);
|
||||
NTSYSAPI BOOLEAN WINAPI RtlValidAcl(PACL);
|
||||
NTSYSAPI BOOLEAN WINAPI RtlValidRelativeSecurityDescriptor(PSECURITY_DESCRIPTOR,ULONG,SECURITY_INFORMATION);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
|
||||
NTSYSAPI BOOLEAN WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
|
||||
NTSYSAPI BOOLEAN WINAPI RtlValidSid(PSID);
|
||||
NTSYSAPI BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW*,DWORD,DWORDLONG);
|
||||
|
|
Loading…
Reference in a new issue