ReactOS  0.4.15-dev-1070-ge1a01de
authz.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _AUTHZ_ACCESS_REQUEST
 
struct  _AUTHZ_ACCESS_REPLY
 
struct  _AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET
 
struct  _AUTHZ_SOURCE_SCHEMA_REGISTRATION
 

Macros

#define AUTHZAPI   DECLSPEC_IMPORT
 
#define AUTHZ_ACCESS_CHECK_NO_DEEP_COPY_SD   0x1
 
#define AUTHZ_GENERATE_SUCCESS_AUDIT   0x1
 
#define AUTHZ_GENERATE_FAILURE_AUDIT   0x2
 
#define AUTHZ_SKIP_TOKEN_GROUPS   0x2
 
#define AUTHZ_REQUIRE_S4U_LOGON   0x4
 
#define AUTHZ_NO_SUCCESS_AUDIT   0x1
 
#define AUTHZ_NO_FAILURE_AUDIT   0x2
 
#define AUTHZ_NO_ALLOC_STRINGS   0x4
 
#define AUTHZ_RM_FLAG_NO_AUDIT   0x1
 
#define AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION   0x2
 

Typedefs

typedef HANDLE AUTHZ_CLIENT_CONTEXT_HANDLE
 
typedef HANDLEPAUTHZ_CLIENT_CONTEXT_HANDLE
 
typedef HANDLE AUTHZ_AUDIT_INFO_HANDLE
 
typedef HANDLEPAUTHZ_AUDIT_INFO_HANDLE
 
typedef HANDLE AUTHZ_AUDIT_EVENT_HANDLE
 
typedef HANDLEPAUTHZ_AUDIT_EVENT_HANDLE
 
typedef HANDLE AUTHZ_AUDIT_EVENT_TYPE_HANDLE
 
typedef HANDLEPAUTHZ_AUDIT_EVENT_TYPE_HANDLE
 
typedef HANDLE AUTHZ_ACCESS_CHECK_RESULTS_HANDLE
 
typedef HANDLEPAUTHZ_ACCESS_CHECK_RESULTS_HANDLE
 
typedef HANDLE AUTHZ_RESOURCE_MANAGER_HANDLE
 
typedef HANDLEPAUTHZ_RESOURCE_MANAGER_HANDLE
 
typedef HANDLE AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE
 
typedef HANDLEPAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE
 
typedef PVOID PAUDIT_PARAMS
 
typedef enum _AUTHZ_CONTEXT_INFORMATION_CLASS AUTHZ_CONTEXT_INFORMATION_CLASS
 
typedef enum _AUTHZ_CONTEXT_INFORMATION_CLASSPAUTHZ_CONTEXT_INFORMATION_CLASS
 
typedef struct _AUTHZ_ACCESS_REQUEST AUTHZ_ACCESS_REQUEST
 
typedef struct _AUTHZ_ACCESS_REQUESTPAUTHZ_ACCESS_REQUEST
 
typedef struct _AUTHZ_ACCESS_REPLY AUTHZ_ACCESS_REPLY
 
typedef struct _AUTHZ_ACCESS_REPLYPAUTHZ_ACCESS_REPLY
 
typedef struct _AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET
 
typedef struct _AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSETPAUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET
 
typedef struct _AUTHZ_SOURCE_SCHEMA_REGISTRATION AUTHZ_SOURCE_SCHEMA_REGISTRATION
 
typedef struct _AUTHZ_SOURCE_SCHEMA_REGISTRATIONPAUTHZ_SOURCE_SCHEMA_REGISTRATION
 
typedef BOOL(CALLBACKPFN_AUTHZ_DYNAMIC_ACCESS_CHECK) (IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext, IN PACE_HEADER pAce, IN PVOID pArgs OPTIONAL, IN OUT PBOOL pbAceApplicable)
 
typedef BOOL(CALLBACKPFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS) (IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext, IN PVOID Args, OUT PSID_AND_ATTRIBUTES *pSidAttrArray, OUT PDWORD pSidCount, OUT PSID_AND_ATTRIBUTES *pRestrictedSidAttrArray, OUT PDWORD pRestrictedSidCount)
 
typedef VOID(CALLBACKPFN_AUTHZ_FREE_DYNAMIC_GROUPS) (IN PSID_AND_ATTRIBUTES pSidAttrArray)
 

Enumerations

enum  _AUTHZ_CONTEXT_INFORMATION_CLASS {
  AuthzContextInfoUserSid = 1, AuthzContextInfoGroupsSids, AuthzContextInfoRestrictedSids, AuthzContextInfoPrivileges,
  AuthzContextInfoExpirationTime, AuthzContextInfoServerContext, AuthzContextInfoIdentifier, AuthzContextInfoSource,
  AuthzContextInfoAll, AuthzContextInfoAuthenticationId
}
 

Functions

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)
 
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)
 
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)
 
AUTHZAPI BOOL WINAPI AuthzEnumerateSecurityEventSources (IN DWORD dwFlags, OUT PAUTHZ_SOURCE_SCHEMA_REGISTRATION Buffer, OUT PDWORD pdwCount, IN OUT PDWORD pdwLength)
 
AUTHZAPI BOOL WINAPI AuthzFreeAuditEvent (IN AUTHZ_AUDIT_EVENT_HANDLE pAuditEventInfo)
 
AUTHZAPI BOOL WINAPI AuthzFreeContext (IN AUTHZ_CLIENT_CONTEXT_HANDLE AuthzClientContext)
 
AUTHZAPI BOOL WINAPI AuthzFreeHandle (IN AUTHZ_ACCESS_CHECK_RESULTS_HANDLE AuthzHandle)
 
AUTHZAPI BOOL WINAPI AuthzFreeResourceManager (IN AUTHZ_RESOURCE_MANAGER_HANDLE AuthzResourceManager)
 
AUTHZAPI BOOL WINAPI AuthzGetInformationFromContext (IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext, IN AUTHZ_CONTEXT_INFORMATION_CLASS InfoClass, IN DWORD BufferSize, OUT PDWORD pSizeRequired, OUT PVOID Buffer)
 
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)
 
AUTHZAPI BOOL WINAPI AuthzInitializeContextFromSid (IN DWORD Flags, IN PSID UserSid, IN AUTHZ_RESOURCE_MANAGER_HANDLE AuthzResourceManager, IN PLARGE_INTEGER pExpirationTime, IN LUID Identifier, IN PVOID DynamicGroupArgs, OUT PAUTHZ_CLIENT_CONTEXT_HANDLE pAuthzClientContext)
 
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)
 
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 dwAdditionalParameterCount,...)
 
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,...)
 
AUTHZAPI BOOL WINAPI AuthzInitializeResourceManager (IN DWORD flags, IN PFN_AUTHZ_DYNAMIC_ACCESS_CHECK pfnAccessCheck, IN PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS pfnComputeDynamicGroups, IN PFN_AUTHZ_FREE_DYNAMIC_GROUPS pfnFreeDynamicGroups, IN PCWSTR ResourceManagerName, IN PAUTHZ_RESOURCE_MANAGER_HANDLE pAuthzResourceManager)
 
AUTHZAPI BOOL WINAPI AuthzInstallSecurityEventSource (IN DWORD dwFlags, IN PAUTHZ_SOURCE_SCHEMA_REGISTRATION pRegistration)
 
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)
 
AUTHZAPI BOOL WINAPI AuthzRegisterSecurityEventSource (IN DWORD dwFlags, IN PCWSTR szEventSourceName, IN PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE phEventProvider)
 
AUTHZAPI BOOL WINAPIV AuthzReportSecurityEvent (IN DWORD dwFlags, IN AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE hEventProvider, IN DWORD dwAuditId, IN PSID pUserSid OPTIONAL, IN DWORD dwCount,...)
 
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)
 
AUTHZAPI BOOL WINAPI AuthzUninstallSecurityEventSource (IN DWORD dwFlags, IN PWSTR szEventSourceName)
 
AUTHZAPI BOOL WINAPI AuthzUnregisterSecurityEventSource (IN DWORD dwFlags, IN OUT PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE phEventProvider)
 

Macro Definition Documentation

◆ AUTHZ_ACCESS_CHECK_NO_DEEP_COPY_SD

#define AUTHZ_ACCESS_CHECK_NO_DEEP_COPY_SD   0x1

Definition at line 30 of file authz.h.

◆ AUTHZ_GENERATE_FAILURE_AUDIT

#define AUTHZ_GENERATE_FAILURE_AUDIT   0x2

Definition at line 33 of file authz.h.

◆ AUTHZ_GENERATE_SUCCESS_AUDIT

#define AUTHZ_GENERATE_SUCCESS_AUDIT   0x1

Definition at line 32 of file authz.h.

◆ AUTHZ_NO_ALLOC_STRINGS

#define AUTHZ_NO_ALLOC_STRINGS   0x4

Definition at line 40 of file authz.h.

◆ AUTHZ_NO_FAILURE_AUDIT

#define AUTHZ_NO_FAILURE_AUDIT   0x2

Definition at line 39 of file authz.h.

◆ AUTHZ_NO_SUCCESS_AUDIT

#define AUTHZ_NO_SUCCESS_AUDIT   0x1

Definition at line 38 of file authz.h.

◆ AUTHZ_REQUIRE_S4U_LOGON

#define AUTHZ_REQUIRE_S4U_LOGON   0x4

Definition at line 36 of file authz.h.

◆ AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION

#define AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION   0x2

Definition at line 43 of file authz.h.

◆ AUTHZ_RM_FLAG_NO_AUDIT

#define AUTHZ_RM_FLAG_NO_AUDIT   0x1

Definition at line 42 of file authz.h.

◆ AUTHZ_SKIP_TOKEN_GROUPS

#define AUTHZ_SKIP_TOKEN_GROUPS   0x2

Definition at line 35 of file authz.h.

◆ AUTHZAPI

#define AUTHZAPI   DECLSPEC_IMPORT

Definition at line 21 of file authz.h.

Typedef Documentation

◆ AUTHZ_ACCESS_CHECK_RESULTS_HANDLE

Definition at line 49 of file authz.h.

◆ AUTHZ_ACCESS_REPLY

◆ AUTHZ_ACCESS_REQUEST

◆ AUTHZ_AUDIT_EVENT_HANDLE

Definition at line 47 of file authz.h.

◆ AUTHZ_AUDIT_EVENT_TYPE_HANDLE

Definition at line 48 of file authz.h.

◆ AUTHZ_AUDIT_INFO_HANDLE

Definition at line 46 of file authz.h.

◆ AUTHZ_CLIENT_CONTEXT_HANDLE

Definition at line 45 of file authz.h.

◆ AUTHZ_CONTEXT_INFORMATION_CLASS

◆ AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET

◆ AUTHZ_RESOURCE_MANAGER_HANDLE

Definition at line 50 of file authz.h.

◆ AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE

Definition at line 51 of file authz.h.

◆ AUTHZ_SOURCE_SCHEMA_REGISTRATION

◆ PAUDIT_PARAMS

Definition at line 55 of file authz.h.

◆ PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE

Definition at line 49 of file authz.h.

◆ PAUTHZ_ACCESS_REPLY

◆ PAUTHZ_ACCESS_REQUEST

◆ PAUTHZ_AUDIT_EVENT_HANDLE

Definition at line 47 of file authz.h.

◆ PAUTHZ_AUDIT_EVENT_TYPE_HANDLE

Definition at line 48 of file authz.h.

◆ PAUTHZ_AUDIT_INFO_HANDLE

Definition at line 46 of file authz.h.

◆ PAUTHZ_CLIENT_CONTEXT_HANDLE

Definition at line 45 of file authz.h.

◆ PAUTHZ_CONTEXT_INFORMATION_CLASS

◆ PAUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET

◆ PAUTHZ_RESOURCE_MANAGER_HANDLE

Definition at line 50 of file authz.h.

◆ PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE

Definition at line 51 of file authz.h.

◆ PAUTHZ_SOURCE_SCHEMA_REGISTRATION

◆ PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS

typedef BOOL(CALLBACK * PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS) (IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext, IN PVOID Args, OUT PSID_AND_ATTRIBUTES *pSidAttrArray, OUT PDWORD pSidCount, OUT PSID_AND_ATTRIBUTES *pRestrictedSidAttrArray, OUT PDWORD pRestrictedSidCount)

Definition at line 113 of file authz.h.

◆ PFN_AUTHZ_DYNAMIC_ACCESS_CHECK

typedef BOOL(CALLBACK * PFN_AUTHZ_DYNAMIC_ACCESS_CHECK) (IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext, IN PACE_HEADER pAce, IN PVOID pArgs OPTIONAL, IN OUT PBOOL pbAceApplicable)

Definition at line 108 of file authz.h.

◆ PFN_AUTHZ_FREE_DYNAMIC_GROUPS

typedef VOID(CALLBACK * PFN_AUTHZ_FREE_DYNAMIC_GROUPS) (IN PSID_AND_ATTRIBUTES pSidAttrArray)

Definition at line 120 of file authz.h.

Enumeration Type Documentation

◆ _AUTHZ_CONTEXT_INFORMATION_CLASS

Enumerator
AuthzContextInfoUserSid 
AuthzContextInfoGroupsSids 
AuthzContextInfoRestrictedSids 
AuthzContextInfoPrivileges 
AuthzContextInfoExpirationTime 
AuthzContextInfoServerContext 
AuthzContextInfoIdentifier 
AuthzContextInfoSource 
AuthzContextInfoAll 
AuthzContextInfoAuthenticationId 

Definition at line 58 of file authz.h.

Function Documentation

◆ AuthzAccessCheck()

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 at line 42 of file authz.c.

51 {
53  return FALSE;
54 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzAddSidsToContext()

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 at line 63 of file authz.c.

69 {
71  return FALSE;
72 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzCachedAccessCheck()

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 at line 81 of file authz.c.

86 {
88  return FALSE;
89 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzEnumerateSecurityEventSources()

AUTHZAPI BOOL WINAPI AuthzEnumerateSecurityEventSources ( IN DWORD  dwFlags,
OUT PAUTHZ_SOURCE_SCHEMA_REGISTRATION  Buffer,
OUT PDWORD  pdwCount,
IN OUT PDWORD  pdwLength 
)

Definition at line 98 of file authz.c.

102 {
104  return FALSE;
105 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzFreeAuditEvent()

AUTHZAPI BOOL WINAPI AuthzFreeAuditEvent ( IN AUTHZ_AUDIT_EVENT_HANDLE  pAuditEventInfo)

Definition at line 114 of file authz.c.

115 {
117  return FALSE;
118 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzFreeContext()

AUTHZAPI BOOL WINAPI AuthzFreeContext ( IN AUTHZ_CLIENT_CONTEXT_HANDLE  AuthzClientContext)

Definition at line 213 of file clictx.c.

214 {
215  BOOL Ret = FALSE;
216 
217  if (AuthzClientContext != NULL)
218  {
219  PAUTHZ_CLIENT_CONTEXT ClientCtx = (PAUTHZ_CLIENT_CONTEXT)AuthzClientContext;
220 
221  VALIDATE_CLIENTCTX_HANDLE(AuthzClientContext);
222 
223  if (ClientCtx->UserSid != NULL)
224  {
225  LocalFree((HLOCAL)ClientCtx->UserSid);
226  }
227 
228  LocalFree((HLOCAL)ClientCtx);
229  Ret = TRUE;
230  }
231  else
233 
234  return Ret;
235 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define TRUE
Definition: types.h:120
#define VALIDATE_CLIENTCTX_HANDLE(handle)
Definition: precomp.h:27
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
struct _AUTHZ_CLIENT_CONTEXT * PAUTHZ_CLIENT_CONTEXT
#define SetLastError(x)
Definition: compat.h:500
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577

◆ AuthzFreeHandle()

AUTHZAPI BOOL WINAPI AuthzFreeHandle ( IN AUTHZ_ACCESS_CHECK_RESULTS_HANDLE  AuthzHandle)

Definition at line 127 of file authz.c.

128 {
130  return FALSE;
131 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzFreeResourceManager()

AUTHZAPI BOOL WINAPI AuthzFreeResourceManager ( IN AUTHZ_RESOURCE_MANAGER_HANDLE  AuthzResourceManager)

Definition at line 229 of file resman.c.

230 {
231  BOOL Ret = FALSE;
232 
233  if (AuthzResourceManager != NULL)
234  {
235  PAUTHZ_RESMAN ResMan = (PAUTHZ_RESMAN)AuthzResourceManager;
236 
237  VALIDATE_RESMAN_HANDLE(AuthzResourceManager);
238 
239  if (!(ResMan->flags & AUTHZ_RM_FLAG_NO_AUDIT))
240  {
241  /* FIXME - cleanup auditing */
242  }
243 
244  if (ResMan->UserSid != NULL)
245  {
246  LocalFree((HLOCAL)ResMan->UserSid);
247  }
248 
249  LocalFree((HLOCAL)AuthzResourceManager);
250  Ret = TRUE;
251  }
252  else
254 
255  return Ret;
256 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define TRUE
Definition: types.h:120
DWORD flags
Definition: precomp.h:41
PSID UserSid
Definition: precomp.h:42
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define VALIDATE_RESMAN_HANDLE(handle)
Definition: precomp.h:26
#define SetLastError(x)
Definition: compat.h:500
struct _AUTHZ_RESMAN * PAUTHZ_RESMAN
#define AUTHZ_RM_FLAG_NO_AUDIT
Definition: authz.h:42
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577

◆ AuthzGetInformationFromContext()

AUTHZAPI BOOL WINAPI AuthzGetInformationFromContext ( IN AUTHZ_CLIENT_CONTEXT_HANDLE  hAuthzClientContext,
IN AUTHZ_CONTEXT_INFORMATION_CLASS  InfoClass,
IN DWORD  BufferSize,
OUT PDWORD  pSizeRequired,
OUT PVOID  Buffer 
)

Definition at line 111 of file clictx.c.

116 {
117  BOOL Ret = FALSE;
118 
119  if (hAuthzClientContext != NULL && pSizeRequired != NULL)
120  {
121  PAUTHZ_CLIENT_CONTEXT ClientCtx = (PAUTHZ_CLIENT_CONTEXT)hAuthzClientContext;
122 
123  VALIDATE_CLIENTCTX_HANDLE(hAuthzClientContext);
124 
125  switch (InfoClass)
126  {
128  {
129  DWORD SidLen = GetLengthSid(ClientCtx->UserSid);
130  *pSizeRequired = SidLen;
131  if (BufferSize < SidLen)
132  {
134  }
135  else
136  {
137  Ret = CopySid(SidLen,
138  (PSID)Buffer,
139  ClientCtx->UserSid);
140  }
141  break;
142  }
143 
146  break;
147 
150  break;
151 
154  break;
155 
157  *pSizeRequired = sizeof(LARGE_INTEGER);
158  if (BufferSize < sizeof(LARGE_INTEGER) || Buffer == NULL)
159  {
161  }
162  else
163  {
164  *((PLARGE_INTEGER)Buffer) = ClientCtx->ExpirationTime;
165  Ret = TRUE;
166  }
167  break;
168 
170  *pSizeRequired = sizeof(AUTHZ_CLIENT_CONTEXT_HANDLE);
172  {
174  }
175  else
176  {
178  Ret = TRUE;
179  }
180  break;
181 
183  *pSizeRequired = sizeof(LUID);
184  if (BufferSize < sizeof(LUID) || Buffer == NULL)
185  {
187  }
188  else
189  {
190  *((PLUID)Buffer) = ClientCtx->Luid;
191  Ret = TRUE;
192  }
193  break;
194 
195  default:
197  break;
198  }
199  }
200  else
202 
203  return Ret;
204 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define TRUE
Definition: types.h:120
LARGE_INTEGER ExpirationTime
Definition: precomp.h:58
struct _LUID * PLUID
#define VALIDATE_CLIENTCTX_HANDLE(handle)
Definition: precomp.h:27
struct _LUID LUID
#define FALSE
Definition: types.h:117
HANDLE AUTHZ_CLIENT_CONTEXT_HANDLE
Definition: authz.h:45
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
HANDLE * PAUTHZ_CLIENT_CONTEXT_HANDLE
Definition: authz.h:45
struct _AUTHZ_CLIENT_CONTEXT * PAUTHZ_CLIENT_CONTEXT
DWORD WINAPI GetLengthSid(PSID pSid)
Definition: security.c:798
#define BufferSize
Definition: classpnp.h:436
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:500
union _LARGE_INTEGER LARGE_INTEGER
AUTHZ_CLIENT_CONTEXT_HANDLE ServerContext
Definition: precomp.h:59
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
BOOL WINAPI CopySid(DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid)
Definition: security.c:591
union _LARGE_INTEGER * PLARGE_INTEGER
Definition: file.c:85
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

◆ AuthzInitializeContextFromAuthzContext()

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 at line 140 of file authz.c.

146 {
148  return FALSE;
149 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzInitializeContextFromSid()

AUTHZAPI BOOL WINAPI AuthzInitializeContextFromSid ( IN DWORD  Flags,
IN PSID  UserSid,
IN AUTHZ_RESOURCE_MANAGER_HANDLE  AuthzResourceManager,
IN PLARGE_INTEGER  pExpirationTime,
IN LUID  Identifier,
IN PVOID  DynamicGroupArgs,
OUT PAUTHZ_CLIENT_CONTEXT_HANDLE  pAuthzClientContext 
)

Definition at line 40 of file clictx.c.

47 {
48  BOOL Ret = FALSE;
49 
50  if (AuthzResourceManager != NULL && pExpirationTime != NULL && pAuthzClientContext != NULL &&
51  UserSid != NULL && IsValidSid(UserSid) && !(Flags & (AUTHZ_SKIP_TOKEN_GROUPS | AUTHZ_REQUIRE_S4U_LOGON)))
52  {
53  PAUTHZ_CLIENT_CONTEXT ClientCtx;
54  //PAUTHZ_RESMAN ResMan = (PAUTHZ_RESMAN)AuthzResourceManager;
55 
56  VALIDATE_RESMAN_HANDLE(AuthzResourceManager);
57 
59  sizeof(AUTHZ_CLIENT_CONTEXT));
60  if (ClientCtx != NULL)
61  {
62  DWORD SidLen;
63 
64  /* initialize the client context structure */
65 #if DBG
66  ClientCtx->Tag = CLIENTCTX_TAG;
67 #endif
68 
69  /* simply copy the SID */
70  SidLen = GetLengthSid(UserSid);
71  ClientCtx->UserSid = (PSID)LocalAlloc(LMEM_FIXED,
72  SidLen);
73  if (ClientCtx->UserSid == NULL)
74  {
75  LocalFree((HLOCAL)ClientCtx);
76  goto FailNoMemory;
77  }
78  CopySid(SidLen,
79  ClientCtx->UserSid,
80  UserSid);
81 
82  ClientCtx->AuthzResourceManager = AuthzResourceManager;
83  ClientCtx->Luid = Identifier;
84  ClientCtx->ExpirationTime.QuadPart = (pExpirationTime != NULL ? pExpirationTime->QuadPart : 0);
85  ClientCtx->ServerContext = NULL; /* FIXME */
86  ClientCtx->DynamicGroupArgs = DynamicGroupArgs;
87 
88  /* return the client context handle */
89  *pAuthzClientContext = (AUTHZ_CLIENT_CONTEXT_HANDLE)ClientCtx;
90  Ret = TRUE;
91  }
92  else
93  {
94 FailNoMemory:
96  }
97  }
98  else
100 
101  return Ret;
102 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define TRUE
Definition: types.h:120
AUTHZ_RESOURCE_MANAGER_HANDLE AuthzResourceManager
Definition: precomp.h:56
LARGE_INTEGER ExpirationTime
Definition: precomp.h:58
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define FALSE
Definition: types.h:117
HANDLE AUTHZ_CLIENT_CONTEXT_HANDLE
Definition: authz.h:45
unsigned int BOOL
Definition: ntddk_ex.h:94
PVOID DynamicGroupArgs
Definition: precomp.h:60
#define AUTHZ_REQUIRE_S4U_LOGON
Definition: authz.h:36
smooth NULL
Definition: ftsmooth.c:416
struct _AUTHZ_CLIENT_CONTEXT * PAUTHZ_CLIENT_CONTEXT
#define LMEM_FIXED
Definition: winbase.h:349
DWORD WINAPI GetLengthSid(PSID pSid)
Definition: security.c:798
#define VALIDATE_RESMAN_HANDLE(handle)
Definition: precomp.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:500
struct _SID * PSID
Definition: eventlog.c:35
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
#define AUTHZ_SKIP_TOKEN_GROUPS
Definition: authz.h:35
AUTHZ_CLIENT_CONTEXT_HANDLE ServerContext
Definition: precomp.h:59
BOOL WINAPI IsValidSid(PSID pSid)
Definition: security.c:698
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1373
BOOL WINAPI CopySid(DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid)
Definition: security.c:591
LONGLONG QuadPart
Definition: typedefs.h:114

◆ AuthzInitializeContextFromToken()

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 at line 158 of file authz.c.

165 {
167  return FALSE;
168 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzInitializeObjectAccessAuditEvent()

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  dwAdditionalParameterCount,
  ... 
)

Definition at line 177 of file authz.c.

186 {
188  return FALSE;
189 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzInitializeObjectAccessAuditEvent2()

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 at line 198 of file authz.c.

208 {
210  return FALSE;
211 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzInitializeResourceManager()

AUTHZAPI BOOL WINAPI AuthzInitializeResourceManager ( IN DWORD  flags,
IN PFN_AUTHZ_DYNAMIC_ACCESS_CHECK  pfnAccessCheck,
IN PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS  pfnComputeDynamicGroups,
IN PFN_AUTHZ_FREE_DYNAMIC_GROUPS  pfnFreeDynamicGroups,
IN PCWSTR  ResourceManagerName,
IN PAUTHZ_RESOURCE_MANAGER_HANDLE  pAuthzResourceManager 
)

Definition at line 145 of file resman.c.

151 {
152  BOOL Ret = FALSE;
153 
154  if (pAuthzResourceManager != NULL &&
156  {
157  PAUTHZ_RESMAN ResMan;
158  SIZE_T RequiredSize = sizeof(AUTHZ_RESMAN);
159 
160  if (ResourceManagerName != NULL)
161  {
162  RequiredSize += wcslen(ResourceManagerName) * sizeof(WCHAR);
163  }
164 
166  RequiredSize);
167  if (ResMan != NULL)
168  {
169  /* initialize the resource manager structure */
170 #if DBG
171  ResMan->Tag = RESMAN_TAG;
172 #endif
173 
174  ResMan->flags = flags;
175  ResMan->UserSid = NULL;
176 
177  if (ResourceManagerName != NULL)
178  {
179  wcscpy(ResMan->ResourceManagerName,
180  ResourceManagerName);
181  }
182  else
183  ResMan->ResourceManagerName[0] = UNICODE_NULL;
184 
185  ResMan->pfnAccessCheck = pfnAccessCheck;
186  ResMan->pfnComputeDynamicGroups = pfnComputeDynamicGroups;
187  ResMan->pfnFreeDynamicGroups = pfnFreeDynamicGroups;
188 
189  if (!(flags & AUTHZ_RM_FLAG_NO_AUDIT))
190  {
191  /* FIXME - initialize auditing */
192  DPRINT1("Auditing not implemented!\n");
193  }
194 
196  {
197  Ret = AuthzpInitUnderImpersonation(ResMan);
198  }
199  else
200  {
201  Ret = AuthzpInitSelf(ResMan);
202  }
203 
204  if (Ret)
205  {
206  /* finally return the handle */
207  *pAuthzResourceManager = (AUTHZ_RESOURCE_MANAGER_HANDLE)ResMan;
208  }
209  else
210  {
211  DPRINT1("Querying the token failed!\n");
212  LocalFree((HLOCAL)ResMan);
213  }
214  }
215  }
216  else
218 
219  return Ret;
220 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
PFN_AUTHZ_FREE_DYNAMIC_GROUPS pfnFreeDynamicGroups
Definition: precomp.h:39
DWORD flags
Definition: precomp.h:41
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
struct _AUTHZ_RESMAN AUTHZ_RESMAN
PSID UserSid
Definition: precomp.h:42
WCHAR ResourceManagerName[1]
Definition: precomp.h:45
#define FALSE
Definition: types.h:117
#define UNICODE_NULL
unsigned int BOOL
Definition: ntddk_ex.h:94
HANDLE AUTHZ_RESOURCE_MANAGER_HANDLE
Definition: authz.h:50
smooth NULL
Definition: ftsmooth.c:416
static BOOL AuthzpInitSelf(IN OUT PAUTHZ_RESMAN ResMan)
Definition: resman.c:120
PFN_AUTHZ_DYNAMIC_ACCESS_CHECK pfnAccessCheck
Definition: precomp.h:37
#define LMEM_FIXED
Definition: winbase.h:349
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SetLastError(x)
Definition: compat.h:500
GLbitfield flags
Definition: glext.h:7161
struct _AUTHZ_RESMAN * PAUTHZ_RESMAN
#define AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION
Definition: authz.h:43
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS pfnComputeDynamicGroups
Definition: precomp.h:38
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define AUTHZ_RM_FLAG_NO_AUDIT
Definition: authz.h:42
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
static BOOL AuthzpInitUnderImpersonation(IN OUT PAUTHZ_RESMAN ResMan)
Definition: resman.c:100
#define DPRINT1
Definition: precomp.h:8
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1373
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)

◆ AuthzInstallSecurityEventSource()

AUTHZAPI BOOL WINAPI AuthzInstallSecurityEventSource ( IN DWORD  dwFlags,
IN PAUTHZ_SOURCE_SCHEMA_REGISTRATION  pRegistration 
)

Definition at line 220 of file authz.c.

222 {
224  return FALSE;
225 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzOpenObjectAudit()

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 at line 234 of file authz.c.

242 {
244  return FALSE;
245 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzRegisterSecurityEventSource()

AUTHZAPI BOOL WINAPI AuthzRegisterSecurityEventSource ( IN DWORD  dwFlags,
IN PCWSTR  szEventSourceName,
IN PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE  phEventProvider 
)

Definition at line 254 of file authz.c.

257 {
259  return FALSE;
260 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzReportSecurityEvent()

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 at line 269 of file authz.c.

275 {
277  return FALSE;
278 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzReportSecurityEventFromParams()

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 at line 287 of file authz.c.

292 {
294  return FALSE;
295 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzUninstallSecurityEventSource()

AUTHZAPI BOOL WINAPI AuthzUninstallSecurityEventSource ( IN DWORD  dwFlags,
IN PWSTR  szEventSourceName 
)

Definition at line 304 of file authz.c.

306 {
308  return FALSE;
309 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AuthzUnregisterSecurityEventSource()

AUTHZAPI BOOL WINAPI AuthzUnregisterSecurityEventSource ( IN DWORD  dwFlags,
IN OUT PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE  phEventProvider 
)

Definition at line 318 of file authz.c.

320 {
322  return FALSE;
323 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115