5 * contains NT internal defines that don't show on the Win32 API level
7 * Copyright 1997 Marcus Meissner
16 typedef DWORD NTSTATUS;
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 */
24 #define ACL_REVISION 2
26 #define ACL_REVISION1 1
27 #define ACL_REVISION2 2
29 /* ACEs, directly starting after an ACL */
30 typedef struct _ACE_HEADER {
34 } ACE_HEADER,*LPACE_HEADER;
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
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
49 /* AceFlags mask for what events we (should) audit */
50 #define SUCCESSFUL_ACCESS_ACE_FLAG 0x40
51 #define FAILED_ACCESS_ACE_FLAG 0x80
53 /* different ACEs depending on AceType
54 * SidStart marks the begin of a SID
55 * so the thing finally looks like this:
60 typedef struct _ACCESS_ALLOWED_ACE {
64 } ACCESS_ALLOWED_ACE,*LPACCESS_ALLOWED_ACE;
66 typedef struct _ACCESS_DENIED_ACE {
70 } ACCESS_DENIED_ACE,*LPACCESS_DENIED_ACE;
72 typedef struct _SYSTEM_AUDIT_ACE {
76 } SYSTEM_AUDIT_ACE,*LPSYSTEM_AUDIT_ACE;
78 typedef struct _SYSTEM_ALARM_ACE {
82 } SYSTEM_ALARM_ACE,*LPSYSTEM_ALARM_ACE;
84 typedef enum tagSID_NAME_USE {
89 SidTypeWellKnownGroup,
90 SidTypeDeletedAccount,
93 } SID_NAME_USE,*PSID_NAME_USE;
95 typedef struct _RTL_RWLOCK {
96 CRITICAL_SECTION rtlCS;
97 HANDLE hSharedReleaseSemaphore;
99 HANDLE hExclusiveReleaseSemaphore;
100 UINT uExclusiveWaiters;
102 HANDLE hOwningThreadId;
103 DWORD dwTimeoutBoost;
105 } RTL_RWLOCK, *LPRTL_RWLOCK;
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);
114 BOOL WINAPI IsValidSid(PSID);
115 BOOL WINAPI EqualSid(PSID,PSID);
116 BOOL WINAPI EqualPrefixSid(PSID,PSID);
117 DWORD WINAPI GetSidLengthRequired(BYTE);
118 BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,
119 DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,
121 VOID* WINAPI FreeSid(PSID);
122 BOOL WINAPI InitializeSecurityDescriptor(SECURITY_DESCRIPTOR*,DWORD);
123 BOOL WINAPI InitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
124 DWORD* WINAPI GetSidSubAuthority(PSID,DWORD);
125 BYTE * WINAPI GetSidSubAuthorityCount(PSID);
126 DWORD WINAPI GetLengthSid(PSID);
127 BOOL WINAPI CopySid(DWORD,PSID,PSID);
128 BOOL WINAPI LookupAccountSidA(LPCSTR,PSID,LPCSTR,LPDWORD,LPCSTR,LPDWORD,
130 BOOL WINAPI LookupAccountSidW(LPCWSTR,PSID,LPCWSTR,LPDWORD,LPCWSTR,LPDWORD,
132 PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID);
133 INT WINAPI AccessResource(HMODULE,HRSRC);
139 #endif /* __WINE_NTDLL_H */