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.

563 lines
10 KiB

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