ReactOS  0.4.15-dev-5142-g967f5b9
authz.c
Go to the documentation of this file.
1 /*
2  * ReactOS Authorization Framework
3  * Copyright (C) 2005 - 2006 ReactOS Team
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 /*
20  * PROJECT: ReactOS Authorization Framework
21  * FILE: lib/authz/authz.c
22  * PURPOSE: Authorization Framework
23  * PROGRAMMER: Thomas Weidenmueller <w3seek@reactos.com>
24  *
25  * UPDATE HISTORY:
26  * 09/30/2005 Created
27  */
28 
29 #include "precomp.h"
30 
31 #define NDEBUG
32 #include <debug.h>
33 
35 
36 /*
37  * @unimplemented
38  */
40 BOOL
41 WINAPI
43  IN AUTHZ_CLIENT_CONTEXT_HANDLE AuthzClientContext,
45  IN AUTHZ_AUDIT_INFO_HANDLE AuditInfo,
46  IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
47  IN PSECURITY_DESCRIPTOR* OptionalSecurityDescriptorArray,
48  IN DWORD OptionalSecurityDescriptorCount OPTIONAL,
49  IN OUT PAUTHZ_ACCESS_REPLY pReply,
51 {
53  return FALSE;
54 }
55 
56 
57 /*
58  * @unimplemented
59  */
61 BOOL
62 WINAPI
65  IN DWORD SidCount,
66  IN PSID_AND_ATTRIBUTES RestrictedSids,
67  IN DWORD RestrictedSidCount,
68  OUT PAUTHZ_CLIENT_CONTEXT_HANDLE pNewClientContext)
69 {
71  return FALSE;
72 }
73 
74 
75 /*
76  * @unimplemented
77  */
79 BOOL
80 WINAPI
84  IN AUTHZ_AUDIT_EVENT_HANDLE AuditInfo,
85  OUT PAUTHZ_ACCESS_REPLY pReply)
86 {
88  return FALSE;
89 }
90 
91 
92 /*
93  * @unimplemented
94  */
96 BOOL
97 WINAPI
100  OUT PDWORD pdwCount,
101  IN OUT PDWORD pdwLength)
102 {
104  return FALSE;
105 }
106 
107 
108 /*
109  * @unimplemented
110  */
111 AUTHZAPI
112 BOOL
113 WINAPI
115 {
117  return FALSE;
118 }
119 
120 
121 /*
122  * @unimplemented
123  */
124 AUTHZAPI
125 BOOL
126 WINAPI
128 {
130  return FALSE;
131 }
132 
133 
134 /*
135  * @unimplemented
136  */
137 AUTHZAPI
138 BOOL
139 WINAPI
141  IN AUTHZ_CLIENT_CONTEXT_HANDLE AuthzHandle,
142  IN PLARGE_INTEGER ExpirationTime,
143  IN LUID Identifier,
144  IN PVOID DynamicGroupArgs,
145  OUT PAUTHZ_CLIENT_CONTEXT_HANDLE phNewAuthzHandle)
146 {
148  return FALSE;
149 }
150 
151 
152 /*
153  * @unimplemented
154  */
155 AUTHZAPI
156 BOOL
157 WINAPI
160  IN AUTHZ_RESOURCE_MANAGER_HANDLE AuthzResourceManager,
161  IN PLARGE_INTEGER pExpirationTime,
162  IN LUID Identifier,
163  IN PVOID DynamicGroupArgs,
164  OUT PAUTHZ_CLIENT_CONTEXT_HANDLE pAuthzClientContext)
165 {
167  return FALSE;
168 }
169 
170 
171 /*
172  * @unimplemented
173  */
174 AUTHZAPI
175 BOOL
176 WINAPIV
178  IN AUTHZ_AUDIT_EVENT_TYPE_HANDLE hAuditEventType,
179  IN PWSTR szOperationType,
180  IN PWSTR szObjectType,
181  IN PWSTR szObjectName,
182  IN PWSTR szAdditionalInfo,
183  OUT PAUTHZ_AUDIT_EVENT_HANDLE phAuditEvent,
184  IN DWORD dwAdditionalParamCount,
185  ...)
186 {
188  return FALSE;
189 }
190 
191 
192 /*
193  * @unimplemented
194  */
195 AUTHZAPI
196 BOOL
197 WINAPIV
199  IN AUTHZ_AUDIT_EVENT_TYPE_HANDLE hAuditEventType,
200  IN PWSTR szOperationType,
201  IN PWSTR szObjectType,
202  IN PWSTR szObjectName,
203  IN PWSTR szAdditionalInfo,
204  IN PWSTR szAdditionalInfo2,
205  OUT PAUTHZ_AUDIT_EVENT_HANDLE phAuditEvent,
206  IN DWORD dwAdditionalParameterCount,
207  ...)
208 {
210  return FALSE;
211 }
212 
213 
214 /*
215  * @unimplemented
216  */
217 AUTHZAPI
218 BOOL
219 WINAPI
222 {
224  return FALSE;
225 }
226 
227 
228 /*
229  * @unimplemented
230  */
231 AUTHZAPI
232 BOOL
233 WINAPI
235  IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
237  IN AUTHZ_AUDIT_EVENT_HANDLE hAuditEvent,
238  IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
239  IN PSECURITY_DESCRIPTOR* SecurityDescriptorArray,
240  IN DWORD SecurityDescriptorCount,
241  OUT PAUTHZ_ACCESS_REPLY pReply)
242 {
244  return FALSE;
245 }
246 
247 
248 /*
249  * @unimplemented
250  */
251 AUTHZAPI
252 BOOL
253 WINAPI
255  IN PCWSTR szEventSourceName,
257 {
259  return FALSE;
260 }
261 
262 
263 /*
264  * @unimplemented
265  */
266 AUTHZAPI
267 BOOL
268 WINAPIV
271  IN DWORD dwAuditId,
272  IN PSID pUserSid OPTIONAL,
273  IN DWORD dwCount,
274  ...)
275 {
277  return FALSE;
278 }
279 
280 
281 /*
282  * @unimplemented
283  */
284 AUTHZAPI
285 BOOL
286 WINAPI
289  IN DWORD dwAuditId,
290  IN PSID pUserSid OPTIONAL,
291  IN PAUDIT_PARAMS pParams)
292 {
294  return FALSE;
295 }
296 
297 
298 /*
299  * @unimplemented
300  */
301 AUTHZAPI
302 BOOL
303 WINAPI
305  IN PWSTR szEventSourceName)
306 {
308  return FALSE;
309 }
310 
311 
312 /*
313  * @unimplemented
314  */
315 AUTHZAPI
316 BOOL
317 WINAPI
320 {
322  return FALSE;
323 }
324 
325 
326 BOOL WINAPI
328  IN DWORD dwReason,
330 {
331  switch (dwReason)
332  {
333  case DLL_PROCESS_ATTACH:
334  hDllInstance = hinstDLL;
335  break;
336 
337  case DLL_THREAD_ATTACH:
338  case DLL_THREAD_DETACH:
339  case DLL_PROCESS_DETACH:
340  break;
341  }
342  return TRUE;
343 }
344 
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define IN
Definition: typedefs.h:39
AUTHZAPI BOOL WINAPIV AuthzInitializeObjectAccessAuditEvent(IN DWORD Flags, IN AUTHZ_AUDIT_EVENT_TYPE_HANDLE hAuditEventType, IN PWSTR szOperationType, IN PWSTR szObjectType, IN PWSTR szObjectName, IN PWSTR szAdditionalInfo, OUT PAUTHZ_AUDIT_EVENT_HANDLE phAuditEvent, IN DWORD dwAdditionalParamCount,...)
Definition: authz.c:177
AUTHZAPI BOOL WINAPI AuthzAccessCheck(IN DWORD flags, IN AUTHZ_CLIENT_CONTEXT_HANDLE AuthzClientContext, IN PAUTHZ_ACCESS_REQUEST pRequest, IN AUTHZ_AUDIT_INFO_HANDLE AuditInfo, IN PSECURITY_DESCRIPTOR pSecurityDescriptor, IN PSECURITY_DESCRIPTOR *OptionalSecurityDescriptorArray, IN DWORD OptionalSecurityDescriptorCount OPTIONAL, IN OUT PAUTHZ_ACCESS_REPLY pReply, OUT PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE pAuthzHandle)
Definition: authz.c:42
#define TRUE
Definition: types.h:120
AUTHZAPI BOOL WINAPI AuthzInitializeContextFromAuthzContext(IN DWORD flags, IN AUTHZ_CLIENT_CONTEXT_HANDLE AuthzHandle, IN PLARGE_INTEGER ExpirationTime, IN LUID Identifier, IN PVOID DynamicGroupArgs, OUT PAUTHZ_CLIENT_CONTEXT_HANDLE phNewAuthzHandle)
Definition: authz.c:140
#define DLL_THREAD_ATTACH
Definition: compat.h:132
uint16_t * PWSTR
Definition: typedefs.h:56
FxRequest * pRequest
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
AUTHZAPI BOOL WINAPI AuthzFreeAuditEvent(IN AUTHZ_AUDIT_EVENT_HANDLE pAuditEventInfo)
Definition: authz.c:114
AUTHZAPI BOOL WINAPI AuthzInitializeContextFromToken(IN DWORD Flags, IN HANDLE TokenHandle, IN AUTHZ_RESOURCE_MANAGER_HANDLE AuthzResourceManager, IN PLARGE_INTEGER pExpirationTime, IN LUID Identifier, IN PVOID DynamicGroupArgs, OUT PAUTHZ_CLIENT_CONTEXT_HANDLE pAuthzClientContext)
Definition: authz.c:158
AUTHZAPI BOOL WINAPI AuthzRegisterSecurityEventSource(IN DWORD dwFlags, IN PCWSTR szEventSourceName, IN PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE phEventProvider)
Definition: authz.c:254
AUTHZAPI BOOL WINAPI AuthzAddSidsToContext(IN AUTHZ_CLIENT_CONTEXT_HANDLE OrigClientContext, IN PSID_AND_ATTRIBUTES Sids, IN DWORD SidCount, IN PSID_AND_ATTRIBUTES RestrictedSids, IN DWORD RestrictedSidCount, OUT PAUTHZ_CLIENT_CONTEXT_HANDLE pNewClientContext)
Definition: authz.c:63
#define DLL_THREAD_DETACH
Definition: compat.h:133
static IN DWORD IN LPVOID lpvReserved
AUTHZAPI BOOL WINAPI AuthzCachedAccessCheck(IN DWORD Flags, IN AUTHZ_ACCESS_CHECK_RESULTS_HANDLE AuthzHandle, IN PAUTHZ_ACCESS_REQUEST pRequest, IN AUTHZ_AUDIT_EVENT_HANDLE AuditInfo, OUT PAUTHZ_ACCESS_REPLY pReply)
Definition: authz.c:81
DWORD dwReason
Definition: misc.cpp:154
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
AUTHZAPI BOOL WINAPI AuthzOpenObjectAudit(IN DWORD Flags, IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext, IN PAUTHZ_ACCESS_REQUEST pRequest, IN AUTHZ_AUDIT_EVENT_HANDLE hAuditEvent, IN PSECURITY_DESCRIPTOR pSecurityDescriptor, IN PSECURITY_DESCRIPTOR *SecurityDescriptorArray, IN DWORD SecurityDescriptorCount, OUT PAUTHZ_ACCESS_REPLY pReply)
Definition: authz.c:234
_In_ ACCESS_MASK _In_ ULONG _Out_ PHANDLE TokenHandle
Definition: psfuncs.h:715
Definition: bufpool.h:45
AUTHZAPI BOOL WINAPIV AuthzInitializeObjectAccessAuditEvent2(IN DWORD Flags, IN AUTHZ_AUDIT_EVENT_TYPE_HANDLE hAuditEventType, IN PWSTR szOperationType, IN PWSTR szObjectType, IN PWSTR szObjectName, IN PWSTR szAdditionalInfo, IN PWSTR szAdditionalInfo2, OUT PAUTHZ_AUDIT_EVENT_HANDLE phAuditEvent, IN DWORD dwAdditionalParameterCount,...)
Definition: authz.c:198
AUTHZAPI BOOL WINAPI AuthzFreeHandle(IN AUTHZ_ACCESS_CHECK_RESULTS_HANDLE AuthzHandle)
Definition: authz.c:127
AUTHZAPI BOOL WINAPI AuthzEnumerateSecurityEventSources(IN DWORD dwFlags, OUT PAUTHZ_SOURCE_SCHEMA_REGISTRATION Buffer, OUT PDWORD pdwCount, IN OUT PDWORD pdwLength)
Definition: authz.c:98
#define DLL_PROCESS_DETACH
Definition: compat.h:130
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
AUTHZAPI BOOL WINAPI AuthzUnregisterSecurityEventSource(IN DWORD dwFlags, IN OUT PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE phEventProvider)
Definition: authz.c:318
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL WINAPI DllMain(IN HINSTANCE hinstDLL, IN DWORD dwReason, IN LPVOID lpvReserved)
Definition: authz.c:327
GLbitfield flags
Definition: glext.h:7161
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HINSTANCE hDllInstance
Definition: authz.c:34
#define WINAPIV
Definition: sdbpapi.h:64
AUTHZAPI BOOL WINAPI AuthzUninstallSecurityEventSource(IN DWORD dwFlags, IN PWSTR szEventSourceName)
Definition: authz.c:304
AUTHZAPI BOOL WINAPI AuthzReportSecurityEventFromParams(IN DWORD dwFlags, IN AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE hEventProvider, IN DWORD dwAuditId, IN PSID pUserSid OPTIONAL, IN PAUDIT_PARAMS pParams)
Definition: authz.c:287
DWORD * PDWORD
Definition: pedump.c:68
AUTHZAPI BOOL WINAPI AuthzInstallSecurityEventSource(IN DWORD dwFlags, IN PAUTHZ_SOURCE_SCHEMA_REGISTRATION pRegistration)
Definition: authz.c:220
#define OUT
Definition: typedefs.h:40
AUTHZAPI BOOL WINAPIV AuthzReportSecurityEvent(IN DWORD dwFlags, IN AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE hEventProvider, IN DWORD dwAuditId, IN PSID pUserSid OPTIONAL, IN DWORD dwCount,...)
Definition: authz.c:269
#define UNIMPLEMENTED
Definition: debug.h:115
#define AUTHZAPI
Definition: authz.h:21
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68