mirror of
https://github.com/reactos/reactos.git
synced 2024-07-14 00:25:05 +00:00
[ADVAPI32]
* Move PrivilegeCheck() to security.c. CORE-8540 svn path=/trunk/; revision=64959
This commit is contained in:
parent
4423aa8bb2
commit
598366a6cc
|
@ -37,7 +37,6 @@ list(APPEND SOURCE
|
||||||
service/rpc.c
|
service/rpc.c
|
||||||
service/scm.c
|
service/scm.c
|
||||||
service/sctrl.c
|
service/sctrl.c
|
||||||
token/privilege.c
|
|
||||||
token/token.c
|
token/token.c
|
||||||
wine/cred.c
|
wine/cred.c
|
||||||
wine/crypt.c
|
wine/crypt.c
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
|
||||||
* PROJECT: ReactOS system libraries
|
|
||||||
* FILE: lib/advapi32/token/privilege.c
|
|
||||||
* PURPOSE: advapi32.dll token's privilege handling
|
|
||||||
* PROGRAMMER: E.Aliberti
|
|
||||||
* UPDATE HISTORY:
|
|
||||||
* 20010317 ea stubs
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <advapi32.h>
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* PrivilegeCheck EXPORTED
|
|
||||||
*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
BOOL WINAPI
|
|
||||||
PrivilegeCheck(HANDLE ClientToken,
|
|
||||||
PPRIVILEGE_SET RequiredPrivileges,
|
|
||||||
LPBOOL pfResult)
|
|
||||||
{
|
|
||||||
BOOLEAN Result;
|
|
||||||
NTSTATUS Status;
|
|
||||||
|
|
||||||
Status = NtPrivilegeCheck(ClientToken,
|
|
||||||
RequiredPrivileges,
|
|
||||||
&Result);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
*pfResult = (BOOL)Result;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* EOF */
|
|
|
@ -7,8 +7,7 @@
|
||||||
* Copyright 2006 Hervé Poussineau
|
* Copyright 2006 Hervé Poussineau
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* FILE: dll/win32/advapi32/sec/sid.c
|
* FILE: dll/win32/advapi32/wine/security.c
|
||||||
* PURPOSE: Security ID functions
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <advapi32.h>
|
#include <advapi32.h>
|
||||||
|
@ -594,6 +593,33 @@ GetLengthSid(PSID pSid)
|
||||||
return (DWORD)RtlLengthSid(pSid);
|
return (DWORD)RtlLengthSid(pSid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* PrivilegeCheck EXPORTED
|
||||||
|
*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL WINAPI
|
||||||
|
PrivilegeCheck(HANDLE ClientToken,
|
||||||
|
PPRIVILEGE_SET RequiredPrivileges,
|
||||||
|
LPBOOL pfResult)
|
||||||
|
{
|
||||||
|
BOOLEAN Result;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
Status = NtPrivilegeCheck(ClientToken,
|
||||||
|
RequiredPrivileges,
|
||||||
|
&Result);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastError(RtlNtStatusToDosError(Status));
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*pfResult = (BOOL)Result;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* ParseAclStringFlags
|
* ParseAclStringFlags
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue