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.

346 lines
8.8 KiB

  1. #ifndef __TABLES_H__
  2. #define __TABLES_H__
  3. typedef DWORD (*FN_ADD_REF_CONTEXT) (
  4. IN MARTA_CONTEXT Context
  5. );
  6. FN_ADD_REF_CONTEXT MartaAddRefContext [] = {
  7. NULL,
  8. &MartaAddRefFileContext,
  9. &MartaAddRefServiceContext,
  10. &MartaAddRefPrinterContext,
  11. &MartaAddRefRegistryKeyContext,
  12. &MartaAddRefLMShareContext,
  13. &MartaAddRefKernelContext,
  14. &MartaAddRefWindowContext,
  15. &MartaAddRefDsObjectContext,
  16. &MartaAddRefDsObjectContext,
  17. NULL,
  18. &MartaAddRefWMIGuidContext,
  19. &MartaAddRefRegistryKeyContext
  20. };
  21. typedef DWORD (*FN_CLOSE_CONTEXT) (
  22. IN MARTA_CONTEXT Context
  23. );
  24. FN_CLOSE_CONTEXT MartaCloseContext [] = {
  25. NULL,
  26. &MartaCloseFileContext,
  27. &MartaCloseServiceContext,
  28. &MartaClosePrinterContext,
  29. &MartaCloseRegistryKeyContext,
  30. &MartaCloseLMShareContext,
  31. &MartaCloseKernelContext,
  32. &MartaCloseWindowContext,
  33. &MartaCloseDsObjectContext,
  34. &MartaCloseDsObjectContext,
  35. NULL,
  36. &MartaCloseWMIGuidContext,
  37. &MartaCloseRegistryKeyContext
  38. };
  39. typedef DWORD (*FN_FIND_FIRST) (
  40. IN MARTA_CONTEXT Context,
  41. IN ACCESS_MASK AccessMask,
  42. OUT PMARTA_CONTEXT pChildContext
  43. );
  44. FN_FIND_FIRST MartaFindFirst [] = {
  45. NULL,
  46. &MartaFindFirstFile,
  47. NULL,
  48. NULL,
  49. &MartaFindFirstRegistryKey,
  50. NULL,
  51. NULL,
  52. NULL,
  53. NULL,
  54. NULL,
  55. NULL,
  56. NULL,
  57. &MartaFindFirstRegistryKey
  58. };
  59. typedef DWORD (*FN_FIND_NEXT) (
  60. IN MARTA_CONTEXT Context,
  61. IN ACCESS_MASK AccessMask,
  62. OUT PMARTA_CONTEXT pSiblingContext
  63. );
  64. FN_FIND_NEXT MartaFindNext [] = {
  65. NULL,
  66. &MartaFindNextFile,
  67. NULL,
  68. NULL,
  69. &MartaFindNextRegistryKey,
  70. NULL,
  71. NULL,
  72. NULL,
  73. NULL,
  74. NULL,
  75. NULL,
  76. NULL,
  77. &MartaFindNextRegistryKey
  78. };
  79. typedef DWORD (*FN_GET_PARENT_CONTEXT) (
  80. IN MARTA_CONTEXT Context,
  81. IN ACCESS_MASK AccessMask,
  82. OUT PMARTA_CONTEXT pParentContext
  83. );
  84. FN_GET_PARENT_CONTEXT MartaGetParentContext [] = {
  85. NULL,
  86. &MartaGetFileParentContext,
  87. NULL,
  88. NULL,
  89. &MartaGetRegistryKeyParentContext,
  90. NULL,
  91. NULL,
  92. NULL,
  93. NULL,
  94. NULL,
  95. NULL,
  96. NULL,
  97. &MartaGetRegistryKeyParentContext
  98. };
  99. typedef DWORD (*FN_GET_TYPE_PROPERTIES) (
  100. IN OUT PMARTA_OBJECT_TYPE_PROPERTIES pProperties
  101. );
  102. FN_GET_TYPE_PROPERTIES MartaGetTypeProperties [] = {
  103. NULL,
  104. &MartaGetFileTypeProperties,
  105. &MartaGetServiceTypeProperties,
  106. &MartaGetPrinterTypeProperties,
  107. &MartaGetRegistryKeyTypeProperties,
  108. &MartaGetLMShareTypeProperties,
  109. &MartaGetKernelTypeProperties,
  110. &MartaGetWindowTypeProperties,
  111. &MartaGetDsObjectTypeProperties,
  112. &MartaGetDsObjectTypeProperties,
  113. NULL,
  114. &MartaGetWMIGuidTypeProperties,
  115. &MartaGetRegistryKeyTypeProperties
  116. };
  117. typedef DWORD (*FN_GET_PROPERTIES) (
  118. IN MARTA_CONTEXT Context,
  119. IN OUT PMARTA_OBJECT_PROPERTIES pProperties
  120. );
  121. FN_GET_PROPERTIES MartaGetProperties [] = {
  122. NULL,
  123. &MartaGetFileProperties,
  124. &MartaGetServiceProperties,
  125. &MartaGetPrinterProperties,
  126. &MartaGetRegistryKeyProperties,
  127. &MartaGetLMShareProperties,
  128. &MartaGetKernelProperties,
  129. &MartaGetWindowProperties,
  130. &MartaGetDsObjectProperties,
  131. &MartaGetDsObjectProperties,
  132. NULL,
  133. &MartaGetWMIGuidProperties,
  134. &MartaGetRegistryKeyProperties
  135. };
  136. typedef DWORD (*FN_GET_RIGHTS) (
  137. IN MARTA_CONTEXT Context,
  138. IN SECURITY_INFORMATION SecurityInfo,
  139. OUT PSECURITY_DESCRIPTOR * ppSecurityDescriptor
  140. );
  141. FN_GET_RIGHTS MartaGetRights [] = {
  142. NULL,
  143. &MartaGetFileRights,
  144. &MartaGetServiceRights,
  145. &MartaGetPrinterRights,
  146. &MartaGetRegistryKeyRights,
  147. &MartaGetLMShareRights,
  148. &MartaGetKernelRights,
  149. &MartaGetWindowRights,
  150. &MartaGetDsObjectRights,
  151. &MartaGetDsObjectRights,
  152. NULL,
  153. &MartaGetWMIGuidRights,
  154. &MartaGetRegistryKeyRights
  155. };
  156. typedef DWORD (*FN_OPEN_HANDLE_OBJECT) (
  157. IN HANDLE Handle,
  158. IN ACCESS_MASK AccessMask,
  159. OUT PMARTA_CONTEXT pContext
  160. );
  161. FN_OPEN_HANDLE_OBJECT MartaOpenHandleObject [] = {
  162. NULL,
  163. &MartaOpenFileHandleObject,
  164. &MartaOpenServiceHandleObject,
  165. &MartaOpenPrinterHandleObject,
  166. &MartaOpenRegistryKeyHandleObject,
  167. NULL,
  168. &MartaOpenKernelHandleObject,
  169. &MartaOpenWindowHandleObject,
  170. NULL,
  171. NULL,
  172. NULL,
  173. &MartaOpenWMIGuidHandleObject,
  174. &MartaOpenRegistryKeyHandleObject
  175. };
  176. typedef DWORD (*FN_OPEN_NAMED_OBJECT) (
  177. IN LPCWSTR pObjectName,
  178. IN ACCESS_MASK AccessMask,
  179. OUT PMARTA_CONTEXT pContext
  180. );
  181. FN_OPEN_NAMED_OBJECT MartaOpenNamedObject [] = {
  182. NULL,
  183. &MartaOpenFileNamedObject,
  184. &MartaOpenServiceNamedObject,
  185. &MartaOpenPrinterNamedObject,
  186. &MartaOpenRegistryKeyNamedObject,
  187. &MartaOpenLMShareNamedObject,
  188. &MartaOpenKernelNamedObject,
  189. &MartaOpenWindowNamedObject,
  190. &MartaOpenDsObjectNamedObject,
  191. &MartaOpenDsObjectNamedObject,
  192. NULL,
  193. &MartaOpenWMIGuidNamedObject,
  194. &MartaOpenRegistryKeyNamedObject
  195. };
  196. typedef DWORD (*FN_SET_RIGHTS) (
  197. IN MARTA_CONTEXT Context,
  198. IN SECURITY_INFORMATION SecurityInfo,
  199. IN PSECURITY_DESCRIPTOR pSecurityDescriptor
  200. );
  201. FN_SET_RIGHTS MartaSetRights [] = {
  202. NULL,
  203. &MartaSetFileRights,
  204. &MartaSetServiceRights,
  205. &MartaSetPrinterRights,
  206. &MartaSetRegistryKeyRights,
  207. &MartaSetLMShareRights,
  208. &MartaSetKernelRights,
  209. &MartaSetWindowRights,
  210. &MartaSetDsObjectRights,
  211. &MartaSetDsObjectRights,
  212. NULL,
  213. &MartaSetWMIGuidRights,
  214. &MartaSetRegistryKeyRights
  215. };
  216. typedef DWORD (*FN_GET_DESIRED_ACCESS) (
  217. IN SECURITY_OPEN_TYPE OpenType,
  218. IN BOOL Attribs,
  219. IN SECURITY_INFORMATION SecurityInfo
  220. );
  221. FN_GET_DESIRED_ACCESS MartaGetDesiredAccess [] = {
  222. NULL,
  223. &MartaGetFileDesiredAccess,
  224. &MartaGetDefaultDesiredAccess,
  225. &MartaGetDefaultDesiredAccess,
  226. &MartaGetRegistryKeyDesiredAccess,
  227. &MartaGetDefaultDesiredAccess,
  228. &MartaGetDefaultDesiredAccess,
  229. &MartaGetDefaultDesiredAccess,
  230. &MartaGetDefaultDesiredAccess,
  231. &MartaGetDefaultDesiredAccess,
  232. NULL,
  233. &MartaGetDefaultDesiredAccess,
  234. &MartaGetRegistryKey32DesiredAccess
  235. };
  236. typedef DWORD (*FN_REOPEN_CONTEXT) (
  237. IN OUT MARTA_CONTEXT Context,
  238. IN ACCESS_MASK AccessMask
  239. );
  240. FN_REOPEN_CONTEXT MartaReopenContext [] = {
  241. NULL,
  242. &MartaReopenFileContext,
  243. NULL,
  244. NULL,
  245. &MartaReopenRegistryKeyContext,
  246. NULL,
  247. NULL,
  248. NULL,
  249. NULL,
  250. NULL,
  251. NULL,
  252. NULL,
  253. &MartaReopenRegistryKeyContext
  254. };
  255. typedef DWORD (*FN_REOPEN_ORIG_CONTEXT) (
  256. IN OUT MARTA_CONTEXT Context,
  257. IN ACCESS_MASK AccessMask
  258. );
  259. FN_REOPEN_CONTEXT MartaReopenOrigContext [] = {
  260. NULL,
  261. &MartaReopenFileOrigContext,
  262. NULL,
  263. NULL,
  264. &MartaReopenRegistryKeyOrigContext,
  265. NULL,
  266. NULL,
  267. NULL,
  268. NULL,
  269. NULL,
  270. NULL,
  271. NULL,
  272. &MartaReopenRegistryKeyOrigContext
  273. };
  274. typedef DWORD (*FN_GET_PARENT_NAME) (
  275. IN LPWSTR ObjectName,
  276. OUT LPWSTR *pParentName
  277. );
  278. FN_GET_PARENT_NAME MartaGetParentName [] = {
  279. NULL,
  280. &MartaGetFileParentName,
  281. NULL,
  282. NULL,
  283. &MartaGetRegistryKeyParentName,
  284. NULL,
  285. NULL,
  286. NULL,
  287. &MartaGetDsParentName,
  288. &MartaGetDsParentName,
  289. NULL,
  290. NULL,
  291. &MartaGetRegistryKeyParentName
  292. };
  293. typedef DWORD (*FN_GET_NAME_FROM_CONTEXT) (
  294. IN LPWSTR DosObjectName,
  295. IN LPWSTR NtObjectName,
  296. IN MARTA_CONTEXT Context,
  297. OUT LPWSTR *pObjectName
  298. );
  299. FN_GET_NAME_FROM_CONTEXT MartaGetNameFromContext [] = {
  300. NULL,
  301. &MartaGetFileNameFromContext,
  302. NULL,
  303. NULL,
  304. &MartaGetRegistryKeyNameFromContext,
  305. NULL,
  306. NULL,
  307. NULL,
  308. NULL,
  309. NULL,
  310. NULL,
  311. NULL,
  312. &MartaGetRegistryKeyNameFromContext
  313. };
  314. #endif