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.

641 lines
13 KiB

  1. #include "dspch.h"
  2. #pragma hdrstop
  3. #include <ntsam.h>
  4. #include <ntsamp.h>
  5. static
  6. NTSTATUS
  7. SamAddMemberToAlias(
  8. IN SAM_HANDLE AliasHandle,
  9. IN PSID MemberId
  10. )
  11. {
  12. return STATUS_PROCEDURE_NOT_FOUND;
  13. }
  14. static
  15. NTSTATUS
  16. SamAddMemberToGroup(
  17. IN SAM_HANDLE GroupHandle,
  18. IN ULONG MemberId,
  19. IN ULONG Attributes
  20. )
  21. {
  22. return STATUS_PROCEDURE_NOT_FOUND;
  23. }
  24. static
  25. NTSTATUS
  26. SamChangePasswordUser(
  27. IN SAM_HANDLE UserHandle,
  28. IN PUNICODE_STRING OldPassword,
  29. IN PUNICODE_STRING NewPassword
  30. )
  31. {
  32. return STATUS_PROCEDURE_NOT_FOUND;
  33. }
  34. static
  35. NTSTATUS
  36. SamChangePasswordUser2(
  37. IN PUNICODE_STRING ServerName,
  38. IN PUNICODE_STRING UserName,
  39. IN PUNICODE_STRING OldPassword,
  40. IN PUNICODE_STRING NewPassword
  41. )
  42. {
  43. return STATUS_PROCEDURE_NOT_FOUND;
  44. }
  45. static
  46. NTSTATUS
  47. SamCloseHandle(
  48. IN SAM_HANDLE SamHandle
  49. )
  50. {
  51. return STATUS_PROCEDURE_NOT_FOUND;
  52. }
  53. static
  54. NTSTATUS
  55. SamConnect(
  56. IN PUNICODE_STRING ServerName,
  57. OUT PSAM_HANDLE ServerHandle,
  58. IN ACCESS_MASK DesiredAccess,
  59. IN POBJECT_ATTRIBUTES ObjectAttributes
  60. )
  61. {
  62. return STATUS_PROCEDURE_NOT_FOUND;
  63. }
  64. static
  65. NTSTATUS
  66. SamCreateAliasInDomain(
  67. IN SAM_HANDLE DomainHandle,
  68. IN PUNICODE_STRING AccountName,
  69. IN ACCESS_MASK DesiredAccess,
  70. OUT PSAM_HANDLE AliasHandle,
  71. OUT PULONG RelativeId
  72. )
  73. {
  74. return STATUS_PROCEDURE_NOT_FOUND;
  75. }
  76. static
  77. NTSTATUS
  78. SamCreateGroupInDomain(
  79. IN SAM_HANDLE DomainHandle,
  80. IN PUNICODE_STRING AccountName,
  81. IN ACCESS_MASK DesiredAccess,
  82. OUT PSAM_HANDLE GroupHandle,
  83. OUT PULONG RelativeId
  84. )
  85. {
  86. return STATUS_PROCEDURE_NOT_FOUND;
  87. }
  88. static
  89. NTSTATUS
  90. SamCreateUser2InDomain(
  91. IN SAM_HANDLE DomainHandle,
  92. IN PUNICODE_STRING AccountName,
  93. IN ULONG AccountType,
  94. IN ACCESS_MASK DesiredAccess,
  95. OUT PSAM_HANDLE UserHandle,
  96. OUT PULONG GrantedAccess,
  97. OUT PULONG RelativeId
  98. )
  99. {
  100. return STATUS_PROCEDURE_NOT_FOUND;
  101. }
  102. static
  103. NTSTATUS
  104. SamCreateUserInDomain(
  105. IN SAM_HANDLE DomainHandle,
  106. IN PUNICODE_STRING AccountName,
  107. IN ACCESS_MASK DesiredAccess,
  108. OUT PSAM_HANDLE UserHandle,
  109. OUT PULONG RelativeId
  110. )
  111. {
  112. return STATUS_PROCEDURE_NOT_FOUND;
  113. }
  114. static
  115. NTSTATUS
  116. SamDeleteAlias(
  117. IN SAM_HANDLE AliasHandle
  118. )
  119. {
  120. return STATUS_PROCEDURE_NOT_FOUND;
  121. }
  122. static
  123. NTSTATUS
  124. SamDeleteGroup(
  125. IN SAM_HANDLE GroupHandle
  126. )
  127. {
  128. return STATUS_PROCEDURE_NOT_FOUND;
  129. }
  130. static
  131. NTSTATUS
  132. SamDeleteUser(
  133. IN SAM_HANDLE UserHandle
  134. )
  135. {
  136. return STATUS_PROCEDURE_NOT_FOUND;
  137. }
  138. static
  139. NTSTATUS
  140. SamEnumerateAliasesInDomain(
  141. IN SAM_HANDLE DomainHandle,
  142. IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
  143. IN PVOID *Buffer,
  144. IN ULONG PreferedMaximumLength,
  145. OUT PULONG CountReturned
  146. )
  147. {
  148. return STATUS_PROCEDURE_NOT_FOUND;
  149. }
  150. static
  151. NTSTATUS
  152. SamEnumerateDomainsInSamServer(
  153. IN SAM_HANDLE ServerHandle,
  154. IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
  155. OUT PVOID *Buffer,
  156. IN ULONG PreferedMaximumLength,
  157. OUT PULONG CountReturned
  158. )
  159. {
  160. return STATUS_PROCEDURE_NOT_FOUND;
  161. }
  162. static
  163. NTSTATUS
  164. SamEnumerateGroupsInDomain(
  165. IN SAM_HANDLE DomainHandle,
  166. IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
  167. OUT PVOID *Buffer,
  168. IN ULONG PreferedMaximumLength,
  169. OUT PULONG CountReturned
  170. )
  171. {
  172. return STATUS_PROCEDURE_NOT_FOUND;
  173. }
  174. static
  175. NTSTATUS
  176. SamEnumerateUsersInDomain(
  177. IN SAM_HANDLE DomainHandle,
  178. IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
  179. IN ULONG UserAccountControl,
  180. OUT PVOID *Buffer,
  181. IN ULONG PreferedMaximumLength,
  182. OUT PULONG CountReturned
  183. )
  184. {
  185. return STATUS_PROCEDURE_NOT_FOUND;
  186. }
  187. static
  188. NTSTATUS
  189. SamFreeMemory(
  190. IN PVOID Buffer
  191. )
  192. {
  193. return STATUS_PROCEDURE_NOT_FOUND;
  194. }
  195. static
  196. NTSTATUS
  197. SamGetAliasMembership(
  198. IN SAM_HANDLE DomainHandle,
  199. IN ULONG PassedCount,
  200. IN PSID *Sids,
  201. OUT PULONG MembershipCount,
  202. OUT PULONG *Aliases
  203. )
  204. {
  205. return STATUS_PROCEDURE_NOT_FOUND;
  206. }
  207. static
  208. NTSTATUS
  209. SamGetCompatibilityMode(
  210. IN SAM_HANDLE ObjectHandle,
  211. OUT ULONG* Mode
  212. )
  213. {
  214. return STATUS_PROCEDURE_NOT_FOUND;
  215. }
  216. static
  217. NTSTATUS
  218. SamGetDisplayEnumerationIndex (
  219. IN SAM_HANDLE DomainHandle,
  220. IN DOMAIN_DISPLAY_INFORMATION DisplayInformation,
  221. IN PUNICODE_STRING Prefix,
  222. OUT PULONG Index
  223. )
  224. {
  225. return STATUS_PROCEDURE_NOT_FOUND;
  226. }
  227. static
  228. NTSTATUS
  229. SamGetGroupsForUser(
  230. IN SAM_HANDLE UserHandle,
  231. OUT PGROUP_MEMBERSHIP * Groups,
  232. OUT PULONG MembershipCount
  233. )
  234. {
  235. return STATUS_PROCEDURE_NOT_FOUND;
  236. }
  237. static
  238. NTSTATUS
  239. SamGetMembersInAlias(
  240. IN SAM_HANDLE AliasHandle,
  241. OUT PSID **MemberIds,
  242. OUT PULONG MemberCount
  243. )
  244. {
  245. return STATUS_PROCEDURE_NOT_FOUND;
  246. }
  247. static
  248. NTSTATUS
  249. SamGetMembersInGroup(
  250. IN SAM_HANDLE GroupHandle,
  251. OUT PULONG * MemberIds,
  252. OUT PULONG * Attributes,
  253. OUT PULONG MemberCount
  254. )
  255. {
  256. return STATUS_PROCEDURE_NOT_FOUND;
  257. }
  258. static
  259. NTSTATUS
  260. SamLookupDomainInSamServer(
  261. IN SAM_HANDLE ServerHandle,
  262. IN PUNICODE_STRING Name,
  263. OUT PSID * DomainId
  264. )
  265. {
  266. return STATUS_PROCEDURE_NOT_FOUND;
  267. }
  268. static
  269. NTSTATUS
  270. SamLookupIdsInDomain(
  271. IN SAM_HANDLE DomainHandle,
  272. IN ULONG Count,
  273. IN PULONG RelativeIds,
  274. OUT PUNICODE_STRING *Names,
  275. OUT PSID_NAME_USE *Use
  276. )
  277. {
  278. return STATUS_PROCEDURE_NOT_FOUND;
  279. }
  280. static
  281. NTSTATUS
  282. SamLookupNamesInDomain(
  283. IN SAM_HANDLE DomainHandle,
  284. IN ULONG Count,
  285. IN PUNICODE_STRING Names,
  286. OUT PULONG *RelativeIds,
  287. OUT PSID_NAME_USE *Use
  288. )
  289. {
  290. return STATUS_PROCEDURE_NOT_FOUND;
  291. }
  292. static
  293. NTSTATUS
  294. SamOpenAlias(
  295. IN SAM_HANDLE DomainHandle,
  296. IN ACCESS_MASK DesiredAccess,
  297. IN ULONG AliasId,
  298. OUT PSAM_HANDLE AliasHandle
  299. )
  300. {
  301. return STATUS_PROCEDURE_NOT_FOUND;
  302. }
  303. static
  304. NTSTATUS
  305. SamOpenDomain(
  306. IN SAM_HANDLE ServerHandle,
  307. IN ACCESS_MASK DesiredAccess,
  308. IN PSID DomainId,
  309. OUT PSAM_HANDLE DomainHandle
  310. )
  311. {
  312. return STATUS_PROCEDURE_NOT_FOUND;
  313. }
  314. static
  315. NTSTATUS
  316. SamOpenGroup(
  317. IN SAM_HANDLE DomainHandle,
  318. IN ACCESS_MASK DesiredAccess,
  319. IN ULONG GroupId,
  320. OUT PSAM_HANDLE GroupHandle
  321. )
  322. {
  323. return STATUS_PROCEDURE_NOT_FOUND;
  324. }
  325. static
  326. NTSTATUS
  327. SamOpenUser(
  328. IN SAM_HANDLE DomainHandle,
  329. IN ACCESS_MASK DesiredAccess,
  330. IN ULONG UserId,
  331. OUT PSAM_HANDLE UserHandle
  332. )
  333. {
  334. return STATUS_PROCEDURE_NOT_FOUND;
  335. }
  336. static
  337. NTSTATUS
  338. SamQueryDisplayInformation (
  339. IN SAM_HANDLE DomainHandle,
  340. IN DOMAIN_DISPLAY_INFORMATION DisplayInformation,
  341. IN ULONG Index,
  342. IN ULONG EntryCount,
  343. IN ULONG PreferredMaximumLength,
  344. OUT PULONG TotalAvailable,
  345. OUT PULONG TotalReturned,
  346. OUT PULONG ReturnedEntryCount,
  347. OUT PVOID *SortedBuffer
  348. )
  349. {
  350. return STATUS_PROCEDURE_NOT_FOUND;
  351. }
  352. static
  353. NTSTATUS
  354. SamQueryInformationAlias(
  355. IN SAM_HANDLE AliasHandle,
  356. IN ALIAS_INFORMATION_CLASS AliasInformationClass,
  357. OUT PVOID *Buffer
  358. )
  359. {
  360. return STATUS_PROCEDURE_NOT_FOUND;
  361. }
  362. static
  363. NTSTATUS
  364. SamQueryInformationDomain(
  365. IN SAM_HANDLE DomainHandle,
  366. IN DOMAIN_INFORMATION_CLASS DomainInformationClass,
  367. OUT PVOID *Buffer
  368. )
  369. {
  370. return STATUS_PROCEDURE_NOT_FOUND;
  371. }
  372. static
  373. NTSTATUS
  374. SamQueryInformationGroup(
  375. IN SAM_HANDLE GroupHandle,
  376. IN GROUP_INFORMATION_CLASS GroupInformationClass,
  377. OUT PVOID *Buffer
  378. )
  379. {
  380. return STATUS_PROCEDURE_NOT_FOUND;
  381. }
  382. static
  383. NTSTATUS
  384. SamQueryInformationUser(
  385. IN SAM_HANDLE UserHandle,
  386. IN USER_INFORMATION_CLASS UserInformationClass,
  387. OUT PVOID * Buffer
  388. )
  389. {
  390. return STATUS_PROCEDURE_NOT_FOUND;
  391. }
  392. static
  393. NTSTATUS
  394. SamQuerySecurityObject(
  395. IN SAM_HANDLE ObjectHandle,
  396. IN SECURITY_INFORMATION SecurityInformation,
  397. OUT PSECURITY_DESCRIPTOR *SecurityDescriptor
  398. )
  399. {
  400. return STATUS_PROCEDURE_NOT_FOUND;
  401. }
  402. static
  403. NTSTATUS
  404. SamRemoveMemberFromAlias(
  405. IN SAM_HANDLE AliasHandle,
  406. IN PSID MemberId
  407. )
  408. {
  409. return STATUS_PROCEDURE_NOT_FOUND;
  410. }
  411. static
  412. NTSTATUS
  413. SamRemoveMemberFromForeignDomain(
  414. IN SAM_HANDLE DomainHandle,
  415. IN PSID MemberId
  416. )
  417. {
  418. return STATUS_PROCEDURE_NOT_FOUND;
  419. }
  420. static
  421. NTSTATUS
  422. SamRemoveMemberFromGroup(
  423. IN SAM_HANDLE GroupHandle,
  424. IN ULONG MemberId
  425. )
  426. {
  427. return STATUS_PROCEDURE_NOT_FOUND;
  428. }
  429. static
  430. NTSTATUS
  431. SamRidToSid(
  432. IN SAM_HANDLE ObjectHandle,
  433. IN ULONG Rid,
  434. OUT PSID* Sid
  435. )
  436. {
  437. return STATUS_PROCEDURE_NOT_FOUND;
  438. }
  439. static
  440. NTSTATUS
  441. SamSetInformationAlias(
  442. IN SAM_HANDLE AliasHandle,
  443. IN ALIAS_INFORMATION_CLASS AliasInformationClass,
  444. IN PVOID Buffer
  445. )
  446. {
  447. return STATUS_PROCEDURE_NOT_FOUND;
  448. }
  449. static
  450. NTSTATUS
  451. SamSetInformationDomain(
  452. IN SAM_HANDLE DomainHandle,
  453. IN DOMAIN_INFORMATION_CLASS DomainInformationClass,
  454. IN PVOID DomainInformation
  455. )
  456. {
  457. return STATUS_PROCEDURE_NOT_FOUND;
  458. }
  459. static
  460. NTSTATUS
  461. SamSetInformationGroup(
  462. IN SAM_HANDLE GroupHandle,
  463. IN GROUP_INFORMATION_CLASS GroupInformationClass,
  464. IN PVOID Buffer
  465. )
  466. {
  467. return STATUS_PROCEDURE_NOT_FOUND;
  468. }
  469. static
  470. NTSTATUS
  471. SamSetInformationUser(
  472. IN SAM_HANDLE UserHandle,
  473. IN USER_INFORMATION_CLASS UserInformationClass,
  474. IN PVOID Buffer
  475. )
  476. {
  477. return STATUS_PROCEDURE_NOT_FOUND;
  478. }
  479. static
  480. NTSTATUS
  481. SamSetMemberAttributesOfGroup(
  482. IN SAM_HANDLE GroupHandle,
  483. IN ULONG MemberId,
  484. IN ULONG Attributes
  485. )
  486. {
  487. return STATUS_PROCEDURE_NOT_FOUND;
  488. }
  489. static
  490. NTSTATUS
  491. SamSetSecurityObject(
  492. IN SAM_HANDLE ObjectHandle,
  493. IN SECURITY_INFORMATION SecurityInformation,
  494. IN PSECURITY_DESCRIPTOR SecurityDescriptor
  495. )
  496. {
  497. return STATUS_PROCEDURE_NOT_FOUND;
  498. }
  499. static
  500. NTSTATUS
  501. SamiChangeKeys()
  502. {
  503. return STATUS_PROCEDURE_NOT_FOUND;
  504. }
  505. static
  506. NTSTATUS
  507. SamiChangePasswordUser(
  508. IN SAM_HANDLE UserHandle,
  509. IN BOOLEAN LmOldPresent,
  510. IN PLM_OWF_PASSWORD LmOldOwfPassword,
  511. IN PLM_OWF_PASSWORD LmNewOwfPassword,
  512. IN BOOLEAN NtPresent,
  513. IN PNT_OWF_PASSWORD NtOldOwfPassword,
  514. IN PNT_OWF_PASSWORD NtNewOwfPassword
  515. )
  516. {
  517. return STATUS_PROCEDURE_NOT_FOUND;
  518. }
  519. static
  520. NTSTATUS
  521. SamValidatePassword(
  522. IN PUNICODE_STRING ServerName OPTIONAL,
  523. IN PASSWORD_POLICY_VALIDATION_TYPE ValidationType,
  524. IN PSAM_VALIDATE_INPUT_ARG InputArg,
  525. OUT PSAM_VALIDATE_OUTPUT_ARG *OutputArg
  526. )
  527. {
  528. return STATUS_PROCEDURE_NOT_FOUND;
  529. }
  530. //
  531. // !! WARNING !! The entries below must be in alphabetical order
  532. // and are CASE SENSITIVE (i.e., lower case comes last!)
  533. //
  534. DEFINE_PROCNAME_ENTRIES(samlib)
  535. {
  536. DLPENTRY(SamAddMemberToAlias)
  537. DLPENTRY(SamAddMemberToGroup)
  538. DLPENTRY(SamChangePasswordUser)
  539. DLPENTRY(SamChangePasswordUser2)
  540. DLPENTRY(SamCloseHandle)
  541. DLPENTRY(SamConnect)
  542. DLPENTRY(SamCreateAliasInDomain)
  543. DLPENTRY(SamCreateGroupInDomain)
  544. DLPENTRY(SamCreateUser2InDomain)
  545. DLPENTRY(SamCreateUserInDomain)
  546. DLPENTRY(SamDeleteAlias)
  547. DLPENTRY(SamDeleteGroup)
  548. DLPENTRY(SamDeleteUser)
  549. DLPENTRY(SamEnumerateAliasesInDomain)
  550. DLPENTRY(SamEnumerateDomainsInSamServer)
  551. DLPENTRY(SamEnumerateGroupsInDomain)
  552. DLPENTRY(SamEnumerateUsersInDomain)
  553. DLPENTRY(SamFreeMemory)
  554. DLPENTRY(SamGetAliasMembership)
  555. DLPENTRY(SamGetCompatibilityMode)
  556. DLPENTRY(SamGetDisplayEnumerationIndex)
  557. DLPENTRY(SamGetGroupsForUser)
  558. DLPENTRY(SamGetMembersInAlias)
  559. DLPENTRY(SamGetMembersInGroup)
  560. DLPENTRY(SamLookupDomainInSamServer)
  561. DLPENTRY(SamLookupIdsInDomain)
  562. DLPENTRY(SamLookupNamesInDomain)
  563. DLPENTRY(SamOpenAlias)
  564. DLPENTRY(SamOpenDomain)
  565. DLPENTRY(SamOpenGroup)
  566. DLPENTRY(SamOpenUser)
  567. DLPENTRY(SamQueryDisplayInformation)
  568. DLPENTRY(SamQueryInformationAlias)
  569. DLPENTRY(SamQueryInformationDomain)
  570. DLPENTRY(SamQueryInformationGroup)
  571. DLPENTRY(SamQueryInformationUser)
  572. DLPENTRY(SamQuerySecurityObject)
  573. DLPENTRY(SamRemoveMemberFromAlias)
  574. DLPENTRY(SamRemoveMemberFromForeignDomain)
  575. DLPENTRY(SamRemoveMemberFromGroup)
  576. DLPENTRY(SamRidToSid)
  577. DLPENTRY(SamSetInformationAlias)
  578. DLPENTRY(SamSetInformationDomain)
  579. DLPENTRY(SamSetInformationGroup)
  580. DLPENTRY(SamSetInformationUser)
  581. DLPENTRY(SamSetMemberAttributesOfGroup)
  582. DLPENTRY(SamSetSecurityObject)
  583. DLPENTRY(SamValidatePassword)
  584. DLPENTRY(SamiChangeKeys)
  585. DLPENTRY(SamiChangePasswordUser)
  586. };
  587. DEFINE_PROCNAME_MAP(samlib)