partial implementation of AuthzInitializeContextFromSid(), AuthzGetInformationFromCon...
[reactos.git] / reactos / lib / authz / precomp.h
1 #ifndef __AUTHZ_PRECOMP_H
2 #define __AUTHZ_PRECOMP_H
3
4 #define _AUTHZ_
5 #include <windows.h>
6 #include <authz.h>
7
8 ULONG DbgPrint(PCH Format,...);
9 #ifndef DPRINT1
10 #define DPRINT1 DbgPrint
11 #endif
12
13 #ifndef UNIMPLEMENTED
14 #define UNIMPLEMENTED DbgPrint("AUTHZ.DLL: %s is UNIMPLEMENTED!\n", __FUNCTION__)
15 #endif
16
17 #if DBG
18
19 #define RESMAN_TAG 0x89ABCDEF
20 #define CLIENTCTX_TAG 0x789ABCDE
21 #define VALIDATE_RESMAN_HANDLE(handle) ASSERT(((PAUTHZ_RESMAN)handle)->Tag == RESMAN_TAG)
22 #define VALIDATE_CLIENTCTX_HANDLE(handle) ASSERT(((PAUTHZ_CLIENT_CONTEXT)handle)->Tag == CLIENTCTX_TAG)
23 #ifndef ASSERT
24 #define ASSERT(cond) if (!(cond)) { DbgPrint("%s:%i: ASSERTION %s failed!\n", __FILE__, __LINE__, #cond ); }
25 #endif
26
27 #else
28
29 #define VALIDATE_RESMAN_HANDLE(handle)
30 #define VALIDATE_CLIENTCTX_HANDLE(handle)
31 #ifndef ASSERT
32 #define ASSERT(cond)
33 #endif
34
35 #endif
36
37 typedef struct _AUTHZ_RESMAN
38 {
39 #if DBG
40 DWORD Tag;
41 #endif
42
43 PFN_AUTHZ_DYNAMIC_ACCESS_CHECK pfnAccessCheck;
44 PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS pfnComputeDynamicGroups;
45 PFN_AUTHZ_FREE_DYNAMIC_GROUPS pfnFreeDynamicGroups;
46
47 DWORD flags;
48 PSID UserSid;
49 LUID AuthenticationId;
50
51 WCHAR ResourceManagerName[1];
52 } AUTHZ_RESMAN, *PAUTHZ_RESMAN;
53
54 typedef struct _AUTHZ_CLIENT_CONTEXT
55 {
56 #if DBG
57 DWORD Tag;
58 #endif
59
60 PSID UserSid;
61
62 AUTHZ_RESOURCE_MANAGER_HANDLE AuthzResourceManager;
63 LUID Luid;
64 LARGE_INTEGER ExpirationTime;
65 AUTHZ_CLIENT_CONTEXT_HANDLE ServerContext;
66 PVOID DynamicGroupArgs;
67 } AUTHZ_CLIENT_CONTEXT, *PAUTHZ_CLIENT_CONTEXT;
68
69 #endif /* __AUTHZ_PRECOMP_H */
70 /* EOF */