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.

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