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.

317 lines
6.7 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. srvrpcp.h
  5. Abstract:
  6. This module defines private APIs called from the RPC interfaces on server
  7. site.
  8. Author:
  9. Jin Huang (jinhuang) 28-Oct-1996
  10. Revision History:
  11. jinhuang 26-Jan-1998 splitted for client-server
  12. --*/
  13. #ifndef _srvrpcp_
  14. #define _srvrpcp_
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. typedef SCESTATUS (WINAPI *PFSCEINFWRITEINFO)(LPCTSTR, AREA_INFORMATION, PSCE_PROFILE_INFO, PSCE_ERROR_LOG_INFO *);
  19. typedef SCESTATUS (WINAPI *PFSCEGETINFO)(PVOID, SCETYPE, AREA_INFORMATION, PSCE_PROFILE_INFO *, PSCE_ERROR_LOG_INFO *);
  20. typedef SCESTATUS (WINAPI *PFSCEOPENPROFILE)(PCWSTR, SCE_FORMAT_TYPE, PVOID *);
  21. typedef SCESTATUS (WINAPI *PFSCECLOSEPROFILE)(PVOID *);
  22. #define SCEPOL_SAVE_BUFFER 0x1
  23. #define SCEPOL_SAVE_DB 0x2
  24. #define SCEPOL_SYSTEM_SETTINGS 0x4
  25. //
  26. // svcsrv.cpp
  27. //
  28. SCESTATUS
  29. SceSvcpUpdateInfo(
  30. IN PSCECONTEXT Context,
  31. IN PCWSTR ServiceName,
  32. IN PSCESVC_CONFIGURATION_INFO Info
  33. );
  34. SCESTATUS
  35. SceSvcpQueryInfo(
  36. IN PSCECONTEXT Context,
  37. IN SCESVC_INFO_TYPE SceSvcType,
  38. IN PCWSTR ServiceName,
  39. IN PWSTR Prefix OPTIONAL,
  40. IN BOOL bExact,
  41. OUT PVOID *ppvInfo,
  42. OUT PSCE_ENUMERATION_CONTEXT psceEnumHandle
  43. );
  44. SCESTATUS
  45. SceSvcpSetInfo(
  46. IN PSCECONTEXT Context,
  47. IN SCESVC_INFO_TYPE SceSvcType,
  48. IN PCWSTR ServiceName,
  49. IN PWSTR Prefix OPTIONAL,
  50. IN BOOL bExact,
  51. IN LONG GpoID,
  52. IN PVOID pvInfo OPTIONAL
  53. );
  54. //
  55. // setupsrv.cpp
  56. //
  57. DWORD
  58. ScepSetupUpdateObject(
  59. IN PSCECONTEXT Context,
  60. IN PWSTR ObjectFullName,
  61. IN SE_OBJECT_TYPE ObjectType,
  62. IN UINT nFlag,
  63. IN PWSTR SDText
  64. );
  65. DWORD
  66. ScepSetupMoveFile(
  67. IN PSCECONTEXT Context,
  68. PWSTR OldName,
  69. PWSTR NewName OPTIONAL,
  70. PWSTR SDText OPTIONAL
  71. );
  72. //
  73. // pfget.cpp
  74. //
  75. SCESTATUS
  76. ScepGetDatabaseInfo(
  77. IN PSCECONTEXT Context,
  78. IN SCETYPE ProfileType,
  79. IN AREA_INFORMATION Area,
  80. IN DWORD dwAccountFormat,
  81. OUT PSCE_PROFILE_INFO *ppInfoBuffer,
  82. IN OUT PSCE_ERROR_LOG_INFO *Errlog OPTIONAL
  83. );
  84. SCESTATUS
  85. ScepGetObjectChildren(
  86. IN PSCECONTEXT Context,
  87. IN SCETYPE ProfileType,
  88. IN AREA_INFORMATION Area,
  89. IN PWSTR ObjectPrefix,
  90. IN SCE_SUBOBJECT_TYPE Option,
  91. OUT PVOID *Buffer,
  92. OUT PSCE_ERROR_LOG_INFO *Errlog OPTIONAL
  93. );
  94. SCESTATUS
  95. ScepGetObjectSecurity(
  96. IN PSCECONTEXT Context,
  97. IN SCETYPE ProfileType,
  98. IN AREA_INFORMATION Area,
  99. IN PWSTR ObjectName,
  100. OUT PSCE_OBJECT_SECURITY *ObjSecurity
  101. );
  102. //
  103. // ScepCopyObjects is called for each area
  104. // within the RPC interface SceRpcCopyObjects
  105. // for system service or security policy area
  106. // attchments needs to be considered
  107. //
  108. SCESTATUS
  109. ScepGetAnalysisSummary(
  110. IN PSCECONTEXT Context,
  111. IN AREA_INFORMATION Area,
  112. OUT PDWORD pCount
  113. );
  114. //
  115. // server.cpp
  116. //
  117. SCESTATUS
  118. ScepOpenDatabase(
  119. IN PCWSTR DatabaseName,
  120. IN DWORD OpenOption,
  121. IN SCEJET_OPEN_TYPE OpenType,
  122. OUT PSCECONTEXT *pContext
  123. );
  124. SCESTATUS
  125. ScepCloseDatabase(
  126. IN PSCECONTEXT Context
  127. );
  128. //
  129. // SceJetGetDescription, SceJetGetTimeStamp
  130. // SceJetStartTransaction, SceJetCommitTransaction, SceJetRollback,
  131. // RtlGetNtProductType (for SceRpcGetServerProductType)
  132. // are called within the RPC interfaces directly
  133. //
  134. //
  135. // config.c
  136. //
  137. SCESTATUS
  138. ScepConfigureSystem(
  139. IN PCWSTR InfFileName OPTIONAL,
  140. IN PWSTR DatabaseName,
  141. IN DWORD ConfigOptions,
  142. IN BOOL bAdminLogon,
  143. IN AREA_INFORMATION Area,
  144. OUT PDWORD pdWarning OPTIONAL
  145. );
  146. //
  147. // analyze.c
  148. //
  149. SCESTATUS
  150. ScepAnalyzeSystem(
  151. IN PCWSTR InfFileName OPTIONAL,
  152. IN PWSTR DatabaseName,
  153. IN DWORD AnalyzeOptions,
  154. IN BOOL bAdminLogon,
  155. IN AREA_INFORMATION Area,
  156. IN PDWORD pdWarning OPTIONAL,
  157. IN PWSTR InfRollback OPTIONAL
  158. );
  159. SCESTATUS
  160. ScepAnalyzeSystemAccess(
  161. IN PSCE_PROFILE_INFO pSmpInfo,
  162. IN PSCE_PROFILE_INFO pScpInfo OPTIONAL,
  163. IN DWORD dwSaveOption,
  164. OUT BOOL *pbChanged,
  165. IN OUT PSCE_ERROR_LOG_INFO *pErrLog
  166. );
  167. //
  168. // editsave.c
  169. //
  170. SCESTATUS
  171. ScepUpdateDatabaseInfo(
  172. IN PSCECONTEXT hProfile,
  173. IN AREA_INFORMATION Area,
  174. IN PSCE_PROFILE_INFO pInfo
  175. );
  176. SCESTATUS
  177. ScepUpdateLocalTable(
  178. IN PSCECONTEXT hProfile,
  179. IN AREA_INFORMATION Area,
  180. IN PSCE_PROFILE_INFO pInfo,
  181. IN DWORD dwMode
  182. );
  183. SCESTATUS
  184. ScepUpdateObjectInfo(
  185. IN PSCECONTEXT hProfile,
  186. IN AREA_INFORMATION Area,
  187. IN PWSTR ObjectName,
  188. IN DWORD NameLen,
  189. IN BYTE ConfigStatus,
  190. IN BOOL IsContainer,
  191. IN PSECURITY_DESCRIPTOR pSD,
  192. IN SECURITY_INFORMATION SeInfo,
  193. OUT PBYTE pAnalysisStatus
  194. );
  195. //
  196. // polsrv.cpp
  197. //
  198. DWORD
  199. ScepNotifyGetChangedPolicies(
  200. IN SECURITY_DB_TYPE DbType,
  201. IN SECURITY_DB_DELTA_TYPE DeltaType,
  202. IN SECURITY_DB_OBJECT_TYPE ObjectType,
  203. IN PSID ObjectSid OPTIONAL,
  204. IN OUT PSCE_PROFILE_INFO pSmpInfo,
  205. IN PSCE_PROFILE_INFO pScpInfo OPTIONAL,
  206. IN BOOL bSaveToLocal,
  207. IN DWORD ExplicitLowRight,
  208. IN DWORD ExplicitHighRight,
  209. OUT BOOL *pbChanged
  210. );
  211. DWORD
  212. ScepNotifySaveChangedPolicies(
  213. IN PSCECONTEXT hProfile,
  214. IN SECURITY_DB_TYPE DbType,
  215. IN AREA_INFORMATION Area,
  216. IN PSCE_PROFILE_INFO pInfo,
  217. IN PSCE_PROFILE_INFO pMergedInfo OPTIONAL
  218. );
  219. #define SCEGPO_INSETUP_NT4 1
  220. #define SCEGPO_INSETUP_NT5 2
  221. #define SCEGPO_NOCHECK_EXISTENCE 3
  222. DWORD
  223. ScepNotifyGetDefaultGPOTemplateName(
  224. IN UNICODE_STRING DnsDomainName,
  225. IN PWSTR ComputerName OPTIONAL,
  226. IN BOOL bDomainPolicy,
  227. IN DWORD dwInSetup,
  228. OUT LPTSTR *pTemplateName
  229. );
  230. DWORD
  231. ScepNotifySaveNotifications(
  232. IN PWSTR TemplateName,
  233. IN SECURITY_DB_TYPE DbType,
  234. IN SECURITY_DB_OBJECT_TYPE ObjectType,
  235. IN SECURITY_DB_DELTA_TYPE DeltaType,
  236. IN PSID ObjectSid OPTIONAL
  237. );
  238. DWORD
  239. ScepNotifyUpdateGPOVersion(
  240. IN PWSTR GpoTemplateName,
  241. IN BOOL bDomainPolicy
  242. );
  243. //
  244. // analyze.cpp
  245. //
  246. SCESTATUS
  247. ScepGetSystemSecurity(
  248. IN AREA_INFORMATION Area,
  249. IN DWORD Options,
  250. OUT PSCE_PROFILE_INFO *ppInfo,
  251. OUT PSCE_ERROR_LOG_INFO *pErrLog
  252. );
  253. //
  254. // config.cpp
  255. //
  256. SCESTATUS
  257. ScepSetSystemSecurity(
  258. IN AREA_INFORMATION Area,
  259. IN DWORD ConfigOptions,
  260. IN PSCE_PROFILE_INFO pInfo,
  261. OUT PSCE_ERROR_LOG_INFO *pErrLog
  262. );
  263. #ifdef __cplusplus
  264. }
  265. #endif
  266. #endif