Source code of Windows XP (NT5)
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.

338 lines
8.1 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1997
  6. //
  7. // File: lsaitf.h
  8. //
  9. // Contents: Prototypes for auth packages to call into LSA & SAM
  10. //
  11. //
  12. // History: 21-February-1997 Created MikeSw
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __LSAITF_H__
  16. #define __LSAITF_H__
  17. #include <samrpc.h>
  18. #include <lsarpc.h>
  19. #include <samisrv.h>
  20. #include <lsaisrv.h>
  21. NTSTATUS
  22. I_SamrSetInformationUser(
  23. IN SAMPR_HANDLE UserHandle,
  24. IN USER_INFORMATION_CLASS UserInformationClass,
  25. IN PSAMPR_USER_INFO_BUFFER Buffer
  26. );
  27. NTSTATUS
  28. I_SamrGetGroupsForUser(
  29. IN SAMPR_HANDLE UserHandle,
  30. OUT PSAMPR_GET_GROUPS_BUFFER *Groups
  31. );
  32. NTSTATUS
  33. I_SamrCloseHandle(
  34. IN OUT SAMPR_HANDLE * SamHandle
  35. );
  36. NTSTATUS
  37. I_SamrQueryInformationUser(
  38. IN SAMPR_HANDLE UserHandle,
  39. IN USER_INFORMATION_CLASS UserInformationClass,
  40. OUT PSAMPR_USER_INFO_BUFFER *Buffer
  41. );
  42. NTSTATUS
  43. I_SamrOpenUser(
  44. IN SAMPR_HANDLE DomainHandle,
  45. IN ACCESS_MASK DesiredAccess,
  46. IN ULONG UserId,
  47. OUT SAMPR_HANDLE * UserHandle
  48. );
  49. NTSTATUS
  50. I_SamrLookupNamesInDomain(
  51. IN SAMPR_HANDLE DomainHandle,
  52. IN ULONG Count,
  53. //
  54. // The following count must match SAM_MAXIMUM_LOOKUP_COUNT,
  55. // defined in ntsam.h
  56. //
  57. IN RPC_UNICODE_STRING Names[],
  58. OUT PSAMPR_ULONG_ARRAY RelativeIds,
  59. OUT PSAMPR_ULONG_ARRAY Use
  60. );
  61. NTSTATUS
  62. I_SamrLookupIdsInDomain(
  63. IN SAMPR_HANDLE DomainHandle,
  64. IN ULONG Count,
  65. IN PULONG RelativeIds,
  66. OUT PSAMPR_RETURNED_USTRING_ARRAY Names,
  67. OUT PSAMPR_ULONG_ARRAY Use
  68. );
  69. NTSTATUS
  70. I_SamrOpenDomain(
  71. IN SAMPR_HANDLE ServerHandle,
  72. IN ACCESS_MASK DesiredAccess,
  73. IN PRPC_SID DomainId,
  74. OUT SAMPR_HANDLE * DomainHandle
  75. );
  76. NTSTATUS
  77. I_SamrQueryInformationDomain(
  78. IN SAMPR_HANDLE DomainHandle,
  79. IN DOMAIN_INFORMATION_CLASS DomainInformationClass,
  80. OUT PSAMPR_DOMAIN_INFO_BUFFER *Buffer
  81. );
  82. NTSTATUS
  83. I_SamIConnect(
  84. IN PSAMPR_SERVER_NAME ServerName,
  85. OUT SAMPR_HANDLE *ServerHandle,
  86. IN ACCESS_MASK DesiredAccess,
  87. IN BOOLEAN TrustedClient
  88. );
  89. NTSTATUS
  90. I_SamIAccountRestrictions(
  91. IN SAM_HANDLE UserHandle,
  92. IN PUNICODE_STRING LogonWorkstation,
  93. IN PUNICODE_STRING Workstations,
  94. IN PLOGON_HOURS LogonHours,
  95. OUT PLARGE_INTEGER LogoffTime,
  96. OUT PLARGE_INTEGER KickoffTime
  97. );
  98. NTSTATUS
  99. I_SamIGetUserLogonInformation(
  100. IN SAMPR_HANDLE DomainHandle,
  101. IN ULONG Flags,
  102. IN PUNICODE_STRING AccountName,
  103. OUT PSAMPR_USER_INFO_BUFFER * Buffer,
  104. OUT PSID_AND_ATTRIBUTES_LIST ReverseMembership,
  105. OUT OPTIONAL SAMPR_HANDLE * UserHandle
  106. );
  107. NTSTATUS
  108. I_SamIGetUserLogonInformationEx(
  109. IN SAMPR_HANDLE DomainHandle,
  110. IN ULONG Flags,
  111. IN PUNICODE_STRING AccountName,
  112. IN ULONG WhichFields,
  113. OUT PSAMPR_USER_INFO_BUFFER * Buffer,
  114. OUT PSID_AND_ATTRIBUTES_LIST ReverseMembership,
  115. OUT OPTIONAL SAMPR_HANDLE * UserHandle
  116. );
  117. VOID
  118. I_SamIFree_SAMPR_GET_GROUPS_BUFFER (
  119. PSAMPR_GET_GROUPS_BUFFER Source
  120. );
  121. VOID
  122. I_SamIFree_SAMPR_USER_INFO_BUFFER (
  123. PSAMPR_USER_INFO_BUFFER Source,
  124. USER_INFORMATION_CLASS Branch
  125. );
  126. VOID
  127. I_SamIFree_SAMPR_ULONG_ARRAY (
  128. PSAMPR_ULONG_ARRAY Source
  129. );
  130. VOID
  131. I_SamIFree_SAMPR_RETURNED_USTRING_ARRAY (
  132. PSAMPR_RETURNED_USTRING_ARRAY Source
  133. );
  134. VOID I_SamIFreeSidAndAttributesList(
  135. IN PSID_AND_ATTRIBUTES_LIST List
  136. );
  137. VOID
  138. I_SamIIncrementPerformanceCounter(
  139. IN SAM_PERF_COUNTER_TYPE CounterType
  140. );
  141. VOID
  142. I_SamIFreeVoid(
  143. IN PVOID ptr
  144. );
  145. NTSTATUS
  146. I_SamIUpdateLogonStatistics(
  147. IN SAMPR_HANDLE DomainHandle,
  148. IN PSAM_LOGON_STATISTICS LogonStats
  149. );
  150. NTSTATUS
  151. I_SamIUPNFromUserHandle(
  152. IN SAMPR_HANDLE UserHandle,
  153. OUT BOOLEAN *UPNDefaulted,
  154. OUT PUNICODE_STRING UPN
  155. );
  156. NTSTATUS
  157. I_LsaIOpenPolicyTrusted(
  158. OUT PLSAPR_HANDLE PolicyHandle
  159. );
  160. NTSTATUS
  161. I_LsarClose(
  162. IN OUT LSAPR_HANDLE *ObjectHandle
  163. );
  164. NTSTATUS
  165. I_LsaIQueryInformationPolicyTrusted(
  166. IN POLICY_INFORMATION_CLASS InformationClass,
  167. OUT PLSAPR_POLICY_INFORMATION *Buffer
  168. );
  169. VOID
  170. I_LsaIFree_LSAPR_POLICY_INFORMATION (
  171. IN POLICY_INFORMATION_CLASS InformationClass,
  172. IN PLSAPR_POLICY_INFORMATION PolicyInformation
  173. );
  174. NTSTATUS
  175. I_LsarQueryInformationPolicy(
  176. IN LSAPR_HANDLE PolicyHandle,
  177. IN POLICY_INFORMATION_CLASS InformationClass,
  178. OUT PLSAPR_POLICY_INFORMATION *PolicyInformation
  179. );
  180. NTSTATUS
  181. I_LsarCreateSecret(
  182. IN LSAPR_HANDLE PolicyHandle,
  183. IN PLSAPR_UNICODE_STRING SecretName,
  184. IN ACCESS_MASK DesiredAccess,
  185. OUT LSAPR_HANDLE *SecretHandle
  186. );
  187. NTSTATUS
  188. I_LsarOpenSecret(
  189. IN LSAPR_HANDLE PolicyHandle,
  190. IN PLSAPR_UNICODE_STRING SecretName,
  191. IN ACCESS_MASK DesiredAccess,
  192. OUT LSAPR_HANDLE *SecretHandle
  193. );
  194. NTSTATUS
  195. I_LsarSetSecret(
  196. IN LSAPR_HANDLE SecretHandle,
  197. IN PLSAPR_CR_CIPHER_VALUE EncryptedCurrentValue,
  198. IN PLSAPR_CR_CIPHER_VALUE EncryptedOldValue
  199. );
  200. NTSTATUS
  201. I_LsarQuerySecret(
  202. IN LSAPR_HANDLE SecretHandle,
  203. IN OUT OPTIONAL PLSAPR_CR_CIPHER_VALUE *EncryptedCurrentValue,
  204. IN OUT OPTIONAL PLARGE_INTEGER CurrentValueSetTime,
  205. IN OUT OPTIONAL PLSAPR_CR_CIPHER_VALUE *EncryptedOldValue,
  206. IN OUT OPTIONAL PLARGE_INTEGER OldValueSetTime
  207. );
  208. NTSTATUS
  209. I_LsarDelete(
  210. IN OUT LSAPR_HANDLE ObjectHandle
  211. );
  212. VOID
  213. I_LsaIFree_LSAPR_CR_CIPHER_VALUE (
  214. IN PLSAPR_CR_CIPHER_VALUE CipherValue
  215. );
  216. NTSTATUS NTAPI
  217. I_LsaIRegisterPolicyChangeNotificationCallback(
  218. IN pfLsaPolicyChangeNotificationCallback Callback,
  219. IN POLICY_NOTIFICATION_INFORMATION_CLASS MonitorInfoClass
  220. );
  221. NTSTATUS NTAPI
  222. I_LsaIUnregisterPolicyChangeNotificationCallback(
  223. IN pfLsaPolicyChangeNotificationCallback Callback,
  224. IN POLICY_NOTIFICATION_INFORMATION_CLASS MonitorInfoClass
  225. );
  226. NTSTATUS
  227. I_LsaIAuditAccountLogon(
  228. IN ULONG AuditId,
  229. IN BOOLEAN Successful,
  230. IN PUNICODE_STRING Source,
  231. IN PUNICODE_STRING ClientName,
  232. IN PUNICODE_STRING MappedName,
  233. IN NTSTATUS Status OPTIONAL
  234. );
  235. NTSTATUS
  236. I_LsaIGetLogonGuid(
  237. IN PUNICODE_STRING pUserName,
  238. IN PUNICODE_STRING pUserDomain,
  239. IN PBYTE pBuffer,
  240. IN UINT BufferSize,
  241. OUT LPGUID pLogonGuid
  242. );
  243. NTSTATUS
  244. I_LsaISetLogonGuidInLogonSession(
  245. IN PLUID pLogonId,
  246. IN LPGUID pLogonGuid
  247. );
  248. VOID
  249. I_LsaIAuditKerberosLogon(
  250. IN NTSTATUS LogonStatus,
  251. IN NTSTATUS LogonSubStatus,
  252. IN PUNICODE_STRING AccountName,
  253. IN PUNICODE_STRING AuthenticatingAuthority,
  254. IN PUNICODE_STRING WorkstationName,
  255. IN PSID UserSid, OPTIONAL
  256. IN SECURITY_LOGON_TYPE LogonType,
  257. IN PTOKEN_SOURCE TokenSource,
  258. IN PLUID LogonId,
  259. IN LPGUID LogonGuid
  260. );
  261. NTSTATUS
  262. I_LsaIAuditLogonUsingExplicitCreds(
  263. IN USHORT AuditEventType,
  264. IN PSID pUser1Sid,
  265. IN PUNICODE_STRING pUser1Name,
  266. IN PUNICODE_STRING pUser1Domain,
  267. IN PLUID pUser1LogonId,
  268. IN LPGUID pUser1LogonGuid,
  269. IN PUNICODE_STRING pUser2Name,
  270. IN PUNICODE_STRING pUser2Domain,
  271. IN LPGUID pUser2LogonGuid
  272. );
  273. NTSTATUS
  274. I_LsaICallPackage(
  275. IN PUNICODE_STRING AuthenticationPackage,
  276. IN PVOID ProtocolSubmitBuffer,
  277. IN ULONG SubmitBufferLength,
  278. OUT PVOID *ProtocolReturnBuffer,
  279. OUT PULONG ReturnBufferLength,
  280. OUT PNTSTATUS ProtocolStatus
  281. );
  282. NTSTATUS NTAPI
  283. I_LsaIAddNameToLogonSession(
  284. IN PLUID LogonId,
  285. IN ULONG NameFormat,
  286. IN PUNICODE_STRING Name
  287. );
  288. #endif // __LSAITF_H__