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.

777 lines
19 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. samisrv.h
  5. Abstract:
  6. This file contain private routines for use by Trusted SAM clients
  7. which live in the same process as the SAM server.
  8. Included in these routines are services for freeing buffers returned
  9. by RPC server stub routines (SamrXxx() routines).
  10. Author:
  11. Cliff Van Dyke (CliffV) 26-Feb-1992
  12. Environment:
  13. User Mode - Win32
  14. Revision History:
  15. --*/
  16. #ifndef _SAMISRV_
  17. #define _SAMISRV_
  18. /////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // Data types used by SAM and Netlogon for database replication //
  21. // //
  22. /////////////////////////////////////////////////////////////////////////////
  23. typedef enum _SECURITY_DB_TYPE {
  24. SecurityDbSam = 1,
  25. SecurityDbLsa
  26. } SECURITY_DB_TYPE, *PSECURITY_DB_TYPE;
  27. //
  28. // These structures are used to get and set private data. Note that
  29. // DataType must be the first field of every such structure.
  30. //
  31. typedef enum _SAMI_PRIVATE_DATA_TYPE {
  32. SamPrivateDataNextRid = 1,
  33. SamPrivateDataPassword
  34. } SAMI_PRIVATE_DATA_TYPE, *PSAMI_PRIVATE_DATA_TYPE;
  35. typedef struct _SAMI_PRIVATE_DATA_NEXTRID_TYPE {
  36. SAMI_PRIVATE_DATA_TYPE DataType;
  37. ULONG NextRid;
  38. } SAMI_PRIVATE_DATA_NEXTRID_TYPE, *PSAMI_PRIVATE_DATA_NEXTRID_TYPE;
  39. typedef struct _SAMI_PRIVATE_DATA_PASSWORD_TYPE {
  40. SAMI_PRIVATE_DATA_TYPE DataType;
  41. UNICODE_STRING CaseInsensitiveDbcs;
  42. ENCRYPTED_LM_OWF_PASSWORD CaseInsensitiveDbcsBuffer;
  43. UNICODE_STRING CaseSensitiveUnicode;
  44. ENCRYPTED_NT_OWF_PASSWORD CaseSensitiveUnicodeBuffer;
  45. UNICODE_STRING LmPasswordHistory;
  46. UNICODE_STRING NtPasswordHistory;
  47. } SAMI_PRIVATE_DATA_PASSWORD_TYPE, *PSAMI_PRIVATE_DATA_PASSWORD_TYPE;
  48. typedef struct _SAMP_UNICODE_STRING_RELATIVE {
  49. USHORT Length;
  50. USHORT MaximumLength;
  51. ULONG Buffer; // note buffer is really an offset
  52. } SAMP_UNICODE_STRING_RELATIVE , *PSAMP_UNICODE_STRING_RELATIVE;
  53. typedef struct _SAMI_PRIVATE_DATA_PASSWORD_TYPE_RELATIVE {
  54. SAMI_PRIVATE_DATA_TYPE DataType;
  55. SAMP_UNICODE_STRING_RELATIVE CaseInsensitiveDbcs;
  56. ENCRYPTED_LM_OWF_PASSWORD CaseInsensitiveDbcsBuffer;
  57. SAMP_UNICODE_STRING_RELATIVE CaseSensitiveUnicode;
  58. ENCRYPTED_NT_OWF_PASSWORD CaseSensitiveUnicodeBuffer;
  59. SAMP_UNICODE_STRING_RELATIVE LmPasswordHistory;
  60. SAMP_UNICODE_STRING_RELATIVE NtPasswordHistory;
  61. } SAMI_PRIVATE_DATA_PASSWORD_RELATIVE_TYPE, *PSAMI_PRIVATE_DATA_PASSWORD_RELATIVE_TYPE;
  62. #define SAM_CLEARTEXT_CREDENTIAL_NAME L"CLEARTEXT"
  63. NTSTATUS
  64. SamISetPasswordInfoOnPdc(
  65. IN SAMPR_HANDLE SamDomainHandle,
  66. IN PUCHAR OpaqueBuffer,
  67. IN ULONG BufferLength
  68. );
  69. NTSTATUS
  70. SamIResetBadPwdCountOnPdc(
  71. IN SAMPR_HANDLE SamUserHandle
  72. );
  73. //////////////////////////////////////////////////////////////////////////////
  74. // //
  75. // //
  76. // Flag Definitions for SamIGetUserLogonInformation //
  77. // //
  78. // //
  79. //////////////////////////////////////////////////////////////////////////////
  80. #define SAM_GET_MEMBERSHIPS_NO_GC ((ULONG)0x00000001)
  81. #define SAM_GET_MEMBERSHIPS_TWO_PHASE ((ULONG)0x00000002)
  82. #define SAM_GET_MEMBERSHIPS_MIXED_DOMAIN ((ULONG)0x00000004)
  83. #define SAM_NO_MEMBERSHIPS ((ULONG)0x00000008)
  84. #define SAM_OPEN_BY_ALTERNATE_ID ((ULONG)0x00000010)
  85. #define SAM_OPEN_BY_UPN ((ULONG)0x00000020)
  86. #define SAM_OPEN_BY_SPN ((ULONG)0x00000040)
  87. #define SAM_OPEN_BY_SID ((ULONG)0x00000080)
  88. #define SAM_OPEN_BY_GUID ((ULONG)0x00000100)
  89. #define SAM_OPEN_BY_UPN_OR_ACCOUNTNAME ((ULONG)0x00000200)
  90. ///////////////////////////////////////////////////////////////////////////////
  91. // //
  92. // Data types used by SamIUpdateLogonStatistics //
  93. // //
  94. ///////////////////////////////////////////////////////////////////////////////
  95. typedef enum _SAM_CLIENT_INFO_ENUM
  96. {
  97. SamClientNoInformation = 0,
  98. SamClientIpAddr = 1
  99. } SAM_CLIENT_INFO_TYPE, *PSAM_CLIENT_INFO_TYPE;
  100. typedef struct _SAM_CLIENT_INFO
  101. {
  102. SAM_CLIENT_INFO_TYPE Type;
  103. union {
  104. ULONG IpAddr; // corresponds to type SamClientIpAddr
  105. } Data;
  106. } SAM_CLIENT_INFO, *PSAM_CLIENT_INFO;
  107. typedef struct _SAM_LOGON_STATISTICS
  108. {
  109. ULONG StatisticsToApply;
  110. USHORT BadPasswordCount;
  111. USHORT LogonCount;
  112. LARGE_INTEGER LastLogon;
  113. LARGE_INTEGER LastLogoff;
  114. UNICODE_STRING Workstation;
  115. SAM_CLIENT_INFO ClientInfo;
  116. } SAM_LOGON_STATISTICS, *PSAM_LOGON_STATISTICS;
  117. ///////////////////////////////////////////////////////////////////////////////
  118. // //
  119. // Data types used by Reverse Membership Query Routines //
  120. // //
  121. ///////////////////////////////////////////////////////////////////////////////
  122. typedef struct _SID_AND_ATTRIBUTES_LIST {
  123. ULONG Count;
  124. PSID_AND_ATTRIBUTES SidAndAttributes;
  125. } SID_AND_ATTRIBUTES_LIST , *PSID_AND_ATTRIBUTES_LIST;
  126. ///////////////////////////////////////////////////////////////////////////////
  127. // //
  128. // Data types used by Promotion/Demotion operations //
  129. // //
  130. ///////////////////////////////////////////////////////////////////////////////
  131. //
  132. // These flags indicate what type of install
  133. //
  134. #define SAMP_PROMOTE_ENTERPRISE ((ULONG)0x00000001)
  135. #define SAMP_PROMOTE_DOMAIN ((ULONG)0x00000002)
  136. #define SAMP_PROMOTE_REPLICA ((ULONG)0x00000004)
  137. //
  138. // When a new domain, these flags indicate how to seed the
  139. // initial security pricipals in the domain
  140. //
  141. #define SAMP_PROMOTE_UPGRADE ((ULONG)0x00000008)
  142. #define SAMP_PROMOTE_MIGRATE ((ULONG)0x00000010)
  143. #define SAMP_PROMOTE_CREATE ((ULONG)0x00000020)
  144. #define SAMP_PROMOTE_ALLOW_ANON ((ULONG)0x00000040)
  145. #define SAMP_PROMOTE_DFLT_REPAIR_PWD ((ULONG)0x00000080)
  146. //
  147. // Flags for demote
  148. //
  149. #define SAMP_DEMOTE_STANDALONE ((ULONG)0x00000040)
  150. #define SAMP_DEMOTE_MEMBER ((ULONG)0x00000080)
  151. // unused
  152. #define SAMP_DEMOTE_LAST_DOMAIN ((ULONG)0x00000100)
  153. #define SAMP_TEMP_UPGRADE ((ULONG)0x00000200)
  154. //
  155. // This flag is not passed into SamIPromote; rather it is used
  156. // to trigger new NT5 account creations on gui mode setup
  157. // of NT5 to NT5 upgrades
  158. //
  159. #define SAMP_PROMOTE_INTERNAL_UPGRADE ((ULONG)0x00000400)
  160. ///////////////////////////////////////////////////////////////////////////////
  161. // //
  162. // The following prototypes are usable throughout the process that SAM //
  163. // resides in. This may include calls by LAN Manager code that is not //
  164. // part of SAM but is in the same process as SAM. //
  165. // //
  166. ///////////////////////////////////////////////////////////////////////////////
  167. NTSTATUS
  168. SamIConnect(
  169. IN PSAMPR_SERVER_NAME ServerName,
  170. OUT SAMPR_HANDLE *ServerHandle,
  171. IN ACCESS_MASK DesiredAccess,
  172. IN BOOLEAN TrustedClient
  173. );
  174. NTSTATUS
  175. SamIAccountRestrictions(
  176. IN SAM_HANDLE UserHandle,
  177. IN PUNICODE_STRING LogonWorkstation,
  178. IN PUNICODE_STRING Workstations,
  179. IN PLOGON_HOURS LogonHours,
  180. OUT PLARGE_INTEGER LogoffTime,
  181. OUT PLARGE_INTEGER KickoffTime
  182. );
  183. NTSTATUS
  184. SamIUpdateLogonStatistics(
  185. IN SAM_HANDLE UserHandle,
  186. IN PSAM_LOGON_STATISTICS LogonStats
  187. );
  188. NTSTATUS
  189. SamICreateAccountByRid(
  190. IN SAMPR_HANDLE DomainHandle,
  191. IN SAM_ACCOUNT_TYPE AccountType,
  192. IN ULONG RelativeId,
  193. IN PRPC_UNICODE_STRING AccountName,
  194. IN ACCESS_MASK DesiredAccess,
  195. OUT SAMPR_HANDLE *AccountHandle,
  196. OUT ULONG *ConflictingAccountRid
  197. );
  198. NTSTATUS
  199. SamIGetSerialNumberDomain(
  200. IN SAMPR_HANDLE DomainHandle,
  201. OUT PLARGE_INTEGER ModifiedCount,
  202. OUT PLARGE_INTEGER CreationTime
  203. );
  204. NTSTATUS
  205. SamISetSerialNumberDomain(
  206. IN SAMPR_HANDLE DomainHandle,
  207. IN PLARGE_INTEGER ModifiedCount,
  208. IN PLARGE_INTEGER CreationTime,
  209. IN BOOLEAN StartOfFullSync
  210. );
  211. NTSTATUS
  212. SamIGetPrivateData(
  213. IN SAMPR_HANDLE SamHandle,
  214. IN PSAMI_PRIVATE_DATA_TYPE PrivateDataType,
  215. OUT PBOOLEAN SensitiveData,
  216. OUT PULONG DataLength,
  217. OUT PVOID *Data
  218. );
  219. NTSTATUS
  220. SamISetPrivateData(
  221. IN SAMPR_HANDLE SamHandle,
  222. IN ULONG DataLength,
  223. IN PVOID Data
  224. );
  225. NTSTATUS
  226. SamISetAuditingInformation(
  227. IN PPOLICY_AUDIT_EVENTS_INFO PolicyAuditEventsInfo
  228. );
  229. NTSTATUS
  230. SamINotifyDelta (
  231. IN SAMPR_HANDLE DomainHandle,
  232. IN SECURITY_DB_DELTA_TYPE DeltaType,
  233. IN SECURITY_DB_OBJECT_TYPE ObjectType,
  234. IN ULONG ObjectRid,
  235. IN PUNICODE_STRING ObjectName,
  236. IN ULONG ReplicateImmediately,
  237. IN PSAM_DELTA_DATA DeltaData OPTIONAL
  238. );
  239. NTSTATUS
  240. SamIEnumerateAccountRids(
  241. IN SAMPR_HANDLE DomainHandle,
  242. IN ULONG AccountTypesMask,
  243. IN ULONG StartingRid,
  244. IN ULONG PreferedMaximumLength,
  245. OUT PULONG ReturnCount,
  246. OUT PULONG *AccountRids
  247. );
  248. NTSTATUS
  249. SamIGetUserLogonInformation(
  250. IN SAMPR_HANDLE DomainHandle,
  251. IN ULONG Flags,
  252. IN PUNICODE_STRING AccountName,
  253. OUT PSAMPR_USER_INFO_BUFFER * Buffer,
  254. OUT PSID_AND_ATTRIBUTES_LIST ReverseMembership,
  255. OUT OPTIONAL SAMPR_HANDLE * UserHandle
  256. );
  257. NTSTATUS
  258. SamIGetUserLogonInformationEx(
  259. IN SAMPR_HANDLE DomainHandle,
  260. IN ULONG Flags,
  261. IN PUNICODE_STRING AccountName,
  262. IN ULONG WhichFields,
  263. OUT PSAMPR_USER_INFO_BUFFER * Buffer,
  264. OUT PSID_AND_ATTRIBUTES_LIST ReverseMembership,
  265. OUT OPTIONAL SAMPR_HANDLE * UserHandle
  266. );
  267. NTSTATUS
  268. SamIGetUserLogonInformation2(
  269. IN SAMPR_HANDLE DomainHandle,
  270. IN ULONG Flags,
  271. IN PUNICODE_STRING AccountName,
  272. IN ULONG WhichFields,
  273. IN ULONG ExtendedFields,
  274. OUT PUSER_INTERNAL6_INFORMATION * Buffer,
  275. OUT PSID_AND_ATTRIBUTES_LIST ReverseMembership,
  276. OUT OPTIONAL SAMPR_HANDLE * UserHandle
  277. );
  278. NTSTATUS
  279. SamIGetResourceGroupMembershipsTransitive(
  280. IN SAMPR_HANDLE DomainHandle,
  281. IN PSAMPR_PSID_ARRAY SidArray,
  282. IN ULONG Flags,
  283. OUT PSAMPR_PSID_ARRAY * Membership
  284. );
  285. NTSTATUS
  286. SamIGetAliasMembership(
  287. IN SAMPR_HANDLE DomainHandle,
  288. IN PSAMPR_PSID_ARRAY SidArray,
  289. OUT PSAMPR_ULONG_ARRAY Membership
  290. );
  291. NTSTATUS
  292. SamIOpenUserByAlternateId(
  293. IN SAMPR_HANDLE DomainHandle,
  294. IN ACCESS_MASK DesiredAccess,
  295. IN PUNICODE_STRING AlternateId,
  296. OUT SAMPR_HANDLE *UserHandle
  297. );
  298. NTSTATUS
  299. SamIOpenAccount(
  300. IN SAMPR_HANDLE DomainHandle,
  301. IN ULONG AccountRid,
  302. IN SECURITY_DB_OBJECT_TYPE ObjectType,
  303. OUT SAMPR_HANDLE *AccountHandle
  304. );
  305. NTSTATUS
  306. SamIChangePasswordForeignUser(
  307. IN PUNICODE_STRING UserName,
  308. IN PUNICODE_STRING NewPassword,
  309. IN OPTIONAL HANDLE ClientToken,
  310. IN ACCESS_MASK DesiredAccess
  311. );
  312. NTSTATUS
  313. SamIChangePasswordForeignUser2(
  314. IN PSAM_CLIENT_INFO ClientInfo, OPTIONAL
  315. IN PUNICODE_STRING UserName,
  316. IN PUNICODE_STRING NewPassword,
  317. IN OPTIONAL HANDLE ClientToken,
  318. IN ACCESS_MASK DesiredAccess
  319. );
  320. NTSTATUS
  321. SamISetPasswordForeignUser(
  322. IN PUNICODE_STRING UserName,
  323. IN PUNICODE_STRING NewPassword,
  324. IN HANDLE ClientToken
  325. );
  326. NTSTATUS
  327. SamISetPasswordForeignUser2(
  328. IN PSAM_CLIENT_INFO ClientInfo, OPTIONAL
  329. IN PUNICODE_STRING UserName,
  330. IN PUNICODE_STRING NewPassword,
  331. IN HANDLE ClientToken
  332. );
  333. NTSTATUS
  334. SamIPromote(
  335. IN ULONG PromoteFlags,
  336. IN PPOLICY_PRIMARY_DOMAIN_INFO NewPrimaryDomainInfo OPTIONAL,
  337. IN PUNICODE_STRING AdminPassword OPTIONAL,
  338. IN PUNICODE_STRING SafeModeAdminPassword OPTIONAL
  339. );
  340. NTSTATUS
  341. SamIPromoteUndo(
  342. VOID
  343. );
  344. NTSTATUS
  345. SamIDemote(
  346. IN ULONG DemoteFlags,
  347. IN PPOLICY_ACCOUNT_DOMAIN_INFO NewAccountDomainInfo,
  348. IN LPWSTR AdminPassword OPTIONAL
  349. );
  350. NTSTATUS
  351. SamIDemoteUndo(
  352. VOID
  353. );
  354. NTSTATUS
  355. SamIReplaceDownlevelDatabase(
  356. IN PPOLICY_ACCOUNT_DOMAIN_INFO NewAccountDomainInfo,
  357. IN LPWSTR NewAdminPassword,
  358. OUT ULONG *ExtendedWinError OPTIONAL
  359. );
  360. NTSTATUS
  361. SamILoadDownlevelDatabase(
  362. OUT ULONG *ExtendedWinError OPTIONAL
  363. );
  364. NTSTATUS
  365. SamIUnLoadDownlevelDatabase(
  366. OUT ULONG *ExtendedWinError OPTIONAL
  367. );
  368. BOOLEAN
  369. SamIMixedDomain(
  370. IN SAMPR_HANDLE DomainHandle
  371. );
  372. NTSTATUS
  373. SamIMixedDomain2(
  374. IN PSID DomainSid,
  375. OUT BOOLEAN * MixedDomain
  376. );
  377. NTSTATUS
  378. SamIDoFSMORoleChange(
  379. IN SAMPR_HANDLE DomainHandle
  380. );
  381. NTSTATUS
  382. SamINotifyRoleChange(
  383. IN PSID DomainSid,
  384. IN DOMAIN_SERVER_ROLE NewRole
  385. );
  386. NTSTATUS
  387. SamIQueryServerRole(
  388. IN SAMPR_HANDLE DomainHandle,
  389. OUT DOMAIN_SERVER_ROLE *ServerRole
  390. );
  391. NTSTATUS
  392. SamIQueryServerRole2(
  393. IN PSID DomainSid,
  394. OUT DOMAIN_SERVER_ROLE *ServerRole
  395. );
  396. NTSTATUS
  397. SamISameSite(
  398. OUT BOOLEAN * result
  399. );
  400. //
  401. // Routines called by the NTDSA
  402. //
  403. typedef enum
  404. {
  405. SampNotifySiteChanged = 0
  406. } SAMP_NOTIFY_SERVER_CHANGE;
  407. VOID
  408. SamINotifyServerDelta(
  409. IN SAMP_NOTIFY_SERVER_CHANGE Change
  410. );
  411. ///////////////////////////////////////////////////////////////
  412. // //
  413. // The following functions are used to support in process //
  414. // client operations for upgrades from NT4. //
  415. // //
  416. ///////////////////////////////////////////////////////////////
  417. BOOLEAN
  418. SamINT4UpgradeInProgress(
  419. VOID
  420. );
  421. NTSTATUS
  422. SamIEnumerateInterdomainTrustAccountsForUpgrade(
  423. IN OUT PULONG EnumerationContext,
  424. OUT PSAMPR_ENUMERATION_BUFFER *Buffer,
  425. IN ULONG PreferredMaximumLength,
  426. OUT PULONG CountReturned
  427. );
  428. NTSTATUS
  429. SamIGetInterdomainTrustAccountPasswordsForUpgrade(
  430. IN ULONG AccountRid,
  431. OUT PUCHAR NtOwfPassword,
  432. OUT BOOLEAN *NtPasswordPresent,
  433. OUT PUCHAR LmOwfPassword,
  434. OUT BOOLEAN *LmPasswordPresent
  435. );
  436. //
  437. // Values to pass in as Options SamIGCLookup*
  438. //
  439. //
  440. // Indicates to lookup by sid history as well
  441. //
  442. #define SAMP_LOOKUP_BY_SID_HISTORY 0x00000001
  443. //
  444. // Indicates to lookp by UPN as well
  445. //
  446. #define SAMP_LOOKUP_BY_UPN 0x00000002
  447. //
  448. // Values to be returned in Flags
  449. //
  450. //
  451. // Indicates the Sid was resolved by Sid History
  452. //
  453. #define SAMP_FOUND_BY_SID_HISTORY 0x00000001
  454. //
  455. // Indicates the name passed in was the sam account name (UPN)
  456. //
  457. #define SAMP_FOUND_BY_SAM_ACCOUNT_NAME 0x00000002
  458. //
  459. // Indicates that entry was not resolved but does belong to an externally
  460. // trusted forest
  461. //
  462. #define SAMP_FOUND_XFOREST_REF 0x00000004
  463. NTSTATUS
  464. SamIGCLookupSids(
  465. IN ULONG cSids,
  466. IN PSID *SidArray,
  467. IN ULONG Options,
  468. OUT ULONG *Flags,
  469. OUT SID_NAME_USE *SidNameUse,
  470. OUT PSAMPR_RETURNED_USTRING_ARRAY Names
  471. );
  472. NTSTATUS
  473. SamIGCLookupNames(
  474. IN ULONG cNames,
  475. IN PUNICODE_STRING Names,
  476. IN ULONG Options,
  477. OUT ULONG *Flags,
  478. OUT SID_NAME_USE *SidNameUse,
  479. OUT PSAMPR_PSID_ARRAY *SidArray
  480. );
  481. #ifdef __SECPKG_H__
  482. NTSTATUS
  483. SamIStorePrimaryCredentials(
  484. IN SAMPR_HANDLE UserHandle,
  485. IN PSECPKG_SUPPLEMENTAL_CRED Credentials
  486. );
  487. NTSTATUS
  488. SamIRetrievePrimaryCredentials(
  489. IN SAMPR_HANDLE UserHandle,
  490. IN PUNICODE_STRING PackageName,
  491. OUT PVOID * Credentials,
  492. OUT PULONG CredentialSize
  493. );
  494. NTSTATUS
  495. SamIStoreSupplementalCredentials(
  496. IN SAMPR_HANDLE UserHandle,
  497. IN PSECPKG_SUPPLEMENTAL_CRED Credentials
  498. );
  499. NTSTATUS
  500. SamIRetriveSupplementalCredentials(
  501. IN SAMPR_HANDLE UserHandle,
  502. IN PUNICODE_STRING PackageName,
  503. OUT PVOID * Credentials,
  504. OUT PULONG CredentialSize
  505. );
  506. NTSTATUS
  507. SamIRetriveAllSupplementalCredentials(
  508. IN SAMPR_HANDLE UserHandle,
  509. OUT PSECPKG_SUPPLEMENTAL_CRED * Credentials,
  510. OUT PULONG CredentialCount
  511. );
  512. #endif
  513. VOID
  514. SamIFree_SAMPR_SR_SECURITY_DESCRIPTOR (
  515. PSAMPR_SR_SECURITY_DESCRIPTOR Source
  516. );
  517. VOID
  518. SamIFree_SAMPR_DOMAIN_INFO_BUFFER (
  519. PSAMPR_DOMAIN_INFO_BUFFER Source,
  520. DOMAIN_INFORMATION_CLASS Branch
  521. );
  522. VOID
  523. SamIFree_SAMPR_ENUMERATION_BUFFER (
  524. PSAMPR_ENUMERATION_BUFFER Source
  525. );
  526. VOID
  527. SamIFree_SAMPR_PSID_ARRAY (
  528. PSAMPR_PSID_ARRAY Source
  529. );
  530. VOID
  531. SamIFree_SAMPR_ULONG_ARRAY (
  532. PSAMPR_ULONG_ARRAY Source
  533. );
  534. VOID
  535. SamIFree_SAMPR_RETURNED_USTRING_ARRAY (
  536. PSAMPR_RETURNED_USTRING_ARRAY Source
  537. );
  538. VOID
  539. SamIFree_SAMPR_GROUP_INFO_BUFFER (
  540. PSAMPR_GROUP_INFO_BUFFER Source,
  541. GROUP_INFORMATION_CLASS Branch
  542. );
  543. VOID
  544. SamIFree_SAMPR_ALIAS_INFO_BUFFER (
  545. PSAMPR_ALIAS_INFO_BUFFER Source,
  546. ALIAS_INFORMATION_CLASS Branch
  547. );
  548. VOID
  549. SamIFree_SAMPR_GET_MEMBERS_BUFFER (
  550. PSAMPR_GET_MEMBERS_BUFFER Source
  551. );
  552. VOID
  553. SamIFree_SAMPR_USER_INFO_BUFFER (
  554. PSAMPR_USER_INFO_BUFFER Source,
  555. USER_INFORMATION_CLASS Branch
  556. );
  557. VOID
  558. SamIFree_SAMPR_GET_GROUPS_BUFFER (
  559. PSAMPR_GET_GROUPS_BUFFER Source
  560. );
  561. VOID
  562. SamIFree_SAMPR_DISPLAY_INFO_BUFFER (
  563. PSAMPR_DISPLAY_INFO_BUFFER Source,
  564. DOMAIN_DISPLAY_INFORMATION Branch
  565. );
  566. VOID
  567. SamIFree_UserInternal6Information (
  568. PUSER_INTERNAL6_INFORMATION Source
  569. );
  570. VOID
  571. SamIFreeSidAndAttributesList(
  572. IN PSID_AND_ATTRIBUTES_LIST List
  573. );
  574. VOID
  575. SamIFreeSidArray(
  576. IN PSAMPR_PSID_ARRAY List
  577. );
  578. VOID
  579. SamIFreeVoid(
  580. IN PVOID ptr
  581. );
  582. BOOLEAN
  583. SampUsingDsData();
  584. BOOLEAN
  585. SamIAmIGC();
  586. typedef enum _SAM_PERF_COUNTER_TYPE {
  587. MsvLogonCounter,
  588. KerbServerContextCounter,
  589. KdcAsReqCounter,
  590. KdcTgsReqCounter
  591. } SAM_PERF_COUNTER_TYPE, *PSAM_PERF_COUNTER_TYPE;
  592. VOID
  593. SamIIncrementPerformanceCounter(
  594. IN SAM_PERF_COUNTER_TYPE CounterType
  595. );
  596. BOOLEAN SamIIsSetupInProgress(
  597. OUT BOOLEAN * fUpgrade
  598. );
  599. BOOLEAN SamIIsDownlevelDcUpgrade();
  600. NTSTATUS
  601. SamIGetBootKeyInformation(
  602. IN SAMPR_HANDLE DomainHandle,
  603. OUT PSAMPR_BOOT_TYPE BootOptions
  604. );
  605. NTSTATUS
  606. SamIGetDefaultAdministratorName(
  607. OUT LPWSTR Name, OPTIONAL
  608. IN OUT ULONG *NameLength
  609. );
  610. BOOLEAN
  611. SamIIsExtendedSidMode(
  612. IN SAMPR_HANDLE DomainHandle
  613. );
  614. NTSTATUS
  615. SamINetLogonPing(
  616. IN SAMPR_HANDLE DomainHandle,
  617. IN PUNICODE_STRING AccountName,
  618. OUT BOOLEAN *AccountExists,
  619. OUT PULONG UserAccountControl
  620. );
  621. NTSTATUS
  622. SamIUPNFromUserHandle(
  623. IN SAMPR_HANDLE UserHandle,
  624. OUT BOOLEAN *UPNDefaulted,
  625. OUT PUNICODE_STRING UPN
  626. );
  627. BOOLEAN
  628. SamIIsRebootAfterPromotion(
  629. );
  630. #endif // _SAMISRV_