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.

606 lines
16 KiB

  1. #include "dspch.h"
  2. #pragma hdrstop
  3. #include <sspi.h>
  4. #define SEC_ENTRY __stdcall
  5. #define EXTENDED_NAME_FORMAT DWORD
  6. #define PLSA_STRING PVOID
  7. #define SECURITY_LOGON_TYPE DWORD
  8. #define POLICY_NOTIFICATION_INFORMATION_CLASS DWORD
  9. #define PLSA_OPERATIONAL_MODE PULONG
  10. static
  11. BOOLEAN
  12. SEC_ENTRY
  13. GetUserNameExA(
  14. EXTENDED_NAME_FORMAT NameFormat,
  15. LPSTR lpNameBuffer,
  16. PULONG nSize
  17. )
  18. {
  19. return FALSE;
  20. }
  21. static
  22. BOOLEAN
  23. SEC_ENTRY
  24. GetUserNameExW(
  25. EXTENDED_NAME_FORMAT NameFormat,
  26. LPWSTR lpNameBuffer,
  27. PULONG nSize
  28. )
  29. {
  30. return FALSE;
  31. }
  32. static
  33. NTSTATUS
  34. NTAPI
  35. LsaCallAuthenticationPackage(
  36. IN HANDLE LsaHandle,
  37. IN ULONG AuthenticationPackage,
  38. IN PVOID ProtocolSubmitBuffer,
  39. IN ULONG SubmitBufferLength,
  40. OUT PVOID *ProtocolReturnBuffer,
  41. OUT PULONG ReturnBufferLength,
  42. OUT PNTSTATUS ProtocolStatus
  43. )
  44. {
  45. return STATUS_PROCEDURE_NOT_FOUND;
  46. }
  47. static
  48. NTSTATUS
  49. NTAPI
  50. LsaConnectUntrusted (
  51. OUT PHANDLE LsaHandle
  52. )
  53. {
  54. return STATUS_PROCEDURE_NOT_FOUND;
  55. }
  56. static
  57. NTSTATUS
  58. NTAPI
  59. LsaDeregisterLogonProcess (
  60. IN HANDLE LsaHandle
  61. )
  62. {
  63. return STATUS_PROCEDURE_NOT_FOUND;
  64. }
  65. static
  66. NTSTATUS
  67. NTAPI
  68. LsaFreeReturnBuffer (
  69. IN PVOID Buffer
  70. )
  71. {
  72. return STATUS_PROCEDURE_NOT_FOUND;
  73. }
  74. static
  75. NTSTATUS
  76. NTAPI
  77. LsaLogonUser (
  78. IN HANDLE LsaHandle,
  79. IN PLSA_STRING OriginName,
  80. IN SECURITY_LOGON_TYPE LogonType,
  81. IN ULONG AuthenticationPackage,
  82. IN PVOID AuthenticationInformation,
  83. IN ULONG AuthenticationInformationLength,
  84. IN PTOKEN_GROUPS LocalGroups OPTIONAL,
  85. IN PTOKEN_SOURCE SourceContext,
  86. OUT PVOID *ProfileBuffer,
  87. OUT PULONG ProfileBufferLength,
  88. OUT PLUID LogonId,
  89. OUT PHANDLE Token,
  90. OUT PQUOTA_LIMITS Quotas,
  91. OUT PNTSTATUS SubStatus
  92. )
  93. {
  94. return STATUS_PROCEDURE_NOT_FOUND;
  95. }
  96. static
  97. NTSTATUS
  98. NTAPI
  99. LsaLookupAuthenticationPackage (
  100. IN HANDLE LsaHandle,
  101. IN PLSA_STRING PackageName,
  102. OUT PULONG AuthenticationPackage
  103. )
  104. {
  105. return STATUS_PROCEDURE_NOT_FOUND;
  106. }
  107. static
  108. NTSTATUS
  109. NTAPI
  110. LsaRegisterLogonProcess (
  111. IN PLSA_STRING LogonProcessName,
  112. OUT PHANDLE LsaHandle,
  113. OUT PLSA_OPERATIONAL_MODE SecurityMode
  114. )
  115. {
  116. return STATUS_PROCEDURE_NOT_FOUND;
  117. }
  118. static
  119. NTSTATUS
  120. NTAPI
  121. LsaRegisterPolicyChangeNotification(
  122. IN POLICY_NOTIFICATION_INFORMATION_CLASS InformationClass,
  123. IN HANDLE NotificationEventHandle
  124. )
  125. {
  126. return STATUS_PROCEDURE_NOT_FOUND;
  127. }
  128. static
  129. NTSTATUS
  130. NTAPI
  131. LsaUnregisterPolicyChangeNotification(
  132. IN POLICY_NOTIFICATION_INFORMATION_CLASS InformationClass,
  133. IN HANDLE NotificationEventHandle
  134. )
  135. {
  136. return STATUS_PROCEDURE_NOT_FOUND;
  137. }
  138. static
  139. SECURITY_STATUS
  140. SEC_ENTRY
  141. QueryContextAttributesW(
  142. PCtxtHandle phContext, // Context to query
  143. unsigned long ulAttribute, // Attribute to query
  144. void SEC_FAR * pBuffer // Buffer for attributes
  145. )
  146. {
  147. return STATUS_PROCEDURE_NOT_FOUND;
  148. }
  149. static
  150. SECURITY_STATUS
  151. SEC_ENTRY
  152. SetContextAttributesW(
  153. PCtxtHandle phContext, // Context to Set
  154. unsigned long ulAttribute, // Attribute to Set
  155. void SEC_FAR * pBuffer, // Buffer for attributes
  156. unsigned long cbBuffer // Size (in bytes) of pBuffer
  157. )
  158. {
  159. return STATUS_PROCEDURE_NOT_FOUND;
  160. }
  161. static
  162. BOOLEAN
  163. SEC_ENTRY
  164. TranslateNameW(
  165. LPCWSTR lpAccountName,
  166. EXTENDED_NAME_FORMAT AccountNameFormat,
  167. EXTENDED_NAME_FORMAT DesiredNameFormat,
  168. LPWSTR lpTranslatedName,
  169. PULONG nSize
  170. )
  171. {
  172. return FALSE;
  173. }
  174. static
  175. SECURITY_STATUS SEC_ENTRY
  176. AcceptSecurityContext(
  177. PCredHandle phCredential, // Cred to base context
  178. PCtxtHandle phContext, // Existing context (OPT)
  179. PSecBufferDesc pInput, // Input buffer
  180. unsigned long fContextReq, // Context Requirements
  181. unsigned long TargetDataRep, // Target Data Rep
  182. PCtxtHandle phNewContext, // (out) New context handle
  183. PSecBufferDesc pOutput, // (inout) Output buffers
  184. unsigned long SEC_FAR * pfContextAttr, // (out) Context attributes
  185. PTimeStamp ptsExpiry // (out) Life span (OPT)
  186. )
  187. {
  188. return STATUS_PROCEDURE_NOT_FOUND;
  189. }
  190. static
  191. SECURITY_STATUS SEC_ENTRY
  192. AcquireCredentialsHandleA(
  193. SEC_CHAR SEC_FAR * pszPrincipal, // Name of principal
  194. SEC_CHAR SEC_FAR * pszPackageName, // Name of package
  195. unsigned long fCredentialUse, // Flags indicating use
  196. void SEC_FAR * pvLogonId, // Pointer to logon ID
  197. void SEC_FAR * pAuthData, // Package specific data
  198. SEC_GET_KEY_FN pGetKeyFn, // Pointer to GetKey() func
  199. void SEC_FAR * pvGetKeyArgument, // Value to pass to GetKey()
  200. PCredHandle phCredential, // (out) Cred Handle
  201. PTimeStamp ptsExpiry // (out) Lifetime (optional)
  202. )
  203. {
  204. return STATUS_PROCEDURE_NOT_FOUND;
  205. }
  206. static
  207. SECURITY_STATUS SEC_ENTRY
  208. ApplyControlToken(
  209. PCtxtHandle phContext, // Context to modify
  210. PSecBufferDesc pInput // Input token to apply
  211. )
  212. {
  213. return STATUS_PROCEDURE_NOT_FOUND;
  214. }
  215. static
  216. SECURITY_STATUS SEC_ENTRY
  217. DeleteSecurityContext(
  218. PCtxtHandle phContext // Context to delete
  219. )
  220. {
  221. return STATUS_PROCEDURE_NOT_FOUND;
  222. }
  223. static
  224. SECURITY_STATUS SEC_ENTRY
  225. FreeContextBuffer(
  226. void SEC_FAR * pvContextBuffer
  227. )
  228. {
  229. return STATUS_PROCEDURE_NOT_FOUND;
  230. }
  231. static
  232. SECURITY_STATUS SEC_ENTRY
  233. FreeCredentialsHandle(
  234. PCredHandle phCredential // Handle to free
  235. )
  236. {
  237. return STATUS_PROCEDURE_NOT_FOUND;
  238. }
  239. static
  240. SECURITY_STATUS SEC_ENTRY
  241. InitializeSecurityContextW(
  242. PCredHandle phCredential, // Cred to base context
  243. PCtxtHandle phContext, // Existing context (OPT)
  244. SEC_WCHAR SEC_FAR * pszTargetName, // Name of target
  245. unsigned long fContextReq, // Context Requirements
  246. unsigned long Reserved1, // Reserved, MBZ
  247. unsigned long TargetDataRep, // Data rep of target
  248. PSecBufferDesc pInput, // Input Buffers
  249. unsigned long Reserved2, // Reserved, MBZ
  250. PCtxtHandle phNewContext, // (out) New Context handle
  251. PSecBufferDesc pOutput, // (inout) Output Buffers
  252. unsigned long SEC_FAR * pfContextAttr, // (out) Context attrs
  253. PTimeStamp ptsExpiry // (out) Life span (OPT)
  254. )
  255. {
  256. return STATUS_PROCEDURE_NOT_FOUND;
  257. }
  258. static
  259. SECURITY_STATUS SEC_ENTRY
  260. InitializeSecurityContextA(
  261. PCredHandle phCredential, // Cred to base context
  262. PCtxtHandle phContext, // Existing context (OPT)
  263. SEC_CHAR SEC_FAR * pszTargetName, // Name of target
  264. unsigned long fContextReq, // Context Requirements
  265. unsigned long Reserved1, // Reserved, MBZ
  266. unsigned long TargetDataRep, // Data rep of target
  267. PSecBufferDesc pInput, // Input Buffers
  268. unsigned long Reserved2, // Reserved, MBZ
  269. PCtxtHandle phNewContext, // (out) New Context handle
  270. PSecBufferDesc pOutput, // (inout) Output Buffers
  271. unsigned long SEC_FAR * pfContextAttr, // (out) Context attrs
  272. PTimeStamp ptsExpiry // (out) Life span (OPT)
  273. )
  274. {
  275. return STATUS_PROCEDURE_NOT_FOUND;
  276. }
  277. static
  278. SECURITY_STATUS SEC_ENTRY
  279. ImpersonateSecurityContext(
  280. PCtxtHandle phContext // Context to impersonate
  281. )
  282. {
  283. return STATUS_PROCEDURE_NOT_FOUND;
  284. }
  285. static
  286. SECURITY_STATUS SEC_ENTRY
  287. QueryContextAttributesA(
  288. PCtxtHandle phContext, // Context to query
  289. unsigned long ulAttribute, // Attribute to query
  290. void SEC_FAR * pBuffer // Buffer for attributes
  291. )
  292. {
  293. return STATUS_PROCEDURE_NOT_FOUND;
  294. }
  295. static
  296. SECURITY_STATUS SEC_ENTRY
  297. RevertSecurityContext(
  298. PCtxtHandle phContext // Context from which to re
  299. )
  300. {
  301. return STATUS_PROCEDURE_NOT_FOUND;
  302. }
  303. static
  304. SECURITY_STATUS SEC_ENTRY
  305. SetContextAttributesA(
  306. PCtxtHandle phContext, // Context to Set
  307. unsigned long ulAttribute, // Attribute to Set
  308. void SEC_FAR * pBuffer, // Buffer for attributes
  309. unsigned long cbBuffer // Size (in bytes) of Buffer
  310. )
  311. {
  312. return STATUS_PROCEDURE_NOT_FOUND;
  313. }
  314. static
  315. SECURITY_STATUS
  316. SEC_ENTRY
  317. DecryptMessage( PCtxtHandle phContext,
  318. PSecBufferDesc pMessage,
  319. ULONG MessageSeqNo,
  320. ULONG * pfQOP)
  321. {
  322. return STATUS_PROCEDURE_NOT_FOUND;
  323. }
  324. static
  325. SECURITY_STATUS
  326. SEC_ENTRY
  327. EncryptMessage( PCtxtHandle phContext,
  328. ULONG fQOP,
  329. PSecBufferDesc pMessage,
  330. ULONG MessageSeqNo)
  331. {
  332. return STATUS_PROCEDURE_NOT_FOUND;
  333. }
  334. static
  335. SECURITY_STATUS
  336. SEC_ENTRY
  337. QuerySecurityContextToken(
  338. PCtxtHandle phContext,
  339. VOID * * TokenHandle
  340. )
  341. {
  342. return STATUS_PROCEDURE_NOT_FOUND;
  343. }
  344. static
  345. SECURITY_STATUS
  346. SEC_ENTRY
  347. SaslAcceptSecurityContext(
  348. PCredHandle phCredential, // Cred to base context
  349. PCtxtHandle phContext, // Existing context (OPT)
  350. PSecBufferDesc pInput, // Input buffer
  351. unsigned long fContextReq, // Context Requirements
  352. unsigned long TargetDataRep, // Target Data Rep
  353. PCtxtHandle phNewContext, // (out) New context handle
  354. PSecBufferDesc pOutput, // (inout) Output buffers
  355. unsigned long SEC_FAR * pfContextAttr, // (out) Context attributes
  356. PTimeStamp ptsExpiry // (out) Life span (OPT)
  357. )
  358. {
  359. return STATUS_PROCEDURE_NOT_FOUND;
  360. }
  361. static
  362. SECURITY_STATUS
  363. SEC_ENTRY
  364. SaslEnumerateProfilesA(
  365. OUT LPSTR * ProfileList,
  366. OUT ULONG * ProfileCount
  367. )
  368. {
  369. return STATUS_PROCEDURE_NOT_FOUND;
  370. }
  371. static
  372. SECURITY_STATUS
  373. SEC_ENTRY
  374. SaslEnumerateProfilesW(
  375. OUT LPWSTR * ProfileList,
  376. OUT ULONG * ProfileCount
  377. )
  378. {
  379. return STATUS_PROCEDURE_NOT_FOUND;
  380. }
  381. static
  382. SECURITY_STATUS
  383. SEC_ENTRY
  384. SaslGetContextOption(
  385. PCtxtHandle ContextHandle,
  386. ULONG Option,
  387. PVOID Value,
  388. ULONG Size,
  389. PULONG Needed OPTIONAL
  390. )
  391. {
  392. return STATUS_PROCEDURE_NOT_FOUND;
  393. }
  394. static
  395. SECURITY_STATUS
  396. SEC_ENTRY
  397. SaslGetProfilePackageA(
  398. IN LPSTR ProfileName,
  399. OUT PSecPkgInfoA * PackageInfo
  400. )
  401. {
  402. return STATUS_PROCEDURE_NOT_FOUND;
  403. }
  404. static
  405. SECURITY_STATUS
  406. SEC_ENTRY
  407. SaslGetProfilePackageW(
  408. IN LPWSTR ProfileName,
  409. OUT PSecPkgInfoW * PackageInfo
  410. )
  411. {
  412. return STATUS_PROCEDURE_NOT_FOUND;
  413. }
  414. static
  415. SECURITY_STATUS
  416. SEC_ENTRY
  417. SaslIdentifyPackageA(
  418. PSecBufferDesc pInput,
  419. PSecPkgInfoA * pPackage
  420. )
  421. {
  422. return STATUS_PROCEDURE_NOT_FOUND;
  423. }
  424. static
  425. SECURITY_STATUS
  426. SEC_ENTRY
  427. SaslIdentifyPackageW(
  428. PSecBufferDesc pInput,
  429. PSecPkgInfoW * pPackage
  430. )
  431. {
  432. return STATUS_PROCEDURE_NOT_FOUND;
  433. }
  434. static
  435. SECURITY_STATUS
  436. SEC_ENTRY
  437. SaslInitializeSecurityContextA(
  438. PCredHandle phCredential, // Cred to base context
  439. PCtxtHandle phContext, // Existing context (OPT)
  440. LPSTR pszTargetName, // Name of target
  441. unsigned long fContextReq, // Context Requirements
  442. unsigned long Reserved1, // Reserved, MBZ
  443. unsigned long TargetDataRep, // Data rep of target
  444. PSecBufferDesc pInput, // Input Buffers
  445. unsigned long Reserved2, // Reserved, MBZ
  446. PCtxtHandle phNewContext, // (out) New Context handle
  447. PSecBufferDesc pOutput, // (inout) Output Buffers
  448. unsigned long SEC_FAR * pfContextAttr, // (out) Context attrs
  449. PTimeStamp ptsExpiry // (out) Life span (OPT)
  450. )
  451. {
  452. return STATUS_PROCEDURE_NOT_FOUND;
  453. }
  454. static
  455. SECURITY_STATUS
  456. SEC_ENTRY
  457. SaslInitializeSecurityContextW(
  458. PCredHandle phCredential, // Cred to base context
  459. PCtxtHandle phContext, // Existing context (OPT)
  460. LPWSTR pszTargetName, // Name of target
  461. unsigned long fContextReq, // Context Requirements
  462. unsigned long Reserved1, // Reserved, MBZ
  463. unsigned long TargetDataRep, // Data rep of target
  464. PSecBufferDesc pInput, // Input Buffers
  465. unsigned long Reserved2, // Reserved, MBZ
  466. PCtxtHandle phNewContext, // (out) New Context handle
  467. PSecBufferDesc pOutput, // (inout) Output Buffers
  468. unsigned long SEC_FAR * pfContextAttr, // (out) Context attrs
  469. PTimeStamp ptsExpiry // (out) Life span (OPT)
  470. )
  471. {
  472. return STATUS_PROCEDURE_NOT_FOUND;
  473. }
  474. static
  475. SECURITY_STATUS
  476. SEC_ENTRY
  477. SaslSetContextOption(
  478. PCtxtHandle ContextHandle,
  479. ULONG Option,
  480. PVOID Value,
  481. ULONG Size
  482. )
  483. {
  484. return STATUS_PROCEDURE_NOT_FOUND;
  485. }
  486. static
  487. SECURITY_STATUS
  488. SEC_ENTRY
  489. SecpSetIPAddress(
  490. PUCHAR lpIpAddress,
  491. ULONG cchIpAddress
  492. )
  493. {
  494. return STATUS_PROCEDURE_NOT_FOUND;
  495. }
  496. static
  497. BOOLEAN
  498. SEC_ENTRY
  499. TranslateNameA (
  500. LPCSTR lpAccountName,
  501. EXTENDED_NAME_FORMAT AccountNameFormat,
  502. EXTENDED_NAME_FORMAT DesiredNameFormat,
  503. LPSTR lpTranslatedName,
  504. LPDWORD nSize
  505. )
  506. {
  507. return FALSE;
  508. }
  509. //
  510. // !! WARNING !! The entries below must be in alphabetical order
  511. // and are CASE SENSITIVE (i.e., lower case comes last!)
  512. //
  513. DEFINE_PROCNAME_ENTRIES(secur32)
  514. {
  515. DLPENTRY(AcceptSecurityContext)
  516. DLPENTRY(AcquireCredentialsHandleA)
  517. DLPENTRY(ApplyControlToken)
  518. DLPENTRY(DecryptMessage)
  519. DLPENTRY(DeleteSecurityContext)
  520. DLPENTRY(EncryptMessage)
  521. DLPENTRY(FreeContextBuffer)
  522. DLPENTRY(FreeCredentialsHandle)
  523. DLPENTRY(GetUserNameExA)
  524. DLPENTRY(GetUserNameExW)
  525. DLPENTRY(ImpersonateSecurityContext)
  526. DLPENTRY(InitializeSecurityContextA)
  527. DLPENTRY(InitializeSecurityContextW)
  528. DLPENTRY(LsaCallAuthenticationPackage)
  529. DLPENTRY(LsaConnectUntrusted)
  530. DLPENTRY(LsaDeregisterLogonProcess)
  531. DLPENTRY(LsaFreeReturnBuffer)
  532. DLPENTRY(LsaLogonUser)
  533. DLPENTRY(LsaLookupAuthenticationPackage)
  534. DLPENTRY(LsaRegisterLogonProcess)
  535. DLPENTRY(LsaRegisterPolicyChangeNotification)
  536. DLPENTRY(LsaUnregisterPolicyChangeNotification)
  537. DLPENTRY(QueryContextAttributesA)
  538. DLPENTRY(QueryContextAttributesW)
  539. DLPENTRY(QuerySecurityContextToken)
  540. DLPENTRY(RevertSecurityContext)
  541. DLPENTRY(SaslAcceptSecurityContext)
  542. DLPENTRY(SaslEnumerateProfilesA)
  543. DLPENTRY(SaslEnumerateProfilesW)
  544. DLPENTRY(SaslGetContextOption)
  545. DLPENTRY(SaslGetProfilePackageA)
  546. DLPENTRY(SaslGetProfilePackageW)
  547. DLPENTRY(SaslIdentifyPackageA)
  548. DLPENTRY(SaslIdentifyPackageW)
  549. DLPENTRY(SaslInitializeSecurityContextA)
  550. DLPENTRY(SaslInitializeSecurityContextW)
  551. DLPENTRY(SaslSetContextOption)
  552. DLPENTRY(SecpSetIPAddress)
  553. DLPENTRY(SetContextAttributesA)
  554. DLPENTRY(SetContextAttributesW)
  555. DLPENTRY(TranslateNameA)
  556. DLPENTRY(TranslateNameW)
  557. };
  558. DEFINE_PROCNAME_MAP(secur32)