Make more functions just calling down to ntdll.

New: GetSecurityDescriptorSacl.
This commit is contained in:
Juergen Schmied 1999-03-09 17:43:44 +00:00 committed by Alexandre Julliard
parent 2fe5a273fd
commit bb82dda93c
1 changed files with 41 additions and 36 deletions

View File

@ -8,7 +8,6 @@
#include "winreg.h" #include "winreg.h"
#include "winerror.h" #include "winerror.h"
#include "heap.h" #include "heap.h"
#include "ntdll.h"
#include "ntddk.h" #include "ntddk.h"
#include "debug.h" #include "debug.h"
@ -54,9 +53,23 @@ BOOL WINAPI
OpenProcessToken( HANDLE ProcessHandle, DWORD DesiredAccess, OpenProcessToken( HANDLE ProcessHandle, DWORD DesiredAccess,
HANDLE *TokenHandle ) HANDLE *TokenHandle )
{ {
FIXME(advapi,"(%08x,%08lx,%p): stub\n",ProcessHandle,DesiredAccess, TokenHandle); CallWin32ToNt(NtOpenProcessToken( ProcessHandle, DesiredAccess, TokenHandle ));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); }
return FALSE;
/******************************************************************************
* OpenThreadToken [ADVAPI32.114]
*
* PARAMS
* thread []
* desiredaccess []
* openasself []
* thandle []
*/
BOOL WINAPI
OpenThreadToken( HANDLE ThreadHandle, DWORD DesiredAccess,
BOOL OpenAsSelf, HANDLE *TokenHandle)
{
CallWin32ToNt (NtOpenThreadToken(ThreadHandle, DesiredAccess, OpenAsSelf, TokenHandle));
} }
/****************************************************************************** /******************************************************************************
@ -74,28 +87,8 @@ BOOL WINAPI
AdjustTokenPrivileges( HANDLE TokenHandle, BOOL DisableAllPrivileges, AdjustTokenPrivileges( HANDLE TokenHandle, BOOL DisableAllPrivileges,
LPVOID NewState, DWORD BufferLength, LPVOID NewState, DWORD BufferLength,
LPVOID PreviousState, LPDWORD ReturnLength ) LPVOID PreviousState, LPDWORD ReturnLength )
{ FIXME(advapi, "stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/******************************************************************************
* OpenThreadToken [ADVAPI32.114]
*
* PARAMS
* thread []
* desiredaccess []
* openasself []
* thandle []
*/
BOOL WINAPI
OpenThreadToken( HANDLE thread, DWORD desiredaccess, BOOL openasself,
HANDLE *thandle )
{ {
FIXME(advapi,"(%08x,%08lx,%d,%p): stub!\n", CallWin32ToNt(NtAdjustPrivilegesToken(TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength));
thread,desiredaccess,openasself,thandle);
*thandle = 0; /* FIXME ... well, store something in there ;) */
return TRUE;
} }
/****************************************************************************** /******************************************************************************
@ -108,16 +101,12 @@ OpenThreadToken( HANDLE thread, DWORD desiredaccess, BOOL openasself,
* tokeninfolength [] * tokeninfolength []
* retlen [] * retlen []
* *
* FIXME
* tokeninfoclas should be TOKEN_INFORMATION_CLASS
*/ */
BOOL WINAPI BOOL WINAPI
GetTokenInformation( HANDLE token, DWORD tokeninfoclass, LPVOID tokeninfo, GetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass,
DWORD tokeninfolength, LPDWORD retlen ) LPVOID tokeninfo, DWORD tokeninfolength, LPDWORD retlen )
{ {
FIXME(advapi,"(%08x,%ld,%p,%ld,%p): stub\n", CallWin32ToNt (NtQueryInformationToken( token, tokeninfoclass, tokeninfo, tokeninfolength, retlen));
token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
return FALSE;
} }
/* ############################## /* ##############################
@ -452,21 +441,37 @@ BOOL WINAPI GetSecurityDescriptorDacl(
* SetSecurityDescriptorDacl [ADVAPI.224] * SetSecurityDescriptorDacl [ADVAPI.224]
*/ */
BOOL WINAPI BOOL WINAPI
SetSecurityDescriptorDacl ( PSECURITY_DESCRIPTOR lpsd, BOOL daclpresent, SetSecurityDescriptorDacl (
PACL dacl, BOOL dacldefaulted ) PSECURITY_DESCRIPTOR lpsd,
BOOL daclpresent,
PACL dacl,
BOOL dacldefaulted )
{ {
CallWin32ToNt (RtlSetDaclSecurityDescriptor (lpsd, daclpresent, dacl, dacldefaulted )); CallWin32ToNt (RtlSetDaclSecurityDescriptor (lpsd, daclpresent, dacl, dacldefaulted ));
}
/******************************************************************************
* GetSecurityDescriptorSacl [ADVAPI.]
*/
BOOL WINAPI GetSecurityDescriptorSacl(
IN PSECURITY_DESCRIPTOR lpsd,
OUT LPBOOL lpbSaclPresent,
OUT PACL *pSacl,
OUT LPBOOL lpbSaclDefaulted)
{
CallWin32ToNt (RtlGetSaclSecurityDescriptor(lpsd, (PBOOLEAN)lpbSaclPresent,
pSacl, (PBOOLEAN)lpbSaclDefaulted));
} }
/************************************************************************** /**************************************************************************
* SetSecurityDescriptorSacl [NTDLL.488] * SetSecurityDescriptorSacl [NTDLL.488]
*/ */
BOOL WINAPI SetSecurityDescriptorSacl ( BOOL WINAPI SetSecurityDescriptorSacl (
PSECURITY_DESCRIPTOR lpsd, PSECURITY_DESCRIPTOR lpsd,
BOOL saclpresent, BOOL saclpresent,
PACL sacl, PACL lpsacl,
BOOL sacldefaulted) BOOL sacldefaulted)
{ {
CallWin32ToNt (RtlSetSaclSecurityDescriptor(lpsd, saclpresent, sacl, sacldefaulted)); CallWin32ToNt (RtlSetSaclSecurityDescriptor(lpsd, saclpresent, lpsacl, sacldefaulted));
} }
/****************************************************************************** /******************************************************************************
* MakeSelfRelativeSD [ADVAPI32.95] * MakeSelfRelativeSD [ADVAPI32.95]