Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

587 lines
19 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. azper.h
  5. Abstract:
  6. Describe the interface between a persistence provider and the persistence engine.
  7. Author:
  8. Cliff Van Dyke (cliffv) 3-Dec-2001
  9. --*/
  10. #ifndef _AZPER_H_
  11. #define _AZ_H_
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. /////////////////////////////////////////////////////////////////////////////
  16. //
  17. // Structure definitions
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. //
  21. // Handle to various objects passed to/from the persistence provider
  22. //
  23. #if DBG // Do stronger type checking on debug builds
  24. typedef struct {
  25. } *AZPE_OBJECT_HANDLE;
  26. #else //DBG
  27. typedef PVOID AZPE_OBJECT_HANDLE;
  28. #endif //DBG
  29. //
  30. // Opaque context returned by *PersistOpen
  31. //
  32. #if DBG // Do stronger type checking on debug builds
  33. typedef struct {
  34. } *AZPE_PERSIST_CONTEXT;
  35. #else //DBG
  36. typedef PVOID AZPE_PERSIST_CONTEXT;
  37. #endif //DBG
  38. typedef AZPE_PERSIST_CONTEXT *PAZPE_PERSIST_CONTEXT;
  39. //
  40. // Structure defining a GUID and the operation that was performed on a GUID
  41. //
  42. typedef struct _AZP_DELTA_ENTRY {
  43. // Operation that was performed
  44. ULONG DeltaFlags;
  45. #define AZP_DELTA_ADD 0x0001 // Delta was an add and not a remove
  46. #define AZP_DELTA_SID 0x0002 // Delta is for a SID and not a GUID
  47. #define AZP_DELTA_PERSIST_PROVIDER 0x0004 // Delta was created by the persist provider and not the app
  48. // Guid the operation was performed on
  49. union {
  50. GUID Guid;
  51. PSID Sid; // AZP_DELTA_SID is set
  52. };
  53. } AZP_DELTA_ENTRY, *PAZP_DELTA_ENTRY;
  54. //
  55. // Generic structures to hold rights for policy admins/readers or
  56. // delegated policy users
  57. //
  58. typedef struct _AZP_POLICY_USER_RIGHTS {
  59. //
  60. // Mask
  61. //
  62. ULONG lUserRightsMask;
  63. //
  64. // Flags
  65. //
  66. ULONG lUserRightsFlags;
  67. } AZP_POLICY_USER_RIGHTS, *PAZP_POLICY_USER_RIGHTS;
  68. /////////////////////////////////////////////////////////////////////////////
  69. //
  70. // #define definitions
  71. //
  72. /////////////////////////////////////////////////////////////////////////////
  73. //
  74. // Registry location where the provider registers itself
  75. //
  76. // The Dll implementing the provider should be in a value named
  77. // AZ_REGISTRY_PROVIDER_KEY_NAME\\<PolicyUrlPrefix>\\AZ_REGISTRY_PROVIDER_DLL_VALUE_NAME
  78. // where <PolicyUrlPrefix> is the characters before the : in the policy url passed to Initialize
  79. //
  80. #define AZ_REGISTRY_KEY_NAME L"SYSTEM\\CurrentControlSet\\Control\\LSA\\AzRoles"
  81. #define AZ_REGISTRY_PROVIDER_KEY_NAME (AZ_REGISTRY_KEY_NAME L"\\Providers")
  82. #define AZ_REGISTRY_PROVIDER_KEY_NAME_LEN ((sizeof(AZ_REGISTRY_PROVIDER_KEY_NAME)/sizeof(WCHAR))-1)
  83. #define AZ_REGISTRY_PROVIDER_DLL_VALUE_NAME L"ProviderDll"
  84. //
  85. // Definition of dirty bits returned from AzpeDirtyBits
  86. //
  87. // Generic bits that apply to all objects (or to several objects)
  88. //
  89. // policy readers and admins for AzAuthorizationStore, AzApplication and AzScope
  90. // objects. Also delegated policy users applied to AzAuthorizationStore and
  91. // AzApplication objects
  92. #define AZ_DIRTY_NAME 0x80000000
  93. #define AZ_DIRTY_DESCRIPTION 0x40000000
  94. #define AZ_DIRTY_APPLY_STORE_SACL 0x20000000
  95. // Object is dirty because it has been created
  96. #define AZ_DIRTY_CREATE 0x10000000
  97. #define AZ_DIRTY_DELEGATED_POLICY_USERS 0x08000000
  98. #define AZ_DIRTY_POLICY_ADMINS 0x04000000
  99. #define AZ_DIRTY_POLICY_READERS 0x02000000
  100. #define AZ_DIRTY_APPLICATION_DATA 0x01000000
  101. #define AZ_DIRTY_GENERATE_AUDITS 0x00100000
  102. // Common attributes that apply to all objects
  103. #define AZ_DIRTY_COMMON_ATTRS 0xC1000000
  104. // Object specific bits that apply to individual objects
  105. #define AZ_DIRTY_OBJECT_SPECIFIC 0x000FFFFF
  106. #define AZ_DIRTY_AZSTORE_DOMAIN_TIMEOUT 0x00000100
  107. #define AZ_DIRTY_AZSTORE_SCRIPT_ENGINE_TIMEOUT 0x00000200
  108. #define AZ_DIRTY_AZSTORE_MAX_SCRIPT_ENGINES 0x00000400
  109. #define AZ_DIRTY_AZSTORE_MAJOR_VERSION 0x00000800
  110. #define AZ_DIRTY_AZSTORE_MINOR_VERSION 0x00001000
  111. #define AZ_DIRTY_AZSTORE_ALL_SCALAR (0x00000700 | AZ_DIRTY_APPLICATION_DATA | AZ_DIRTY_DESCRIPTION | AZ_DIRTY_GENERATE_AUDITS | AZ_DIRTY_APPLY_STORE_SACL | AZ_DIRTY_AZSTORE_MAJOR_VERSION | AZ_DIRTY_AZSTORE_MINOR_VERSION )
  112. #define AZ_DIRTY_AZSTORE_ALL (0x00000000 | AZ_DIRTY_AZSTORE_ALL_SCALAR | AZ_DIRTY_DELEGATED_POLICY_USERS | AZ_DIRTY_POLICY_ADMINS | AZ_DIRTY_POLICY_READERS | AZ_DIRTY_CREATE)
  113. #define AZ_DIRTY_OPERATION_ID 0x00000001
  114. #define AZ_DIRTY_OPERATION_ALL_SCALAR (0x00000001 | AZ_DIRTY_APPLICATION_DATA | AZ_DIRTY_NAME | AZ_DIRTY_DESCRIPTION )
  115. #define AZ_DIRTY_OPERATION_ALL (AZ_DIRTY_OPERATION_ALL_SCALAR | AZ_DIRTY_CREATE)
  116. #define AZ_DIRTY_TASK_OPERATIONS 0x00000001
  117. #define AZ_DIRTY_TASK_TASKS 0x00000002
  118. #define AZ_DIRTY_TASK_BIZRULE 0x00000100
  119. #define AZ_DIRTY_TASK_BIZRULE_LANGUAGE 0x00000200
  120. #define AZ_DIRTY_TASK_BIZRULE_IMPORTED_PATH 0x00000400
  121. #define AZ_DIRTY_TASK_IS_ROLE_DEFINITION 0x00000800
  122. #define AZ_DIRTY_TASK_ALL_SCALAR (0x00000F00 | AZ_DIRTY_APPLICATION_DATA | AZ_DIRTY_NAME | AZ_DIRTY_DESCRIPTION )
  123. #define AZ_DIRTY_TASK_ALL (0x00000003 | AZ_DIRTY_TASK_ALL_SCALAR | AZ_DIRTY_CREATE)
  124. #define AZ_DIRTY_SCOPE_ALL_SCALAR (0x00000000 | AZ_DIRTY_APPLICATION_DATA | AZ_DIRTY_NAME | AZ_DIRTY_DESCRIPTION | AZ_DIRTY_APPLY_STORE_SACL )
  125. #define AZ_DIRTY_SCOPE_ALL (0x00000000 | AZ_DIRTY_SCOPE_ALL_SCALAR | AZ_DIRTY_POLICY_ADMINS | AZ_DIRTY_POLICY_READERS | AZ_DIRTY_CREATE)
  126. #define AZ_DIRTY_GROUP_APP_MEMBERS 0x00000001
  127. #define AZ_DIRTY_GROUP_APP_NON_MEMBERS 0x00000002
  128. #define AZ_DIRTY_GROUP_MEMBERS 0x00000004
  129. #define AZ_DIRTY_GROUP_NON_MEMBERS 0x00000008
  130. #define AZ_DIRTY_GROUP_TYPE 0x00000100
  131. #define AZ_DIRTY_GROUP_LDAP_QUERY 0x00000200
  132. #define AZ_DIRTY_GROUP_ALL_SCALAR (0x00000300 | AZ_DIRTY_NAME | AZ_DIRTY_DESCRIPTION )
  133. #define AZ_DIRTY_GROUP_ALL (0x0000000F | AZ_DIRTY_GROUP_ALL_SCALAR | AZ_DIRTY_CREATE)
  134. #define AZ_DIRTY_ROLE_APP_MEMBERS 0x00000001
  135. #define AZ_DIRTY_ROLE_MEMBERS 0x00000002
  136. #define AZ_DIRTY_ROLE_OPERATIONS 0x00000004
  137. #define AZ_DIRTY_ROLE_TASKS 0x00000008
  138. #define AZ_DIRTY_ROLE_ALL_SCALAR (0x00000000 | AZ_DIRTY_APPLICATION_DATA | AZ_DIRTY_NAME | AZ_DIRTY_DESCRIPTION )
  139. #define AZ_DIRTY_ROLE_ALL (0x0000000F | AZ_DIRTY_ROLE_ALL_SCALAR | AZ_DIRTY_CREATE)
  140. #define AZ_DIRTY_APPLICATION_AUTHZ_INTERFACE_CLSID 0x00000100
  141. #define AZ_DIRTY_APPLICATION_VERSION 0x00000200
  142. #define AZ_DIRTY_APPLICATION_ALL_SCALAR (0x00000300 | AZ_DIRTY_APPLICATION_DATA | AZ_DIRTY_NAME | AZ_DIRTY_DESCRIPTION | AZ_DIRTY_GENERATE_AUDITS | AZ_DIRTY_APPLY_STORE_SACL )
  143. #define AZ_DIRTY_APPLICATION_ALL (0x00000000 | AZ_DIRTY_APPLICATION_ALL_SCALAR | AZ_DIRTY_DELEGATED_POLICY_USERS | AZ_DIRTY_POLICY_ADMINS | AZ_DIRTY_POLICY_READERS | AZ_DIRTY_CREATE)
  144. //
  145. // ObjectType as returned from AzpeObjectType
  146. //
  147. //
  148. // The order of the defines below must not change since providers and azroles
  149. // build tables that are indexed by this number
  150. //
  151. #define OBJECT_TYPE_AZAUTHSTORE 0
  152. #define OBJECT_TYPE_APPLICATION 1
  153. #define OBJECT_TYPE_OPERATION 2
  154. #define OBJECT_TYPE_TASK 3
  155. #define OBJECT_TYPE_SCOPE 4
  156. #define OBJECT_TYPE_GROUP 5
  157. #define OBJECT_TYPE_ROLE 6
  158. #define OBJECT_TYPE_COUNT 7 // Number of object types visible to providers
  159. //
  160. // Definitions of the lPersistFlags
  161. //
  162. // Note to developer. Confine these flags bits to the lower order 2 bytes or change
  163. // the AZP_FLAGS defines in genobj.h
  164. #define AZPE_FLAGS_PERSIST_OPEN 0x0001 // Call is from the persistence provider doing AzPersistOpen
  165. #define AZPE_FLAGS_PERSIST_UPDATE_CACHE 0x0002 // Call is from the persistence provider doing AzPersistUpdateCache
  166. #define AZPE_FLAGS_PERSIST_REFRESH 0x0004 // Call is from the persistence provider doing AzPersistRefresh
  167. #define AZPE_FLAGS_PERSIST_SUBMIT 0x0008 // Call is from the persistence provider doing AzPersistSubmit
  168. #define AZPE_FLAGS_PERSIST_UPDATE_CHILDREN_CACHE 0x0010 // Call is from the persistence provider doing AzPersistUpdateChildrenCache
  169. #define AZPE_FLAGS_PERSIST_MASK 0xFFFF // Call is from the persistence provider (OR of bits above)
  170. #define AZPE_FLAGS_PERSIST_OPEN_MASK 0x0017 // Call is from the persistence provider doing one of the update-like operations
  171. //
  172. // Options passed to AzpeSetObjectOptions
  173. //
  174. #define AZPE_OPTIONS_WRITABLE 0x01 // Current user can write this object
  175. #define AZPE_OPTIONS_SUPPORTS_DACL 0x02 // DACL can be specified for this object
  176. #define AZPE_OPTIONS_SUPPORTS_DELEGATION 0x04 // Delegation can be specified for this object
  177. #define AZPE_OPTIONS_SUPPORTS_SACL 0x08 // Apply SACL can be specified for this object
  178. #define AZPE_OPTIONS_HAS_SECURITY_PRIVILEGE 0x10 // Current user SE_SECURITY_PRIVILEGE on machine containing store
  179. #define AZPE_OPTIONS_SUPPORTS_LAZY_LOAD 0x20 // Provider supports lazy load for children
  180. #define AZPE_OPTIONS_CREATE_CHILDREN 0x40 // Current user can create children for the object
  181. #define AZPE_OPTIONS_VALID_MASK 0x7F // Mask of the valid options
  182. //
  183. // This flag means that some updates from the store has been made.
  184. //
  185. #define AZPE_FLAG_CACHE_UPDATE_STORE_LEVEL 0x00000001
  186. /////////////////////////////////////////////////////////////////////////////
  187. //
  188. // Procedures implemented by the providers
  189. //
  190. /////////////////////////////////////////////////////////////////////////////
  191. typedef DWORD
  192. (WINAPI * AZ_PERSIST_OPEN)(
  193. IN LPCWSTR PolicyUrl,
  194. IN AZPE_OBJECT_HANDLE hAzStore,
  195. IN ULONG lPersistFlags,
  196. IN BOOL CreatePolicy,
  197. OUT PAZPE_PERSIST_CONTEXT PersistContext,
  198. OUT LPWSTR *pwszTargetMachine
  199. );
  200. typedef DWORD
  201. (WINAPI *AZ_PERSIST_UPDATE_CACHE)(
  202. IN AZPE_PERSIST_CONTEXT PersistContext,
  203. IN ULONG lPersistFlags,
  204. OUT ULONG * pulUpdatedFlag
  205. );
  206. typedef DWORD
  207. (WINAPI *AZ_PERSIST_UPDATE_CHILDREN_CACHE)(
  208. IN AZPE_PERSIST_CONTEXT PersistContext,
  209. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  210. IN ULONG lPersistFlags
  211. );
  212. typedef VOID
  213. (WINAPI *AZ_PERSIST_CLOSE)(
  214. IN AZPE_PERSIST_CONTEXT PersistContext
  215. );
  216. typedef DWORD
  217. (WINAPI *AZ_PERSIST_SUBMIT)(
  218. IN AZPE_PERSIST_CONTEXT PersistContext,
  219. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  220. IN ULONG lPersistFlags,
  221. IN BOOLEAN DeleteMe
  222. );
  223. typedef DWORD
  224. (WINAPI *AZ_PERSIST_REFRESH)(
  225. IN AZPE_PERSIST_CONTEXT PersistContext,
  226. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  227. IN ULONG lPersistFlags
  228. );
  229. typedef DWORD
  230. (WINAPI *AZ_PERSIST_CHECK_PRIVILEGE)(
  231. IN AZPE_PERSIST_CONTEXT PersistContext,
  232. IN AZPE_OBJECT_HANDLE AzpeObjectHandle
  233. );
  234. //
  235. // Structure describing a provider
  236. //
  237. typedef struct _AZPE_PROVIDER_INFO {
  238. //
  239. // Version of this structure
  240. //
  241. ULONG ProviderInfoVersion;
  242. #define AZPE_PROVIDER_INFO_VERSION_1 1
  243. #define AZPE_PROVIDER_INFO_VERSION_2 2
  244. //
  245. // Prefix of the PolicyUrl that define the provider
  246. // The policy URL should be of the form <Prefix>:<ProviderSpecificUrl>
  247. //
  248. LPCWSTR PolicyUrlPrefix;
  249. //
  250. // Routines exported by the provider
  251. //
  252. AZ_PERSIST_OPEN AzPersistOpen;
  253. AZ_PERSIST_UPDATE_CACHE AzPersistUpdateCache;
  254. AZ_PERSIST_CLOSE AzPersistClose;
  255. AZ_PERSIST_SUBMIT AzPersistSubmit;
  256. AZ_PERSIST_REFRESH AzPersistRefresh;
  257. //
  258. // Following are valid for version 2 and more only
  259. //
  260. AZ_PERSIST_UPDATE_CHILDREN_CACHE AzPersistUpdateChildrenCache;
  261. //
  262. // When new fields are added to this structure,
  263. // make sure you increment the version number and add a new define for
  264. // the new version number.
  265. //
  266. } AZPE_PROVIDER_INFO, *PAZPE_PROVIDER_INFO;
  267. /////////////////////////////////////////////////////////////////////////////
  268. //
  269. // Procedures implemented by the persistence engine and called by the providers
  270. //
  271. /////////////////////////////////////////////////////////////////////////////
  272. typedef DWORD
  273. (WINAPI *AZPE_CREATE_OBJECT)(
  274. IN AZPE_OBJECT_HANDLE AzpeParentHandle,
  275. IN ULONG ChildObjectType,
  276. IN LPCWSTR ChildObjectNameString,
  277. IN GUID *ChildObjectGuid,
  278. IN ULONG lPersistFlags,
  279. OUT AZPE_OBJECT_HANDLE *AzpeChildHandle
  280. );
  281. typedef VOID
  282. (WINAPI *AZPE_OBJECT_FINISHED)(
  283. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  284. IN DWORD WinStatus
  285. );
  286. typedef DWORD
  287. (WINAPI *AZPE_GET_PROPERTY)(
  288. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  289. IN ULONG lPersistFlags,
  290. IN ULONG PropertyId,
  291. OUT PVOID *PropertyValue
  292. );
  293. typedef DWORD
  294. (WINAPI *AZPE_GET_DELTA_ARRAY)(
  295. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  296. IN ULONG PropertyId,
  297. OUT PULONG DeltaArrayCount,
  298. OUT PAZP_DELTA_ENTRY **DeltaArray
  299. );
  300. typedef DWORD
  301. (WINAPI *AZPE_GET_SECURITY_DESCRIPTOR_FROM_CACHE)(
  302. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  303. IN ULONG lPersistFlags,
  304. IN PAZP_POLICY_USER_RIGHTS *ppPolicyAdminRights OPTIONAL,
  305. IN PAZP_POLICY_USER_RIGHTS *ppPolicyReaderRights OPTIONAL,
  306. IN PAZP_POLICY_USER_RIGHTS *ppDelegatedPolicyUsersRights OPTIONAL,
  307. IN GUID *pDelegatedObjectGuid OPTIONAL,
  308. IN PAZP_POLICY_USER_RIGHTS pDelegatedUsersAttributeRights OPTIONAL,
  309. IN GUID *pAttributeGuid OPTIONAL,
  310. IN PAZP_POLICY_USER_RIGHTS pSaclRights OPTIONAL,
  311. IN PSECURITY_DESCRIPTOR OldSd OPTIONAL,
  312. OUT PSECURITY_DESCRIPTOR *NewSd
  313. );
  314. //
  315. // Routines to return a single field of an object
  316. //
  317. typedef DWORD
  318. (WINAPI *AZPE_OBJECT_TYPE)(
  319. IN AZPE_OBJECT_HANDLE AzpeObjectHandle
  320. );
  321. typedef DWORD
  322. (WINAPI *AZPE_DIRTY_BITS)(
  323. IN AZPE_OBJECT_HANDLE AzpeObjectHandle
  324. );
  325. typedef GUID *
  326. (WINAPI *AZPE_PERSISTENCE_GUID)(
  327. IN AZPE_OBJECT_HANDLE AzpeObjectHandle
  328. );
  329. typedef BOOLEAN
  330. (WINAPI *AZPE_IS_PARENT_WRITABLE)(
  331. IN AZPE_OBJECT_HANDLE AzpeObjectHandle
  332. );
  333. typedef AZPE_OBJECT_HANDLE
  334. (WINAPI *AZPE_PARENT_OF_CHILD)(
  335. IN AZPE_OBJECT_HANDLE AzpeObjectHandle
  336. );
  337. typedef BOOLEAN
  338. (WINAPI *AZPE_UPDATE_CHILDREN)(
  339. IN AZPE_OBJECT_HANDLE AzpeObjectHandle
  340. );
  341. typedef BOOLEAN
  342. (WINAPI *AZPE_CAN_CREATE_CHILDREN)(
  343. IN AZPE_OBJECT_HANDLE AzpeObjectHandle
  344. );
  345. //
  346. // Routines to change an object
  347. //
  348. typedef DWORD
  349. (WINAPI *AZPE_SET_PROPERTY)(
  350. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  351. IN ULONG lPersistFlags,
  352. IN ULONG PropertyId,
  353. IN PVOID PropertyValue
  354. );
  355. typedef DWORD
  356. (WINAPI *AZPE_SET_OBJECT_OPTIONS)(
  357. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  358. IN ULONG lPersistFlags,
  359. IN ULONG ObjectOptions
  360. );
  361. typedef DWORD
  362. (WINAPI *AZPE_ADD_PROPERTY_ITEM_SID)(
  363. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  364. IN ULONG lPersistFlags,
  365. IN ULONG PropertyId,
  366. IN PSID Sid
  367. );
  368. typedef DWORD
  369. (WINAPI *AZPE_ADD_PROPERTY_ITEM_GUID)(
  370. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  371. IN ULONG lPersistFlags,
  372. IN ULONG PropertyId,
  373. IN GUID *ObjectGuid
  374. );
  375. typedef DWORD
  376. (WINAPI *AZPE_ADD_PROPERTY_ITEM_GUID_STRING)(
  377. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  378. IN ULONG lPersistFlags,
  379. IN ULONG PropertyId,
  380. IN WCHAR *ObjectGuidString
  381. );
  382. typedef VOID
  383. (WINAPI *AZPE_SET_PROVIDER_DATA)(
  384. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  385. IN PVOID ProviderData
  386. );
  387. typedef PVOID
  388. (WINAPI *AZPE_GET_PROVIDER_DATA)(
  389. IN AZPE_OBJECT_HANDLE AzpeObjectHandle
  390. );
  391. typedef DWORD
  392. (WINAPI *AZPE_SET_SECURITY_DESCRIPTOR_INTO_CACHE)(
  393. IN AZPE_OBJECT_HANDLE AzpeObjectHandle,
  394. IN PSECURITY_DESCRIPTOR pSD,
  395. IN ULONG lPersistFlags,
  396. IN PAZP_POLICY_USER_RIGHTS pAdminRights,
  397. IN PAZP_POLICY_USER_RIGHTS pReadersRights,
  398. IN PAZP_POLICY_USER_RIGHTS pDelegatedUserRights OPTIONAL,
  399. IN PAZP_POLICY_USER_RIGHTS pSaclRights OPTIONAL
  400. );
  401. typedef PVOID
  402. (WINAPI *AZPE_ALLOCATE_MEMORY)(
  403. IN SIZE_T Size
  404. );
  405. typedef VOID
  406. (WINAPI *AZPE_FREE_MEMORY)(
  407. IN PVOID Buffer
  408. );
  409. typedef BOOL
  410. (WINAPI *AZPE_AZSTORE_IS_BATCH_MODE)(
  411. IN AZPE_OBJECT_HANDLE AzpeObjectHandle
  412. );
  413. typedef AZPE_OBJECT_HANDLE
  414. (WINAPI *AZPE_GET_AUTHORIZATION_STORE)(
  415. IN AZPE_OBJECT_HANDLE hObject
  416. );
  417. //
  418. // Structure describing routines exported by azroles to the provider
  419. //
  420. typedef struct _AZPE_AZROLES_INFO {
  421. //
  422. // Version of this structure
  423. //
  424. ULONG AzrolesInfoVersion;
  425. #define AZPE_AZROLES_INFO_VERSION_1 1
  426. #define AZPE_AZROLES_INFO_VERSION_2 2
  427. //
  428. // Routines exported by azroles to the provider
  429. //
  430. AZPE_CREATE_OBJECT AzpeCreateObject;
  431. AZPE_OBJECT_FINISHED AzpeObjectFinished;
  432. AZPE_GET_PROPERTY AzpeGetProperty;
  433. AZPE_GET_DELTA_ARRAY AzpeGetDeltaArray;
  434. AZPE_GET_SECURITY_DESCRIPTOR_FROM_CACHE AzpeGetSecurityDescriptorFromCache;
  435. AZPE_OBJECT_TYPE AzpeObjectType;
  436. AZPE_DIRTY_BITS AzpeDirtyBits;
  437. AZPE_PERSISTENCE_GUID AzpePersistenceGuid;
  438. AZPE_PARENT_OF_CHILD AzpeParentOfChild;
  439. AZPE_SET_PROPERTY AzpeSetProperty;
  440. AZPE_SET_OBJECT_OPTIONS AzpeSetObjectOptions;
  441. AZPE_ADD_PROPERTY_ITEM_SID AzpeAddPropertyItemSid;
  442. AZPE_ADD_PROPERTY_ITEM_GUID AzpeAddPropertyItemGuid;
  443. AZPE_ADD_PROPERTY_ITEM_GUID_STRING AzpeAddPropertyItemGuidString;
  444. AZPE_SET_PROVIDER_DATA AzpeSetProviderData;
  445. AZPE_GET_PROVIDER_DATA AzpeGetProviderData;
  446. AZPE_SET_SECURITY_DESCRIPTOR_INTO_CACHE AzpeSetSecurityDescriptorIntoCache;
  447. AZPE_ALLOCATE_MEMORY AzpeAllocateMemory;
  448. AZPE_FREE_MEMORY AzpeFreeMemory;
  449. //
  450. // Following are valid for version 2 and more only
  451. //
  452. AZPE_IS_PARENT_WRITABLE AzpeIsParentWritable;
  453. AZPE_UPDATE_CHILDREN AzpeUpdateChildren;
  454. AZPE_CAN_CREATE_CHILDREN AzpeCanCreateChildren;
  455. AZPE_AZSTORE_IS_BATCH_MODE AzpeAzStoreIsBatchUpdateMode;
  456. AZPE_GET_AUTHORIZATION_STORE AzpeGetAuthorizationStore;
  457. //
  458. // When new fields are added to this structure,
  459. // make sure you increment the version number and add a new define for
  460. // the new version number.
  461. //
  462. } AZPE_AZROLES_INFO, *PAZPE_AZROLES_INFO;
  463. //
  464. // The only actual routine exported by the provider
  465. //
  466. typedef DWORD
  467. (WINAPI * AZ_PERSIST_PROVIDER_INITIALIZE)(
  468. IN PAZPE_AZROLES_INFO AzrolesInfo,
  469. OUT PAZPE_PROVIDER_INFO *ProviderInfo
  470. );
  471. #define AZ_PERSIST_PROVIDER_INITIALIZE_NAME "AzPersistProviderInitialize"
  472. #ifdef __cplusplus
  473. }
  474. #endif
  475. #endif // _AZPER_H_