Alexandre Julliard | f0cbfa0 | 1997-02-15 14:29:56 +0000 | [diff] [blame] | 1 | #ifndef __WINE_NTDLL_H |
| 2 | #define __WINE_NTDLL_H |
| 3 | /* ntdll.h |
| 4 | * |
| 5 | * contains NT internal defines that don't show on the Win32 API level |
| 6 | * |
| 7 | * Copyright 1997 Marcus Meissner |
| 8 | */ |
| 9 | |
Michael Veksler | 17822f4 | 1999-02-09 15:46:25 +0000 | [diff] [blame] | 10 | #include "winbase.h" |
| 11 | |
Alexandre Julliard | f0cbfa0 | 1997-02-15 14:29:56 +0000 | [diff] [blame] | 12 | #ifdef __cplusplus |
| 13 | extern "C" { |
| 14 | #endif |
| 15 | |
Marcus Meissner | 51505b1 | 1998-11-01 14:00:21 +0000 | [diff] [blame] | 16 | typedef DWORD NTSTATUS; |
| 17 | |
Alexandre Julliard | f0cbfa0 | 1997-02-15 14:29:56 +0000 | [diff] [blame] | 18 | #define SID_REVISION (1) /* Current revision */ |
| 19 | #define SID_MAX_SUB_AUTHORITIES (15) /* current max subauths */ |
| 20 | #define SID_RECOMMENDED_SUB_AUTHORITIES (1) /* recommended subauths */ |
| 21 | |
| 22 | /* ACLs of NT */ |
| 23 | |
| 24 | #define ACL_REVISION 2 |
| 25 | |
| 26 | #define ACL_REVISION1 1 |
| 27 | #define ACL_REVISION2 2 |
| 28 | |
Alexandre Julliard | f0cbfa0 | 1997-02-15 14:29:56 +0000 | [diff] [blame] | 29 | /* ACEs, directly starting after an ACL */ |
| 30 | typedef struct _ACE_HEADER { |
| 31 | BYTE AceType; |
| 32 | BYTE AceFlags; |
| 33 | WORD AceSize; |
| 34 | } ACE_HEADER,*LPACE_HEADER; |
| 35 | |
| 36 | /* AceType */ |
| 37 | #define ACCESS_ALLOWED_ACE_TYPE 0 |
| 38 | #define ACCESS_DENIED_ACE_TYPE 1 |
| 39 | #define SYSTEM_AUDIT_ACE_TYPE 2 |
| 40 | #define SYSTEM_ALARM_ACE_TYPE 3 |
| 41 | |
| 42 | /* inherit AceFlags */ |
| 43 | #define OBJECT_INHERIT_ACE 0x01 |
| 44 | #define CONTAINER_INHERIT_ACE 0x02 |
| 45 | #define NO_PROPAGATE_INHERIT_ACE 0x04 |
| 46 | #define INHERIT_ONLY_ACE 0x08 |
| 47 | #define VALID_INHERIT_FLAGS 0x0F |
| 48 | |
| 49 | /* AceFlags mask for what events we (should) audit */ |
| 50 | #define SUCCESSFUL_ACCESS_ACE_FLAG 0x40 |
| 51 | #define FAILED_ACCESS_ACE_FLAG 0x80 |
| 52 | |
| 53 | /* different ACEs depending on AceType |
| 54 | * SidStart marks the begin of a SID |
| 55 | * so the thing finally looks like this: |
| 56 | * 0: ACE_HEADER |
| 57 | * 4: ACCESS_MASK |
| 58 | * 8... : SID |
| 59 | */ |
| 60 | typedef struct _ACCESS_ALLOWED_ACE { |
| 61 | ACE_HEADER Header; |
| 62 | DWORD Mask; |
| 63 | DWORD SidStart; |
| 64 | } ACCESS_ALLOWED_ACE,*LPACCESS_ALLOWED_ACE; |
| 65 | |
| 66 | typedef struct _ACCESS_DENIED_ACE { |
| 67 | ACE_HEADER Header; |
| 68 | DWORD Mask; |
| 69 | DWORD SidStart; |
| 70 | } ACCESS_DENIED_ACE,*LPACCESS_DENIED_ACE; |
| 71 | |
| 72 | typedef struct _SYSTEM_AUDIT_ACE { |
| 73 | ACE_HEADER Header; |
| 74 | DWORD Mask; |
| 75 | DWORD SidStart; |
| 76 | } SYSTEM_AUDIT_ACE,*LPSYSTEM_AUDIT_ACE; |
| 77 | |
| 78 | typedef struct _SYSTEM_ALARM_ACE { |
| 79 | ACE_HEADER Header; |
| 80 | DWORD Mask; |
| 81 | DWORD SidStart; |
| 82 | } SYSTEM_ALARM_ACE,*LPSYSTEM_ALARM_ACE; |
| 83 | |
Alexandre Julliard | e658d82 | 1997-11-30 17:45:40 +0000 | [diff] [blame] | 84 | typedef enum tagSID_NAME_USE { |
| 85 | SidTypeUser = 1, |
| 86 | SidTypeGroup, |
| 87 | SidTypeDomain, |
| 88 | SidTypeAlias, |
| 89 | SidTypeWellKnownGroup, |
| 90 | SidTypeDeletedAccount, |
| 91 | SidTypeInvalid, |
| 92 | SidTypeUnknown |
Juergen Schmied | cdbdab7 | 1999-02-12 13:44:38 +0000 | [diff] [blame] | 93 | } SID_NAME_USE,*PSID_NAME_USE; |
Alexandre Julliard | f0cbfa0 | 1997-02-15 14:29:56 +0000 | [diff] [blame] | 94 | |
Alex Korobka | 6479f0f | 1999-01-31 09:24:44 +0000 | [diff] [blame] | 95 | typedef struct _RTL_RWLOCK { |
| 96 | CRITICAL_SECTION rtlCS; |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 97 | HANDLE hSharedReleaseSemaphore; |
| 98 | UINT uSharedWaiters; |
| 99 | HANDLE hExclusiveReleaseSemaphore; |
| 100 | UINT uExclusiveWaiters; |
| 101 | INT iNumberActive; |
| 102 | HANDLE hOwningThreadId; |
Alex Korobka | 6479f0f | 1999-01-31 09:24:44 +0000 | [diff] [blame] | 103 | DWORD dwTimeoutBoost; |
| 104 | PVOID pDebugInfo; |
| 105 | } RTL_RWLOCK, *LPRTL_RWLOCK; |
| 106 | |
| 107 | VOID WINAPI RtlInitializeResource(LPRTL_RWLOCK); |
| 108 | VOID WINAPI RtlDeleteResource(LPRTL_RWLOCK); |
| 109 | BYTE WINAPI RtlAcquireResourceExclusive(LPRTL_RWLOCK, BYTE fWait); |
| 110 | BYTE WINAPI RtlAcquireResourceShared(LPRTL_RWLOCK, BYTE fWait); |
| 111 | VOID WINAPI RtlReleaseResource(LPRTL_RWLOCK); |
| 112 | VOID WINAPI RtlDumpResource(LPRTL_RWLOCK); |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 113 | |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 114 | BOOL WINAPI IsValidSid(PSID); |
| 115 | BOOL WINAPI EqualSid(PSID,PSID); |
| 116 | BOOL WINAPI EqualPrefixSid(PSID,PSID); |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 117 | DWORD WINAPI GetSidLengthRequired(BYTE); |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 118 | BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD, |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 119 | DWORD,DWORD,DWORD,DWORD,DWORD,DWORD, |
Juergen Schmied | cdbdab7 | 1999-02-12 13:44:38 +0000 | [diff] [blame] | 120 | DWORD,PSID*); |
| 121 | VOID* WINAPI FreeSid(PSID); |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 122 | BOOL WINAPI InitializeSecurityDescriptor(SECURITY_DESCRIPTOR*,DWORD); |
| 123 | BOOL WINAPI InitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE); |
Juergen Schmied | cdbdab7 | 1999-02-12 13:44:38 +0000 | [diff] [blame] | 124 | DWORD* WINAPI GetSidSubAuthority(PSID,DWORD); |
| 125 | BYTE * WINAPI GetSidSubAuthorityCount(PSID); |
| 126 | DWORD WINAPI GetLengthSid(PSID); |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 127 | BOOL WINAPI CopySid(DWORD,PSID,PSID); |
| 128 | BOOL WINAPI LookupAccountSidA(LPCSTR,PSID,LPCSTR,LPDWORD,LPCSTR,LPDWORD, |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 129 | PSID_NAME_USE); |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 130 | BOOL WINAPI LookupAccountSidW(LPCWSTR,PSID,LPCWSTR,LPDWORD,LPCWSTR,LPDWORD, |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 131 | PSID_NAME_USE); |
Juergen Schmied | cdbdab7 | 1999-02-12 13:44:38 +0000 | [diff] [blame] | 132 | PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID); |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 133 | INT WINAPI AccessResource(HMODULE,HRSRC); |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 134 | |
Alexandre Julliard | f0cbfa0 | 1997-02-15 14:29:56 +0000 | [diff] [blame] | 135 | #ifdef __cplusplus |
| 136 | } |
| 137 | #endif |
| 138 | |
| 139 | #endif /* __WINE_NTDLL_H */ |