- made the security functions consistent. advapi calls down to ntdll now

- new SetSecurityDescriptorGroup,  SetSecurityDescriptorOwner,
  SetSecurityDescriptorSacl, GetSecurityDescriptorDacl
- nt-header cleanup
oldstable
Juergen Schmied 1999-02-19 16:29:05 +00:00 committed by Alexandre Julliard
parent 34acebc14b
commit 3426d85319
12 changed files with 1188 additions and 865 deletions

View File

@ -1,5 +1,6 @@
/*
* dlls/advapi32/security.c
* FIXME: for all functions thunking down to Rtl* functions: implement SetLastError()
*/
#include <string.h>
@ -8,8 +9,17 @@
#include "winerror.h"
#include "heap.h"
#include "ntdll.h"
#include "ntddk.h"
#include "debug.h"
#define CallWin32ToNt(func) \
{ NTSTATUS ret; \
ret = (func); \
if (ret !=STATUS_SUCCESS) \
{ SetLastError (RtlNtStatusToDosError(ret)); return FALSE; } \
return TRUE; \
}
/* FIXME: move it to a header */
BOOL32 WINAPI IsValidSid (PSID pSid);
BOOL32 WINAPI EqualSid (PSID pSid1, PSID pSid2);
@ -24,6 +34,10 @@ BYTE* WINAPI GetSidSubAuthorityCount(PSID pSid);
DWORD WINAPI GetLengthSid(PSID pSid);
BOOL32 WINAPI CopySid(DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid);
/* ##############################
###### TOKEN FUNCTIONS ######
##############################
*/
/******************************************************************************
* OpenProcessToken [ADVAPI32.109]
@ -40,8 +54,27 @@ BOOL32 WINAPI
OpenProcessToken( HANDLE32 ProcessHandle, DWORD DesiredAccess,
HANDLE32 *TokenHandle )
{
FIXME(advapi,"(%08x,%08lx,%p): stub\n",ProcessHandle,DesiredAccess,
TokenHandle);
FIXME(advapi,"(%08x,%08lx,%p): stub\n",ProcessHandle,DesiredAccess, TokenHandle);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/******************************************************************************
* AdjustTokenPrivileges [ADVAPI32.10]
*
* PARAMS
* TokenHandle []
* DisableAllPrivileges []
* NewState []
* BufferLength []
* PreviousState []
* ReturnLength []
*/
BOOL32 WINAPI
AdjustTokenPrivileges( HANDLE32 TokenHandle, BOOL32 DisableAllPrivileges,
LPVOID NewState, DWORD BufferLength,
LPVOID PreviousState, LPDWORD ReturnLength )
{ FIXME(advapi, "stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@ -65,102 +98,98 @@ OpenThreadToken( HANDLE32 thread, DWORD desiredaccess, BOOL32 openasself,
return TRUE;
}
/******************************************************************************
* LookupPrivilegeValue32A [ADVAPI32.92]
*/
BOOL32 WINAPI
LookupPrivilegeValue32A( LPCSTR lpSystemName, LPCSTR lpName, LPVOID lpLuid )
{
LPWSTR lpSystemNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpSystemName);
LPWSTR lpNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpName);
BOOL32 ret = LookupPrivilegeValue32W( lpSystemNameW, lpNameW, lpLuid);
HeapFree(GetProcessHeap(), 0, lpNameW);
HeapFree(GetProcessHeap(), 0, lpSystemNameW);
return ret;
}
/******************************************************************************
* LookupPrivilegeValue32W [ADVAPI32.93]
* Retrieves LUID used on a system to represent the privilege name.
*
* NOTES
* lpLuid should be PLUID
* GetTokenInformation [ADVAPI32.66]
*
* PARAMS
* lpSystemName [I] Address of string specifying the system
* lpName [I] Address of string specifying the privilege
* lpLuid [I] Address of locally unique identifier
* token []
* tokeninfoclass []
* tokeninfo []
* tokeninfolength []
* retlen []
*
* RETURNS STD
* FIXME
* tokeninfoclas should be TOKEN_INFORMATION_CLASS
*/
BOOL32 WINAPI
LookupPrivilegeValue32W( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
GetTokenInformation( HANDLE32 token, DWORD tokeninfoclass, LPVOID tokeninfo,
DWORD tokeninfolength, LPDWORD retlen )
{
FIXME(advapi,"(%s,%s,%p): stub\n",debugstr_w(lpSystemName),
debugstr_w(lpName), lpLuid);
FIXME(advapi,"(%08x,%ld,%p,%ld,%p): stub\n",
token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
return FALSE;
}
/* ##############################
###### SID FUNCTIONS ######
##############################
*/
/******************************************************************************
* AllocateAndInitializeSid [ADVAPI32.11]
*
* PARAMS
* pIdentifierAuthority []
* nSubAuthorityCount []
* nSubAuthority0 []
* nSubAuthority1 []
* nSubAuthority2 []
* nSubAuthority3 []
* nSubAuthority4 []
* nSubAuthority5 []
* nSubAuthority6 []
* nSubAuthority7 []
* pSid []
*/
BOOL32 WINAPI
AllocateAndInitializeSid( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
BYTE nSubAuthorityCount,
DWORD nSubAuthority0, DWORD nSubAuthority1,
DWORD nSubAuthority2, DWORD nSubAuthority3,
DWORD nSubAuthority4, DWORD nSubAuthority5,
DWORD nSubAuthority6, DWORD nSubAuthority7,
PSID *pSid )
{
if (!(*pSid = HeapAlloc( GetProcessHeap(), 0,
GetSidLengthRequired(nSubAuthorityCount))))
return FALSE;
(*pSid)->Revision = SID_REVISION;
if (pIdentifierAuthority)
memcpy(&(*pSid)->IdentifierAuthority, pIdentifierAuthority,
sizeof (SID_IDENTIFIER_AUTHORITY));
*GetSidSubAuthorityCount(*pSid) = nSubAuthorityCount;
if (nSubAuthorityCount > 0)
*GetSidSubAuthority(*pSid, 0) = nSubAuthority0;
if (nSubAuthorityCount > 1)
*GetSidSubAuthority(*pSid, 1) = nSubAuthority1;
if (nSubAuthorityCount > 2)
*GetSidSubAuthority(*pSid, 2) = nSubAuthority2;
if (nSubAuthorityCount > 3)
*GetSidSubAuthority(*pSid, 3) = nSubAuthority3;
if (nSubAuthorityCount > 4)
*GetSidSubAuthority(*pSid, 4) = nSubAuthority4;
if (nSubAuthorityCount > 5)
*GetSidSubAuthority(*pSid, 5) = nSubAuthority5;
if (nSubAuthorityCount > 6)
*GetSidSubAuthority(*pSid, 6) = nSubAuthority6;
if (nSubAuthorityCount > 7)
*GetSidSubAuthority(*pSid, 7) = nSubAuthority7;
return TRUE;
}
/******************************************************************************
* GetFileSecurity32A [ADVAPI32.45]
*
* Obtains Specified information about the security of a file or directory
* The information obtained is constrained by the callers access rights and
* privileges
*/
BOOL32 WINAPI
GetFileSecurity32A( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded )
{
FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName));
return TRUE;
}
/******************************************************************************
* GetFileSecurity32W [ADVAPI32.46]
*
* Obtains Specified information about the security of a file or directory
* The information obtained is constrained by the callers access rights and
* privileges
* FreeSid [ADVAPI32.42]
*
* PARAMS
* lpFileName []
* RequestedInformation []
* pSecurityDescriptor []
* nLength []
* lpnLengthNeeded []
* pSid []
*/
BOOL32 WINAPI
GetFileSecurity32W( LPCWSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded )
VOID* WINAPI
FreeSid( PSID pSid )
{
FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) );
return TRUE;
}
/******************************************************************************
* AdjustTokenPrivileges [ADVAPI32.10]
*
* PARAMS
* TokenHandle []
* DisableAllPrivileges []
* NewState []
* BufferLength []
* PreviousState []
* ReturnLength []
*/
BOOL32 WINAPI
AdjustTokenPrivileges( HANDLE32 TokenHandle, BOOL32 DisableAllPrivileges,
LPVOID NewState, DWORD BufferLength,
LPVOID PreviousState, LPDWORD ReturnLength )
{ FIXME(advapi, "stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
HeapFree( GetProcessHeap(), 0, pSid );
return NULL;
}
/******************************************************************************
@ -252,153 +281,6 @@ GetSidLengthRequired( BYTE nSubAuthorityCount )
return sizeof (SID) + (nSubAuthorityCount - 1) * sizeof (DWORD);
}
/******************************************************************************
* GetTokenInformation [ADVAPI32.66]
*
* PARAMS
* token []
* tokeninfoclass []
* tokeninfo []
* tokeninfolength []
* retlen []
*
* FIXME
* tokeninfoclas should be TOKEN_INFORMATION_CLASS
*/
BOOL32 WINAPI
GetTokenInformation( HANDLE32 token, DWORD tokeninfoclass, LPVOID tokeninfo,
DWORD tokeninfolength, LPDWORD retlen )
{
FIXME(advapi,"(%08x,%ld,%p,%ld,%p): stub\n",
token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
return FALSE;
}
/******************************************************************************
* AllocateAndInitializeSid [ADVAPI32.11]
*
* PARAMS
* pIdentifierAuthority []
* nSubAuthorityCount []
* nSubAuthority0 []
* nSubAuthority1 []
* nSubAuthority2 []
* nSubAuthority3 []
* nSubAuthority4 []
* nSubAuthority5 []
* nSubAuthority6 []
* nSubAuthority7 []
* pSid []
*/
BOOL32 WINAPI
AllocateAndInitializeSid( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
BYTE nSubAuthorityCount,
DWORD nSubAuthority0, DWORD nSubAuthority1,
DWORD nSubAuthority2, DWORD nSubAuthority3,
DWORD nSubAuthority4, DWORD nSubAuthority5,
DWORD nSubAuthority6, DWORD nSubAuthority7,
PSID *pSid )
{
if (!(*pSid = HeapAlloc( GetProcessHeap(), 0,
GetSidLengthRequired(nSubAuthorityCount))))
return FALSE;
(*pSid)->Revision = SID_REVISION;
if (pIdentifierAuthority)
memcpy(&(*pSid)->IdentifierAuthority, pIdentifierAuthority,
sizeof (SID_IDENTIFIER_AUTHORITY));
*GetSidSubAuthorityCount(*pSid) = nSubAuthorityCount;
if (nSubAuthorityCount > 0)
*GetSidSubAuthority(*pSid, 0) = nSubAuthority0;
if (nSubAuthorityCount > 1)
*GetSidSubAuthority(*pSid, 1) = nSubAuthority1;
if (nSubAuthorityCount > 2)
*GetSidSubAuthority(*pSid, 2) = nSubAuthority2;
if (nSubAuthorityCount > 3)
*GetSidSubAuthority(*pSid, 3) = nSubAuthority3;
if (nSubAuthorityCount > 4)
*GetSidSubAuthority(*pSid, 4) = nSubAuthority4;
if (nSubAuthorityCount > 5)
*GetSidSubAuthority(*pSid, 5) = nSubAuthority5;
if (nSubAuthorityCount > 6)
*GetSidSubAuthority(*pSid, 6) = nSubAuthority6;
if (nSubAuthorityCount > 7)
*GetSidSubAuthority(*pSid, 7) = nSubAuthority7;
return TRUE;
}
/******************************************************************************
* FreeSid [ADVAPI32.42]
*
* PARAMS
* pSid []
*/
VOID* WINAPI
FreeSid( PSID pSid )
{
HeapFree( GetProcessHeap(), 0, pSid );
return NULL;
}
/******************************************************************************
* InitializeSecurityDescriptor [ADVAPI32.73]
*
* PARAMS
* pDescr []
* revision []
*/
BOOL32 WINAPI
InitializeSecurityDescriptor( SECURITY_DESCRIPTOR *pDescr,
DWORD revision )
{
TRACE (security, "(%p,%lx): stub\n", pDescr, revision);
ZeroMemory (pDescr, sizeof (SECURITY_DESCRIPTOR));
pDescr->Revision = revision;
return TRUE;
}
/******************************************************************************
* GetSecurityDescriptorLength [ADVAPI32.55]
*/
DWORD WINAPI GetSecurityDescriptorLength( SECURITY_DESCRIPTOR *pDescr)
{
FIXME(security, "(%p), stub\n", pDescr);
return 0;
}
/******************************************************************************
* GetSecurityDescriptorOwner [ADVAPI32.56]
*
* PARAMS
* pOwner []
* lpbOwnerDefaulted []
*/
BOOL32 WINAPI
GetSecurityDescriptorOwner( SECURITY_DESCRIPTOR *pDescr, PSID *pOwner,
LPBOOL32 lpbOwnerDefaulted )
{
FIXME(security, "(%p,%p,%p), stub\n", pDescr,pOwner,lpbOwnerDefaulted);
*lpbOwnerDefaulted = TRUE;
return 0;
}
/******************************************************************************
* GetSecurityDescriptorGroup [ADVAPI32.54]
*
* PARAMS
* pGroup []
* lpbOwnerDefaulted []
*/
BOOL32 WINAPI
GetSecurityDescriptorGroup( SECURITY_DESCRIPTOR *pDescr, PSID *pGroup,
LPBOOL32 lpbOwnerDefaulted )
{
FIXME(security, "(%p,%p,%p), stub\n", pDescr,pGroup,lpbOwnerDefaulted);
*lpbOwnerDefaulted = TRUE;
return 0;
}
/******************************************************************************
* InitializeSid [ADVAPI32.74]
*
@ -472,6 +354,75 @@ GetLengthSid (PSID pSid)
return GetSidLengthRequired( * GetSidSubAuthorityCount(pSid) );
}
/* ##############################################
###### SECURITY DESCRIPTOR FUNCTIONS ######
##############################################
*/
/******************************************************************************
* InitializeSecurityDescriptor [ADVAPI32.73]
*
* PARAMS
* pDescr []
* revision []
*/
BOOL32 WINAPI
InitializeSecurityDescriptor( SECURITY_DESCRIPTOR *pDescr, DWORD revision )
{
CallWin32ToNt (RtlCreateSecurityDescriptor(pDescr, revision ));
}
/******************************************************************************
* GetSecurityDescriptorLength [ADVAPI32.55]
*/
DWORD WINAPI GetSecurityDescriptorLength( SECURITY_DESCRIPTOR *pDescr)
{
return (RtlLengthSecurityDescriptor(pDescr));
}
/******************************************************************************
* GetSecurityDescriptorOwner [ADVAPI32.56]
*
* PARAMS
* pOwner []
* lpbOwnerDefaulted []
*/
BOOL32 WINAPI
GetSecurityDescriptorOwner( SECURITY_DESCRIPTOR *pDescr, PSID *pOwner,
LPBOOL32 lpbOwnerDefaulted )
{
CallWin32ToNt (RtlGetOwnerSecurityDescriptor( pDescr, pOwner, (PBOOLEAN)lpbOwnerDefaulted ));
}
/******************************************************************************
* SetSecurityDescriptorOwner [ADVAPI32]
*
* PARAMS
*/
BOOL32 SetSecurityDescriptorOwner( PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSID pOwner, BOOL32 bOwnerDefaulted)
{
CallWin32ToNt (RtlSetOwnerSecurityDescriptor(pSecurityDescriptor, pOwner, bOwnerDefaulted));
}
/******************************************************************************
* GetSecurityDescriptorGroup [ADVAPI32.54]
*/
BOOL32 WINAPI GetSecurityDescriptorGroup(
PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID *Group,
LPBOOL32 GroupDefaulted)
{
CallWin32ToNt (RtlGetGroupSecurityDescriptor(SecurityDescriptor, Group, (PBOOLEAN)GroupDefaulted));
}
/******************************************************************************
* SetSecurityDescriptorGroup
*/
BOOL32 WINAPI SetSecurityDescriptorGroup ( PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID Group, BOOL32 GroupDefaulted)
{
CallWin32ToNt (RtlSetGroupSecurityDescriptor( SecurityDescriptor, Group, GroupDefaulted));
}
/******************************************************************************
* IsValidSecurityDescriptor [ADVAPI32.79]
*
@ -479,12 +430,153 @@ GetLengthSid (PSID pSid)
* lpsecdesc []
*/
BOOL32 WINAPI
IsValidSecurityDescriptor( PSECURITY_DESCRIPTOR lpsecdesc )
IsValidSecurityDescriptor( PSECURITY_DESCRIPTOR SecurityDescriptor )
{
FIXME(advapi,"(%p):stub\n",lpsecdesc);
CallWin32ToNt (RtlValidSecurityDescriptor(SecurityDescriptor));
}
/******************************************************************************
* GetSecurityDescriptorDacl [ADVAPI.91]
*/
BOOL32 WINAPI GetSecurityDescriptorDacl(
IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
OUT LPBOOL32 lpbDaclPresent,
OUT PACL *pDacl,
OUT LPBOOL32 lpbDaclDefaulted)
{
CallWin32ToNt (RtlGetDaclSecurityDescriptor(pSecurityDescriptor, (PBOOLEAN)lpbDaclPresent,
pDacl, (PBOOLEAN)lpbDaclDefaulted));
}
/******************************************************************************
* SetSecurityDescriptorDacl [ADVAPI.224]
*/
BOOL32 WINAPI
SetSecurityDescriptorDacl ( PSECURITY_DESCRIPTOR lpsd, BOOL32 daclpresent,
PACL dacl, BOOL32 dacldefaulted )
{
CallWin32ToNt (RtlSetDaclSecurityDescriptor (lpsd, daclpresent, dacl, dacldefaulted ));
}
/**************************************************************************
* SetSecurityDescriptorSacl [NTDLL.488]
*/
BOOL32 WINAPI SetSecurityDescriptorSacl (
PSECURITY_DESCRIPTOR lpsd,
BOOL32 saclpresent,
PACL sacl,
BOOL32 sacldefaulted)
{
CallWin32ToNt (RtlSetSaclSecurityDescriptor(lpsd, saclpresent, sacl, sacldefaulted));
}
/******************************************************************************
* MakeSelfRelativeSD [ADVAPI32.95]
*
* PARAMS
* lpabssecdesc []
* lpselfsecdesc []
* lpbuflen []
*/
BOOL32 WINAPI
MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc,
PSECURITY_DESCRIPTOR lpselfsecdesc, LPDWORD lpbuflen )
{
FIXME(advapi,"(%p,%p,%p),stub!\n",lpabssecdesc,lpselfsecdesc,lpbuflen);
return TRUE;
}
/******************************************************************************
* GetSecurityDescriptorControl32 [ADVAPI32]
*/
BOOL32 GetSecurityDescriptorControl32 ( PSECURITY_DESCRIPTOR pSecurityDescriptor,
/* fixme: PSECURITY_DESCRIPTOR_CONTROL*/ LPVOID pControl, LPDWORD lpdwRevision)
{ FIXME(advapi,"(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision);
return 1;
}
/* ##############################
###### MISC FUNCTIONS ######
##############################
*/
/******************************************************************************
* LookupPrivilegeValue32W [ADVAPI32.93]
* Retrieves LUID used on a system to represent the privilege name.
*
* NOTES
* lpLuid should be PLUID
*
* PARAMS
* lpSystemName [I] Address of string specifying the system
* lpName [I] Address of string specifying the privilege
* lpLuid [I] Address of locally unique identifier
*
* RETURNS STD
*/
BOOL32 WINAPI
LookupPrivilegeValue32W( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
{
FIXME(advapi,"(%s,%s,%p): stub\n",debugstr_w(lpSystemName),
debugstr_w(lpName), lpLuid);
return TRUE;
}
/******************************************************************************
* LookupPrivilegeValue32A [ADVAPI32.92]
*/
BOOL32 WINAPI
LookupPrivilegeValue32A( LPCSTR lpSystemName, LPCSTR lpName, LPVOID lpLuid )
{
LPWSTR lpSystemNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpSystemName);
LPWSTR lpNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpName);
BOOL32 ret = LookupPrivilegeValue32W( lpSystemNameW, lpNameW, lpLuid);
HeapFree(GetProcessHeap(), 0, lpNameW);
HeapFree(GetProcessHeap(), 0, lpSystemNameW);
return ret;
}
/******************************************************************************
* GetFileSecurity32A [ADVAPI32.45]
*
* Obtains Specified information about the security of a file or directory
* The information obtained is constrained by the callers access rights and
* privileges
*/
BOOL32 WINAPI
GetFileSecurity32A( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded )
{
FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName));
return TRUE;
}
/******************************************************************************
* GetFileSecurity32W [ADVAPI32.46]
*
* Obtains Specified information about the security of a file or directory
* The information obtained is constrained by the callers access rights and
* privileges
*
* PARAMS
* lpFileName []
* RequestedInformation []
* pSecurityDescriptor []
* nLength []
* lpnLengthNeeded []
*/
BOOL32 WINAPI
GetFileSecurity32W( LPCWSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded )
{
FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) );
return TRUE;
}
/******************************************************************************
* LookupAccountSid32A [ADVAPI32.86]
*/
@ -552,22 +644,6 @@ SetFileSecurity32W( LPCWSTR lpFileName,
return TRUE;
}
/******************************************************************************
* MakeSelfRelativeSD [ADVAPI32.95]
*
* PARAMS
* lpabssecdesc []
* lpselfsecdesc []
* lpbuflen []
*/
BOOL32 WINAPI
MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc,
PSECURITY_DESCRIPTOR lpselfsecdesc, LPDWORD lpbuflen )
{
FIXME(advapi,"(%p,%p,%p),stub!\n",lpabssecdesc,lpselfsecdesc,lpbuflen);
return TRUE;
}
/******************************************************************************
* QueryWindows31FilesMigration [ADVAPI32.266]
*
@ -627,16 +703,6 @@ NotifyBootConfigStatus( DWORD x1 )
return 1;
}
/******************************************************************************
* GetSecurityDescriptorControl32 [ADVAPI32]
*/
BOOL32 GetSecurityDescriptorControl32 ( PSECURITY_DESCRIPTOR pSecurityDescriptor,
/* fixme: PSECURITY_DESCRIPTOR_CONTROL*/ LPVOID pControl, LPDWORD lpdwRevision)
{ FIXME(advapi,"(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision);
return 1;
}
/******************************************************************************
* RevertToSelf [ADVAPI32.180]
*
@ -660,6 +726,9 @@ ImpersonateSelf32(DWORD/*SECURITY_IMPERSONATION_LEVEL*/ ImpersonationLevel)
return TRUE;
}
/******************************************************************************
* AccessCheck32 [ADVAPI32.71]
*/
BOOL32 WINAPI
AccessCheck32(PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE32 ClientToken, DWORD DesiredAccess, LPVOID/*LPGENERIC_MAPPING*/ GenericMapping, LPVOID/*LPPRIVILEGE_SET*/ PrivilegeSet, LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL32 AccessStatus)
{

View File

@ -44,7 +44,8 @@ NTSTATUS WINAPI NtOpenFile(
ULONG OpenOptions)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s),%p,0x%08lx,0x%08lx) stub\n",
FileHandle, DesiredAccess, ObjectAttributes, debugstr_w(ObjectAttributes->ObjectName->Buffer),
FileHandle, DesiredAccess, ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL,
IoStatusBlock, ShareAccess, OpenOptions);
return 0;
}
@ -81,7 +82,8 @@ NTSTATUS WINAPI NtCreateFile(
ULONG EaLength)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s),%p,%p,0x%08lx,0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx) stub\n",
FileHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),
FileHandle,DesiredAccess,ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL,
IoStatusBlock,AllocateSize,FileAttributes,
ShareAccess,CreateDisposition,CreateOptions,EaBuffer,EaLength);
return 0;
@ -96,7 +98,8 @@ NTSTATUS WINAPI NtCreateTimer(
IN TIMER_TYPE TimerType)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s),0x%08x) stub\n",
TimerHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),
TimerHandle,DesiredAccess,ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL,
TimerType);
return 0;
}
@ -108,11 +111,11 @@ NTSTATUS WINAPI NtSetTimer(
IN PLARGE_INTEGER DueTime,
IN PTIMERAPCROUTINE TimerApcRoutine,
IN PVOID TimerContext,
IN BOOL WakeTimer,
IN BOOLEAN WakeTimer,
IN ULONG Period OPTIONAL,
OUT PBOOLEAN PreviousState OPTIONAL)
{
FIXME(ntdll,"(0x%08x,%p,%p,%p,%08lx,0x%08lx,%p) stub\n",
FIXME(ntdll,"(0x%08x,%p,%p,%p,%08x,0x%08lx,%p) stub\n",
TimerHandle,DueTime,TimerApcRoutine,TimerContext,WakeTimer,Period,PreviousState);
return 0;
}
@ -128,7 +131,8 @@ NTSTATUS WINAPI NtCreateEvent(
IN BOOLEAN InitialState)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s),%08x,%08x): empty stub\n",
EventHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),
EventHandle,DesiredAccess,ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL,
ManualReset,InitialState);
return 0;
}
@ -168,7 +172,8 @@ NTSTATUS WINAPI NtOpenDirectoryObject(
POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s)): stub\n",
DirectoryHandle, DesiredAccess, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
DirectoryHandle, DesiredAccess, ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
return 0;
}
@ -393,7 +398,7 @@ NTSTATUS WINAPI NtDuplicateToken(
*/
NTSTATUS WINAPI NtAdjustPrivilegesToken(
IN HANDLE32 TokenHandle,
IN BOOL32 DisableAllPrivileges,
IN BOOLEAN DisableAllPrivileges,
IN PTOKEN_PRIVILEGES NewState,
IN DWORD BufferLength,
OUT PTOKEN_PRIVILEGES PreviousState,
@ -509,7 +514,8 @@ NTSTATUS WINAPI NtOpenEvent(
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s)),stub!\n",
EventHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
EventHandle,DesiredAccess,ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
return 0;
}
@ -529,7 +535,8 @@ NTSTATUS WINAPI NtWaitForSingleObject(
* NtConnectPort [NTDLL]
*/
NTSTATUS WINAPI NtConnectPort(DWORD x1,PUNICODE_STRING uni,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8) {
FIXME(ntdll,"(0x%08lx,%s,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,debugstr_w(uni->Buffer),x3,x4,x5,x6,x7,x8);
FIXME(ntdll,"(0x%08lx,%s,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
x1,debugstr_w(uni->Buffer),x3,x4,x5,x6,x7,x8);
return 0;
}
@ -558,7 +565,8 @@ NTSTATUS WINAPI NtCreateDirectoryObject(
POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s)),stub!\n",
DirectoryHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
DirectoryHandle,DesiredAccess,ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
return 0;
}
@ -651,7 +659,8 @@ NTSTATUS WINAPI NtCreateSection(
IN HANDLE32 FileHandle OPTIONAL)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s),%p,0x%08lx,0x%08lx,0x%08x) stub\n",
SectionHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),
SectionHandle,DesiredAccess,ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL,
MaximumSize,SectionPageProtection,AllocationAttributes,FileHandle);
return 0;
}
@ -707,10 +716,9 @@ NTSTATUS WINAPI NtTerminateThread(
IN HANDLE32 ThreadHandle,
IN NTSTATUS ExitStatus)
{
BOOL32 ret = TerminateThread(ThreadHandle,ExitStatus);
if ( TerminateThread(ThreadHandle,ExitStatus) )
return 0;
if (ret)
return 0;
return 0xc0000000; /* FIXME: lasterror->ntstatus */
}
@ -731,13 +739,14 @@ NTSTATUS WINAPI NtOpenSection(
POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s)),stub!\n",
SectionHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
SectionHandle,DesiredAccess,ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
return 0;
}
/******************************************************************************
* NtQueryPerformanceCounter [NTDLL]
*/
BOOL32 WINAPI NtQueryPerformanceCounter(
NTSTATUS WINAPI NtQueryPerformanceCounter(
IN PLARGE_INTEGER Counter,
IN PLARGE_INTEGER Frequency)
{
@ -778,7 +787,8 @@ NTSTATUS WINAPI NtCreateSemaphore(
IN ULONG MaximumCount)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s),0x%08lx,0x%08lx) stub!\n",
SemaphoreHandle, DesiredAccess, ObjectAttributes, debugstr_w(ObjectAttributes->ObjectName->Buffer),
SemaphoreHandle, DesiredAccess, ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL,
InitialCount, MaximumCount);
return 0;
}
@ -791,7 +801,8 @@ NTSTATUS WINAPI NtOpenSemaphore(
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(0x%08x,0x%08lx,%p(%s)) stub!\n",
SemaphoreHandle, DesiredAcces, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
SemaphoreHandle, DesiredAcces, ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
return 0;
}
@ -832,7 +843,8 @@ NTSTATUS WINAPI NtCreateSymbolicLinkObject(
IN PUNICODE_STRING Name)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s), %p) stub\n",
SymbolicLinkHandle, DesiredAccess, ObjectAttributes, debugstr_w(ObjectAttributes->ObjectName->Buffer), Name);
SymbolicLinkHandle, DesiredAccess, ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL, Name);
return 0;
}
@ -845,7 +857,8 @@ NTSTATUS WINAPI NtOpenSymbolicLinkObject(
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s)) stub\n",
LinkHandle, DesiredAccess, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
LinkHandle, DesiredAccess, ObjectAttributes,
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
return 0;
}
/******************************************************************************

File diff suppressed because it is too large Load Diff

View File

@ -8,16 +8,13 @@
#include <ntdef.h>
/* fixme: put it elsewhere */
typedef long BOOL;
/* end fixme */
/******************
* asynchronous I/O
*/
/* conflict with X11-includes*/
#undef Status /* conflict with X11-includes*/
#undef Status
typedef struct _IO_STATUS_BLOCK
{ union
{ NTSTATUS Status;
@ -156,7 +153,7 @@ typedef enum SYSTEM_INFORMATION_CLASS
typedef struct _SYSTEM_TIME_ADJUSTMENT
{
ULONG TimeAdjustment;
BOOL TimeAdjustmentDisabled;
BOOLEAN TimeAdjustmentDisabled;
} SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
@ -201,4 +198,168 @@ typedef enum _TIMER_TYPE
SynchronizationTimer
} TIMER_TYPE;
/* ##############################
###### SID FUNCTIONS ######
##############################
*/
BOOLEAN WINAPI RtlAllocateAndInitializeSid (
PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
DWORD nSubAuthorityCount,
DWORD x3,
DWORD x4,
DWORD x5,
DWORD x6,
DWORD x7,
DWORD x8,
DWORD x9,
DWORD x10,
PSID pSid);
DWORD WINAPI RtlEqualSid(DWORD x1,DWORD x2);
DWORD WINAPI RtlFreeSid(DWORD x1);
DWORD WINAPI RtlLengthRequiredSid(DWORD nrofsubauths);
DWORD WINAPI RtlLengthSid(PSID sid);
DWORD WINAPI RtlInitializeSid(PSID PSID,PSID_IDENTIFIER_AUTHORITY PSIDauth, DWORD c);
LPDWORD WINAPI RtlSubAuthoritySid(PSID PSID,DWORD nr);
LPBYTE WINAPI RtlSubAuthorityCountSid(PSID PSID);
DWORD WINAPI RtlCopySid(DWORD len,PSID to,PSID from);
/* ##############################################
###### SECURITY DESCRIPTOR FUNCTIONS ######
##############################################
*/
NTSTATUS WINAPI RtlCreateSecurityDescriptor(
PSECURITY_DESCRIPTOR lpsd,
DWORD rev);
BOOLEAN WINAPI RtlValidSecurityDescriptor(
PSECURITY_DESCRIPTOR SecurityDescriptor);
DWORD WINAPI RtlGetDaclSecurityDescriptor(
IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
OUT PBOOLEAN lpbDaclPresent,
OUT PACL *pDacl,
OUT PBOOLEAN lpbDaclDefaulted);
NTSTATUS WINAPI RtlSetDaclSecurityDescriptor (
PSECURITY_DESCRIPTOR lpsd,
BOOLEAN daclpresent,
PACL dacl,
BOOLEAN dacldefaulted );
ULONG WINAPI RtlLengthSecurityDescriptor(
PSECURITY_DESCRIPTOR SecurityDescriptor);
DWORD WINAPI RtlSetSaclSecurityDescriptor (
PSECURITY_DESCRIPTOR lpsd,
BOOLEAN saclpresent,
PACL sacl,
BOOLEAN sacldefaulted);
NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(
PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID *Owner,
PBOOLEAN OwnerDefaulted);
NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(
PSECURITY_DESCRIPTOR lpsd,
PSID owner,
BOOLEAN ownerdefaulted);
NTSTATUS WINAPI RtlSetGroupSecurityDescriptor (
PSECURITY_DESCRIPTOR lpsd,
PSID group,
BOOLEAN groupdefaulted);
NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(
PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID *Group,
PBOOLEAN GroupDefaulted);
/* ##############################
###### ACL FUNCTIONS ######
##############################
*/
DWORD WINAPI RtlCreateAcl(PACL acl,DWORD size,DWORD rev);
BOOLEAN WINAPI RtlFirstFreeAce(
PACL acl,
LPACE_HEADER *x);
NTSTATUS WINAPI RtlAddAce(
PACL acl,
DWORD rev,
DWORD xnrofaces,
LPACE_HEADER acestart,
DWORD acelen);
DWORD WINAPI RtlAddAccessAllowedAce(DWORD x1,DWORD x2,DWORD x3,DWORD x4);
DWORD WINAPI RtlGetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce );
/* ######################################
###### STRING FUNCTIONS ######
######################################
*/
DWORD WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING uni,PANSI_STRING ansi,BOOLEAN doalloc);
DWORD WINAPI RtlOemStringToUnicodeString(PUNICODE_STRING uni,PSTRING ansi,BOOLEAN doalloc);
DWORD WINAPI RtlMultiByteToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen);
DWORD WINAPI RtlOemToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen);
VOID WINAPI RtlInitAnsiString(PANSI_STRING target,LPCSTR source);
VOID WINAPI RtlInitString(PSTRING target,LPCSTR source);
VOID WINAPI RtlInitUnicodeString(PUNICODE_STRING target,LPCWSTR source);
VOID WINAPI RtlFreeUnicodeString(PUNICODE_STRING str);
VOID WINAPI RtlFreeAnsiString(PANSI_STRING AnsiString);
DWORD WINAPI RtlUnicodeToOemN(LPSTR oemstr,DWORD oemlen,LPDWORD reslen,LPWSTR unistr,DWORD unilen);
DWORD WINAPI RtlUnicodeStringToOemString(PANSI_STRING oem,PUNICODE_STRING uni,BOOLEAN alloc);
DWORD WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING oem,PUNICODE_STRING uni,BOOLEAN alloc);
DWORD WINAPI RtlEqualUnicodeString(PUNICODE_STRING s1,PUNICODE_STRING s2,DWORD x);
DWORD WINAPI RtlUpcaseUnicodeString(PUNICODE_STRING dest,PUNICODE_STRING src,BOOLEAN doalloc);
UINT32 WINAPI RtlxOemStringToUnicodeSize(PSTRING str);
UINT32 WINAPI RtlxAnsiStringToUnicodeSize(PANSI_STRING str);
DWORD WINAPI RtlIsTextUnicode(LPVOID buf, DWORD len, DWORD *pf);
NTSTATUS WINAPI RtlCompareUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive);
/* ######################################
###### RESOURCE FUNCTIONS ######
######################################
*/
void WINAPI RtlInitializeResource(LPRTL_RWLOCK rwl);
void WINAPI RtlDeleteResource(LPRTL_RWLOCK rwl);
BYTE WINAPI RtlAcquireResourceExclusive(LPRTL_RWLOCK rwl, BYTE fWait);
BYTE WINAPI RtlAcquireResourceShared(LPRTL_RWLOCK rwl, BYTE fWait);
void WINAPI RtlReleaseResource(LPRTL_RWLOCK rwl);
void WINAPI RtlDumpResource(LPRTL_RWLOCK rwl);
void __cdecl DbgPrint(LPCSTR fmt,LPVOID args);
DWORD NtRaiseException ( DWORD dwExceptionCode, DWORD dwExceptionFlags, DWORD nNumberOfArguments,CONST ULONG_PTR *lpArguments);
DWORD RtlRaiseException ( DWORD x);
VOID WINAPI RtlAcquirePebLock(void);
VOID WINAPI RtlReleasePebLock(void);
DWORD WINAPI RtlAdjustPrivilege(DWORD x1,DWORD x2,DWORD x3,DWORD x4);
DWORD WINAPI RtlIntegerToChar(DWORD x1,DWORD x2,DWORD x3,DWORD x4);
DWORD WINAPI RtlSystemTimeToLocalTime(DWORD x1,DWORD x2);
DWORD WINAPI RtlTimeToTimeFields(DWORD x1,DWORD x2);
DWORD WINAPI RtlSetEnvironmentVariable(DWORD x1,PUNICODE_STRING key,PUNICODE_STRING val);
DWORD WINAPI RtlNewSecurityObject(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6);
DWORD WINAPI RtlDeleteSecurityObject(DWORD x1);
BOOLEAN WINAPI RtlTimeToSecondsSince1980(LPFILETIME ft,LPDWORD timeret);
BOOLEAN WINAPI RtlTimeToSecondsSince1970(LPFILETIME ft,LPDWORD timeret);
LPVOID WINAPI RtlNormalizeProcessParams(LPVOID x);
DWORD WINAPI RtlNtStatusToDosError(DWORD error);
BOOLEAN WINAPI RtlGetNtProductType(LPDWORD type);
DWORD WINAPI RtlTimeToElapsedTimeFields( DWORD x1, DWORD x2 );
INT32 WINAPI RtlExtendedLargeIntegerDivide(LARGE_INTEGER dividend, DWORD divisor, LPDWORD rest);
LARGE_INTEGER WINAPI RtlExtendedIntegerMultiply(LARGE_INTEGER factor1,INT32 factor2);
DWORD WINAPI RtlFormatCurrentUserKeyPath(DWORD x);
DWORD WINAPI RtlOpenCurrentUser(DWORD x1, DWORD *x2);
BOOLEAN WINAPI RtlDosPathNameToNtPathName_U( LPWSTR from,PUNICODE_STRING us,DWORD x2,DWORD x3);
DWORD WINAPI RtlCreateEnvironment(DWORD x1,DWORD x2);
DWORD WINAPI RtlDestroyEnvironment(DWORD x);
DWORD WINAPI RtlQueryEnvironmentVariable_U(DWORD x1,PUNICODE_STRING key,PUNICODE_STRING val) ;
#endif

View File

@ -3,6 +3,18 @@
#define NTAPI __stdcall
#ifndef IN
#define IN
#endif
#ifndef OUT
#define OUT
#endif
#ifndef OPTIONAL
#define OPTIONAL
#endif
/* NT lowlevel Strings (handled by Rtl* functions in NTDLL)
* If they are zero terminated, Length does not include the terminating 0.
*/

View File

@ -15,23 +15,6 @@ extern "C" {
typedef DWORD NTSTATUS;
/* Security Ids of NT */
/* Moved to windows.h
typedef struct {
BYTE Value[6];
} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY;
*/
/* Moved to windows.h
typedef struct _SID {
BYTE Revision;
BYTE SubAuthorityCount;
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
DWORD SubAuthority[1];
} SID,*PSID,*PSID;
*/
#define SID_REVISION (1) /* Current revision */
#define SID_MAX_SUB_AUTHORITIES (15) /* current max subauths */
#define SID_RECOMMENDED_SUB_AUTHORITIES (1) /* recommended subauths */
@ -43,16 +26,6 @@ typedef struct _SID {
#define ACL_REVISION1 1
#define ACL_REVISION2 2
/* Moved to windows.h
typedef struct _ACL {
BYTE AclRevision;
BYTE Sbz1;
WORD AclSize;
WORD AceCount;
WORD Sbz2;
} ACL,*LPACL;
*/
/* ACEs, directly starting after an ACL */
typedef struct _ACE_HEADER {
BYTE AceType;
@ -108,33 +81,6 @@ typedef struct _SYSTEM_ALARM_ACE {
DWORD SidStart;
} SYSTEM_ALARM_ACE,*LPSYSTEM_ALARM_ACE;
#define SECURITY_DESCRIPTOR_REVISION 1
#define SECURITY_DESCRIPTOR_REVISION1 1
/*
typedef WORD SECURITY_DESCRIPTOR_CONTROL;
*/
#define SE_OWNER_DEFAULTED 0x0001
#define SE_GROUP_DEFAULTED 0x0002
#define SE_DACL_PRESENT 0x0004
#define SE_DACL_DEFAULTED 0x0008
#define SE_SACL_PRESENT 0x0010
#define SE_SACL_DEFAULTED 0x0020
#define SE_SELF_RELATIVE 0x8000
/* This was moved to windows.h
typedef struct {
BYTE Revision;
BYTE Sbz1;
SECURITY_DESCRIPTOR_CONTROL Control;
PSID Owner;
PSID Group;
LPACL Sacl;
LPACL Dacl;
} SECURITY_DESCRIPTOR,*PSECURITY_DESCRIPTOR,*LPSECURITY_DESCRIPTOR;
*/
typedef enum tagSID_NAME_USE {
SidTypeUser = 1,
SidTypeGroup,

View File

@ -129,7 +129,7 @@ typedef struct tagMESSAGEQUEUE
#define QUEUE_MAGIC 0xD46E80AF
/* Per queue data management methods */
PERQUEUEDATA* PERQDATA_CreateInstance( );
PERQUEUEDATA* PERQDATA_CreateInstance( void );
ULONG PERQDATA_Addref( PERQUEUEDATA* pQData );
ULONG PERQDATA_Release( PERQUEUEDATA* pQData );
HWND32 PERQDATA_GetFocusWnd( PERQUEUEDATA *pQData );

View File

@ -162,10 +162,7 @@ typedef struct
DWORD nLength;
LPVOID lpSecurityDescriptor;
BOOL32 bInheritHandle;
} SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
typedef DWORD SECURITY_INFORMATION;
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
#ifndef _FILETIME_
#define _FILETIME_

View File

@ -358,6 +358,8 @@ typedef enum _TOKEN_INFORMATION_CLASS {
#ifndef _SECURITY_DEFINED
#define _SECURITY_DEFINED
#pragma pack (1)
typedef struct {
BYTE Value[6];
} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY;
@ -381,6 +383,20 @@ typedef struct _ACL {
WORD Sbz2;
} ACL, *PACL;
/* SECURITY_DESCRIPTOR */
#define SECURITY_DESCRIPTOR_REVISION 1
#define SECURITY_DESCRIPTOR_REVISION1 1
#define SE_OWNER_DEFAULTED 0x0001
#define SE_GROUP_DEFAULTED 0x0002
#define SE_DACL_PRESENT 0x0004
#define SE_DACL_DEFAULTED 0x0008
#define SE_SACL_PRESENT 0x0010
#define SE_SACL_DEFAULTED 0x0020
#define SE_SELF_RELATIVE 0x8000
typedef DWORD SECURITY_INFORMATION;
typedef WORD SECURITY_DESCRIPTOR_CONTROL;
/* The security descriptor structure */
@ -394,6 +410,8 @@ typedef struct {
PACL Dacl;
} SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
#define SECURITY_DESCRIPTOR_MIN_LENGTH (sizeof(SECURITY_DESCRIPTOR))
#endif /* _SECURITY_DEFINED */
/*

View File

@ -5,23 +5,9 @@
#define __WINE_WINREG_H
#include "winbase.h"
#include "winnt.h"
/* FIXME: should be in security.h or whereever */
#ifndef READ_CONTROL
#define READ_CONTROL 0x00020000
#endif
#ifndef STANDARD_RIGHTS_READ
#define STANDARD_RIGHTS_READ READ_CONTROL
#endif
#ifndef STANDARD_RIGHTS_WRITE
#define STANDARD_RIGHTS_WRITE READ_CONTROL /* yes, it's right (js) */
#endif
#ifndef STANDARD_RIGHTS_ALL
#define STANDARD_RIGHTS_ALL 0x001f0000
#endif
/* ... */
/*
#define SHELL_ERROR_SUCCESS 0L
#define SHELL_ERROR_BADDB 1L
#define SHELL_ERROR_BADKEY 2L
@ -31,6 +17,7 @@
#define SHELL_ERROR_OUTOFMEMORY 6L
#define SHELL_ERROR_INVALID_PARAMETER 7L
#define SHELL_ERROR_ACCESS_DENIED 8L
*/
#define REG_NONE 0 /* no type */
#define REG_SZ 1 /* string type (ASCII) */

View File

@ -8,7 +8,6 @@
#include "ole.h"
#include "ole2.h"
#include "winerror.h"
#include "windows.h"
#include "wine/obj_base.h"
#include "wine/obj_storage.h"
#include "wine/obj_moniker.h"

View File

@ -92,7 +92,7 @@ type win32
0088 stdcall GetOldestEventLogRecord (long ptr) GetOldestEventLogRecord32
0089 stub GetPrivateObjectSecurity
0090 stdcall GetSecurityDescriptorControl (ptr ptr ptr) GetSecurityDescriptorControl32
0091 stub GetSecurityDescriptorDacl
0091 stdcall GetSecurityDescriptorDacl (ptr ptr ptr ptr) GetSecurityDescriptorDacl
0092 stdcall GetSecurityDescriptorGroup(ptr ptr ptr) GetSecurityDescriptorGroup
0093 stdcall GetSecurityDescriptorLength(ptr) GetSecurityDescriptorLength
0094 stdcall GetSecurityDescriptorOwner(ptr ptr ptr) GetSecurityDescriptorOwner
@ -225,10 +225,10 @@ type win32
0221 stdcall SetFileSecurityW(wstr long ptr) SetFileSecurity32W
0222 stub SetKernelObjectSecurity
0223 stub SetPrivateObjectSecurity
0224 stdcall SetSecurityDescriptorDacl(ptr long ptr long) RtlSetDaclSecurityDescriptor
0225 stub SetSecurityDescriptorGroup
0226 stub SetSecurityDescriptorOwner
0227 stub SetSecurityDescriptorSacl
0224 stdcall SetSecurityDescriptorDacl(ptr long ptr long) SetSecurityDescriptorDacl
0225 stdcall SetSecurityDescriptorGroup (ptr ptr long) SetSecurityDescriptorGroup
0226 stdcall SetSecurityDescriptorOwner (ptr ptr long) SetSecurityDescriptorOwner
0227 stdcall SetSecurityDescriptorSacl(ptr long ptr long) SetSecurityDescriptorSacl
0228 stub SetServiceBits
0229 stub SetServiceObjectSecurity
0230 stdcall SetServiceStatus(long long)SetServiceStatus