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.

702 lines
19 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: negotiat.hxx
  7. //
  8. // Contents: Negotiate Package prototypes
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 9-17-96 RichardW Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #ifndef __NEGOTIAT_HXX__
  18. #define __NEGOTIAT_HXX__
  19. extern "C"
  20. {
  21. #include <spnego.h>
  22. #include <ntmsv1_0.h>
  23. #include <negossp.h>
  24. #include <ntlmsp.h>
  25. #ifndef WIN32_CHICAGO
  26. #include <windns.h>
  27. #endif
  28. }
  29. #ifdef WIN32_CHICAGO
  30. #include <negstub.h>
  31. #endif // WIN32_CHICAGO
  32. SpInitializeFn NegInitialize;
  33. SpGetInfoFn NegGetInfo;
  34. LSA_AP_LOGON_USER NegOldLogonUser;
  35. SpAcceptCredentialsFn NegAcceptCredentials;
  36. SpAcquireCredentialsHandleFn NegAcquireCredentialsHandle;
  37. SpFreeCredentialsHandleFn NegFreeCredentialsHandle;
  38. SpSaveCredentialsFn NegSaveCredentials;
  39. SpGetCredentialsFn NegGetCredentials;
  40. SpDeleteCredentialsFn NegDeleteCredentials;
  41. SpInitLsaModeContextFn NegInitLsaModeContext;
  42. SpDeleteContextFn NegDeleteLsaModeContext;
  43. SpAcceptLsaModeContextFn NegAcceptLsaModeContext;
  44. LSA_AP_LOGON_TERMINATED NegLogoffNotify;
  45. SpApplyControlTokenFn NegApplyControlToken;
  46. SpShutdownFn NegShutdown;
  47. SpGetUserInfoFn NegGetUserInfo;
  48. SpQueryCredentialsAttributesFn NegQueryCredentialsAttributes;
  49. LSA_AP_CALL_PACKAGE NegCallPackage;
  50. LSA_AP_CALL_PACKAGE_UNTRUSTED NegCallPackageUntrusted;
  51. LSA_AP_CALL_PACKAGE_PASSTHROUGH NegCallPackagePassthrough;
  52. LSA_AP_LOGON_USER_EX2 NegLogonUserEx2;
  53. SpInitializeFn Neg2Initialize;
  54. SpGetInfoFn Neg2GetInfo;
  55. LSA_AP_LOGON_USER Neg2OldLogonUser;
  56. SpAcceptCredentialsFn Neg2AcceptCredentials;
  57. SpAcquireCredentialsHandleFn Neg2AcquireCredentialsHandle;
  58. SpFreeCredentialsHandleFn Neg2FreeCredentialsHandle;
  59. SpSaveCredentialsFn Neg2SaveCredentials;
  60. SpGetCredentialsFn Neg2GetCredentials;
  61. SpDeleteCredentialsFn Neg2DeleteCredentials;
  62. SpInitLsaModeContextFn Neg2InitLsaModeContext;
  63. SpDeleteContextFn Neg2DeleteLsaModeContext;
  64. SpAcceptLsaModeContextFn Neg2AcceptLsaModeContext;
  65. LSA_AP_LOGON_TERMINATED Neg2LogoffNotify;
  66. SpApplyControlTokenFn Neg2ApplyControlToken;
  67. SpShutdownFn Neg2Shutdown;
  68. SpGetUserInfoFn Neg2GetUserInfo;
  69. SpQueryCredentialsAttributesFn Neg2QueryCredentialsAttributes;
  70. LSA_AP_CALL_PACKAGE Neg2CallPackage;
  71. LSA_AP_CALL_PACKAGE_UNTRUSTED Neg2CallPackageUntrusted;
  72. SpGetExtendedInformationFn NegGetExtendedInformation ;
  73. SpGetExtendedInformationFn Neg2GetExtendedInformation ;
  74. SpQueryContextAttributesFn NegQueryContextAttributes ;
  75. SpAddCredentialsFn NegAddCredentials ;
  76. #ifdef WIN32_CHICAGO
  77. #define LsapFreeLsaHeap FreeLsaHeap
  78. #define LsapAllocateLsaHeap AllocateLsaHeap
  79. #define LsapFreePrivateHeap FreeLsaHeap
  80. #define LsapAllocatePrivateHeap AllocateLsaHeap
  81. #define LsapDuplicateString2 LsapDuplicateString
  82. #define LsapMapClientBuffer MapBuffer
  83. #define LsapCopyFromClientBuffer CopyFromClientBuffer
  84. #define LsapGetClientInfo GetClientInfo
  85. #define SPMGR_ID 0xFFFFFFFF
  86. #define SPMGR_PKG_ID ((LSA_SEC_HANDLE) 0xFFFFFFFF)
  87. // SPM-wide structure definitions:
  88. // This is the function table for a security package. All functions are
  89. // dispatched through this table.
  90. struct _DLL_BINDING;
  91. // This is the Security Package Control structure. All control information
  92. // relating to packages is stored here.
  93. typedef struct _LSAP_SECURITY_PACKAGE {
  94. DWORD dwPackageID; // Assigned package ID
  95. DWORD PackageIndex; // Package Index in DLL
  96. DWORD fPackage; // Flags about the package
  97. DWORD fCapabilities; // Capabilities that the package reported
  98. DWORD dwRPCID; // RPC ID
  99. DWORD Version;
  100. DWORD TokenSize;
  101. DWORD HandleCount; // Handle count
  102. SECURITY_STRING Name; // Name of the package
  103. SECURITY_STRING Comment;
  104. struct _DLL_BINDING * pBinding; // Binding of DLL
  105. PSECPKG_EXTENDED_INFORMATION Thunks ; // Thunked Context levels
  106. LIST_ENTRY ScavengerList ;
  107. SECPKG_FUNCTION_TABLE FunctionTable; // Dispatch table
  108. #ifdef TRACK_MEM
  109. PVOID pvMemStats; // Memory statistics
  110. #endif
  111. } LSAP_SECURITY_PACKAGE, * PLSAP_SECURITY_PACKAGE;
  112. #endif // WIN32_CHICAGO
  113. typedef ASN1objectidentifier_t ObjectID;
  114. //
  115. // Negotiation control is performed via registry settings. These
  116. // settings control negotiation behavior, and compatibility with
  117. // prior, NT4, machines.
  118. //
  119. //
  120. // Level 0 means - no gain in security. NTLM is always allowed,
  121. // even if mutual authentication is requested
  122. //
  123. #define NEG_NEGLEVEL_NO_SECURITY 0
  124. //
  125. // Level 1 means best compatibility with NT4. NTLM is allowed
  126. // if there is a valid downgrade from a mutual auth protocol.
  127. // Mutual auth response is fudged in this case
  128. //
  129. #define NEG_NEGLEVEL_COMPATIBILITY 1
  130. //
  131. // Level 2 is the ideal level. Mutual auth is enforced, no
  132. // fallback to NTLM is allowed.
  133. //
  134. #define NEG_NEGLEVEL_NO_DOWNGRADE 2
  135. typedef struct _NEG_EXTRA_OID {
  136. ULONG Attributes ;
  137. ObjectID Oid ;
  138. } NEG_EXTRA_OID, * PNEG_EXTRA_OID ;
  139. typedef struct _NEG_PACKAGE {
  140. LIST_ENTRY List; // Package list
  141. PLSAP_SECURITY_PACKAGE LsaPackage; // LSA package structure
  142. ASN1objectidentifier_t ObjectId; // OID for this package
  143. struct _NEG_PACKAGE * RealPackage ; // pointer back to the "real" package
  144. ULONG Flags; // Flags
  145. ULONG TokenSize; // Token size
  146. ULONG PackageFlags; // Package Flags
  147. ULONG PrefixLen ;
  148. UCHAR Prefix[ NEGOTIATE_MAX_PREFIX ];
  149. } NEG_PACKAGE, * PNEG_PACKAGE ;
  150. //
  151. // Flags for the negotiate package structure:
  152. //
  153. #define NEG_PREFERRED 0x00000001 // Preferred package
  154. #define NEG_NT4_COMPAT 0x00000002 // NT4 compatible package
  155. #define NEG_PACKAGE_EXTRA_OID 0x00000004 // Package is an extra OID for existing package
  156. #define NEG_PACKAGE_INBOUND 0x00000008 // Package is available for inbound
  157. #define NEG_PACKAGE_OUTBOUND 0x00000010 // Package is available for outbound
  158. #define NEG_PACKAGE_LOOPBACK 0x00000020 // Package is preferred loopback handler
  159. #define NEG_PACKAGE_HAS_EXTRAS 0x00000040 // Package has extra OIDS.
  160. typedef struct _NEG_CRED_HANDLE {
  161. PNEG_PACKAGE Package;
  162. CredHandle Handle;
  163. ULONG Flags;
  164. } NEG_CRED_HANDLE, * PNEG_CRED_HANDLE ;
  165. #define NEG_CREDHANDLE_EXTRA_OID 0x00000001
  166. typedef struct _NEG_CREDS {
  167. ULONG Tag ;
  168. ULONG RefCount;
  169. LIST_ENTRY List;
  170. ULONG Flags ;
  171. ULONG_PTR DefaultPackage;
  172. RTL_CRITICAL_SECTION CredLock;
  173. LIST_ENTRY AdditionalCreds ;
  174. TimeStamp Expiry ;
  175. LUID ClientLogonId ;
  176. DWORD ClientProcessId ;
  177. DWORD Count ;
  178. PUCHAR ServerBuffer ;
  179. DWORD ServerBufferLength ;
  180. NEG_CRED_HANDLE Creds[ANYSIZE_ARRAY];
  181. } NEG_CREDS, * PNEG_CREDS;
  182. #define NEGCRED_MULTI 0x00000004 // contains multiple credentials
  183. #define NEGCRED_USE_SNEGO 0x00000008 // Force snego use
  184. #define NEGCRED_KERNEL_CALLER 0x00000010 // This is a kernel caller
  185. #define NEGCRED_EXPLICIT_CREDS 0x00000020 // Explicit creds passed in
  186. #define NEGCRED_MULTI_PART 0x00000040 // Is part of a multi-part credential
  187. #define NEGCRED_ALLOW_NTLM 0x00000080 // Allow negotiate down to NTLM
  188. #define NEGCRED_NEG_NTLM 0x00000100 // Negotiate NTLM
  189. #define NEGCRED_NTLM_LOOPBACK 0x00000200 // Use NTLM on loopbacks
  190. #define NEGCRED_DOMAIN_EXPLICIT_CREDS 0x00000400 // Explicit creds with supplied domain passed in
  191. //
  192. // Special flags to AcquireCredHandle:
  193. //
  194. #define NEG_CRED_DONT_LINK 0x80000000
  195. #
  196. #define NEGCRED_DUP_MASK ( NEGCRED_KERNEL_CALLER )
  197. #define NEGCRED_TAG 'drCN'
  198. typedef struct _NEG_CONTEXT {
  199. ULONG CheckMark;
  200. PNEG_CREDS Creds;
  201. ULONG_PTR CredIndex;
  202. CtxtHandle Handle;
  203. SECURITY_STRING Target;
  204. ULONG Attributes;
  205. SecBuffer MappedBuffer;
  206. BOOLEAN Mapped;
  207. UCHAR CallCount ;
  208. SECURITY_STATUS LastStatus;
  209. PCHECKSUM_FUNCTION Check;
  210. PCHECKSUM_BUFFER Buffer;
  211. TimeStamp Expiry;
  212. ULONG Flags;
  213. PUCHAR Message ;
  214. ULONG CurrentSize ;
  215. ULONG TotalSize ;
  216. struct MechTypeList *SupportedMechs;
  217. } NEG_CONTEXT, * PNEG_CONTEXT;
  218. #define NEGCONTEXT_CHECK 'XgeN'
  219. #define NEGCONTEXT2_CHECK '2geN'
  220. #define NEGOPT_HONOR_SERVER_PREF 0x00000001
  221. //
  222. // Negotiate context flags
  223. //
  224. #define NEG_CONTEXT_PACKAGE_CALLED 0x01 // Have called a package
  225. #define NEG_CONTEXT_FREE_EACH_MECH 0x02 // Free all mechs
  226. #define NEG_CONTEXT_NEGOTIATING 0x04 // Many round trips
  227. #define NEG_CONTEXT_FRAGMENTING 0x08 // Fragmented blob
  228. #define NEG_CONTEXT_FRAG_INBOUND 0x10 // assembling an input
  229. #define NEG_CONTEXT_FRAG_OUTBOUND 0x20 // providing an output
  230. #define NEG_CONTEXT_UPLEVEL 0x40 // Stick to the RFC2478
  231. #define NEG_CONTEXT_MUTUAL_AUTH 0x80 // set mutual auth bit
  232. #define NEG_INVALID_PACKAGE ((ULONG_PTR) -1)
  233. //
  234. // Fifteen minutes in standard time
  235. //
  236. #define FIFTEEN_MINUTES ( 15I64 * 60I64 * 10000000I64 )
  237. typedef struct _NEG_LOGON_SESSION {
  238. LIST_ENTRY List ;
  239. ULONG_PTR CreatingPackage ; // Package that created this logon
  240. ULONG_PTR DefaultPackage ; // Default package to use for this logon
  241. UNICODE_STRING AlternateName ; // Alternate name associated with this logon
  242. LUID LogonId ; // Logon Id of this logon
  243. LUID ParentLogonId ; // Logon Id of creating session
  244. ULONG RefCount ; // Ref
  245. } NEG_LOGON_SESSION, * PNEG_LOGON_SESSION ;
  246. typedef struct _NEG_TRUST_LIST {
  247. ULONG RefCount ; // Refcount for trust list
  248. ULONG TrustCount ; // Number of trusts
  249. PDS_DOMAIN_TRUSTS Trusts ; // Array of trusts
  250. } NEG_TRUST_LIST, *PNEG_TRUST_LIST ;
  251. typedef enum _NEG_DOMAIN_TYPES {
  252. NegUpLevelDomain,
  253. NegUpLevelTrustedDomain,
  254. NegDownLevelDomain,
  255. NegLocalDomain
  256. } NEG_DOMAIN_TYPES ;
  257. //
  258. // Variables global to the neg* source files:
  259. //
  260. extern LIST_ENTRY NegPackageList;
  261. extern LIST_ENTRY NegCredList;
  262. extern LIST_ENTRY NegLogonSessionList ;
  263. #ifndef WIN32_CHICAGO
  264. extern RTL_RESOURCE NegLock;
  265. extern RTL_CRITICAL_SECTION NegLogonSessionListLock ;
  266. extern RTL_CRITICAL_SECTION NegTrustListLock ;
  267. extern PNEG_TRUST_LIST NegTrustList ;
  268. extern LARGE_INTEGER NegTrustTime ;
  269. extern LIST_ENTRY NegDefaultCredList ;
  270. extern RTL_CRITICAL_SECTION NegComputerNamesLock;
  271. extern UNICODE_STRING NegNetbiosComputerName_U;
  272. extern UNICODE_STRING NegDnsComputerName_U;
  273. #else
  274. extern CRITICAL_SECTION NegLock;
  275. #endif
  276. extern PVOID NegNotifyHandle;
  277. extern DWORD NegPackageCount;
  278. extern PUCHAR NegBlob;
  279. extern DWORD NegBlobSize;
  280. extern DWORD NegOptions;
  281. extern BOOL NegUplevelDomain ;
  282. extern DWORD_PTR NegPackageId ;
  283. extern DWORD_PTR NtlmPackageId ;
  284. extern UCHAR NegSpnegoMechEncodedOid[ 8 ];
  285. extern ULONG NegMachineState;
  286. extern ObjectID NegNtlmMechOid ;
  287. extern DWORD NegEventLogLevel ;
  288. extern UNICODE_STRING NegLocalHostName_U ;
  289. extern WCHAR NegLocalHostName[] ;
  290. #ifndef WIN32_CHICAGO
  291. #define NegWriteLockList() RtlAcquireResourceExclusive( &NegLock, TRUE )
  292. #define NegReadLockList() RtlAcquireResourceShared( &NegLock, TRUE )
  293. #define NegUnlockList() RtlReleaseResource( &NegLock )
  294. #define NegWriteLockComputerNames() RtlEnterCriticalSection( &NegComputerNamesLock )
  295. #define NegReadLockComputerNames() RtlEnterCriticalSection( &NegComputerNamesLock )
  296. #define NegUnlockComputerNames() RtlLeaveCriticalSection( &NegComputerNamesLock )
  297. #define NegWriteLockCredList() RtlAcquireResourceExclusive( &NegCredListLock, TRUE )
  298. #define NegReadLockCredList() RtlAcquireResourceShared( &NegCredListLock, TRUE )
  299. #define NegUnlockCredList() RtlReleaseResource( &NegCredListLock )
  300. #else
  301. #define NegWriteLockList() EnterCriticalSection( &NegLock)
  302. #define NegReadLockList() EnterCriticalSection( &NegLock)
  303. #define NegUnlockList() LeaveCriticalSection( &NegLock )
  304. #define NegWriteLockCredList() RtlEnterCriticalSection( &NegCredListLock )
  305. #define NegReadLockCredList() RtlEnterCriticalSection( &NegCredListLock )
  306. #define NegUnlockCredList() RtlLeaveCriticalSection( &NegCredListLock )
  307. #endif // WIN32_CHICAGO
  308. ULONG
  309. NegGetPackageCaps(
  310. ULONG ContextReq
  311. );
  312. #define NegWriteLockCreds(p) RtlEnterCriticalSection( &((PNEG_CREDS) p)->CredLock );
  313. #define NegReadLockCreds(p) RtlEnterCriticalSection( &((PNEG_CREDS) p)->CredLock );
  314. #define NegUnlockCreds(p) RtlLeaveCriticalSection( &((PNEG_CREDS) p)->CredLock );
  315. #define NEG_MECH_LIMIT 16
  316. typedef enum _NEG_MATCH {
  317. MatchUnknown,
  318. PreferredSucceed,
  319. MatchSucceed,
  320. MatchFailed
  321. } NEG_MATCH ;
  322. #if DBG
  323. #define NegDumpOid(s,i) NegpDumpOid(s,i)
  324. #else
  325. #define NegDumpOid(s,i)
  326. #endif
  327. #if DBG
  328. #define NegpValidContext( C ) if (C) DsysAssert( ((PNEG_CONTEXT) C)->CheckMark == NEGCONTEXT_CHECK ) else DsysAssert( C )
  329. #else
  330. #define NegpValidContext( C )
  331. #endif
  332. #define NegpIsValidContext( C ) ((((PNEG_CONTEXT) C)->CheckMark == NEGCONTEXT_CHECK ) ? TRUE : FALSE )
  333. //
  334. // Prototypes
  335. //
  336. int
  337. SpnegoInitAsn(
  338. IN OUT ASN1encoding_t * pEnc,
  339. IN OUT ASN1decoding_t * pDec
  340. );
  341. VOID
  342. SpnegoTermAsn(
  343. IN ASN1encoding_t pEnc,
  344. IN ASN1decoding_t pDec
  345. );
  346. int NTAPI
  347. SpnegoPackData(
  348. IN PVOID Data,
  349. IN ULONG PduValue,
  350. OUT PULONG DataSize,
  351. OUT PUCHAR * MarshalledData
  352. );
  353. int NTAPI
  354. SpnegoUnpackData(
  355. IN PUCHAR Data,
  356. IN ULONG DataSize,
  357. IN ULONG PduValue,
  358. OUT PVOID * DecodedData
  359. );
  360. VOID
  361. SpnegoFreeData(
  362. IN ULONG PduValue,
  363. IN PVOID Data
  364. );
  365. ObjectID
  366. NegpDecodeObjectId(
  367. PUCHAR Id,
  368. DWORD Len);
  369. ObjectID
  370. NegpCopyObjectId(
  371. IN ObjectID Id
  372. );
  373. VOID
  374. NegpFreeObjectId(
  375. ObjectID Id);
  376. SECURITY_STATUS
  377. NegpBuildMechListFromCreds(
  378. PNEG_CREDS Creds,
  379. ULONG fContextReq,
  380. ULONG MechAttributes,
  381. struct MechTypeList ** MechList);
  382. VOID
  383. NegpFreeMechList(
  384. struct MechTypeList *MechList);
  385. struct MechTypeList *
  386. NegpCopyMechList(
  387. struct MechTypeList *MechList);
  388. ULONG_PTR
  389. NegpFindPackageForOid(
  390. PNEG_CREDS Creds,
  391. ObjectID Oid);
  392. int
  393. NegpCompareOid(
  394. ObjectID A,
  395. ObjectID B);
  396. SECURITY_STATUS
  397. NegpParseBuffers(
  398. PSecBufferDesc pMessage,
  399. BOOL Map,
  400. PSecBuffer * pToken,
  401. PSecBuffer * pEmpty);
  402. VOID
  403. NegpDumpOid(
  404. PSTR Banner,
  405. ObjectID Id
  406. );
  407. ULONG
  408. NegoMapNegFlagsToPackageFlags(
  409. IN int NegFlags
  410. );
  411. int
  412. NegoMapNegFlasgToContextFlags(
  413. IN ULONG ContextFlags
  414. );
  415. int
  416. Neg_der_read_length(
  417. unsigned char **buf,
  418. LONG *bufsize,
  419. LONG * headersize
  420. );
  421. SECURITY_STATUS
  422. NegAddFragmentToContext(
  423. PNEG_CONTEXT Context,
  424. PSecBuffer Fragment
  425. );
  426. SECURITY_STATUS
  427. SEC_ENTRY
  428. NegCreateContextFromFragment(
  429. LSA_SEC_HANDLE dwCredHandle,
  430. LSA_SEC_HANDLE dwCtxtHandle,
  431. PSecBuffer Buffer,
  432. ULONG fContextReq,
  433. ULONG TargetDataRep,
  434. PLSA_SEC_HANDLE pdwNewContext,
  435. PSecBufferDesc pOutput,
  436. PULONG pfContextAttr
  437. );
  438. #ifdef __SPMGR_H__
  439. #endif
  440. PNEG_LOGON_SESSION
  441. NegpLocateLogonSession(
  442. PLUID LogonId
  443. );
  444. VOID
  445. NegpDerefLogonSession(
  446. PNEG_LOGON_SESSION LogonSession
  447. );
  448. NTSTATUS
  449. NegpDetermineTokenPackage(
  450. IN ULONG_PTR CredHandle,
  451. IN PSecBuffer InitialToken,
  452. OUT PULONG PackageIndex
  453. );
  454. NTSTATUS
  455. NegpGetTokenOid(
  456. IN PUCHAR Buf,
  457. OUT ULONG BufSize,
  458. OUT ObjectID * ObjectId
  459. );
  460. VOID
  461. NegpReleaseCreds(
  462. PNEG_CREDS pCreds,
  463. BOOLEAN CleanupCall
  464. );
  465. NTSTATUS
  466. NegpCopyCredsToBuffer(
  467. IN PSECPKG_PRIMARY_CRED PrimaryCred,
  468. IN PSECPKG_SUPPLEMENTAL_CRED SupplementalCred,
  469. OUT PSECPKG_PRIMARY_CRED PrimaryCredCopy OPTIONAL,
  470. OUT PSECPKG_SUPPLEMENTAL_CRED SupplementalCredCopy OPTIONAL
  471. );
  472. BOOL
  473. NegpRearrangeMechsIfNeccessary(
  474. struct MechTypeList ** MechList,
  475. PSECURITY_STRING Target,
  476. PBOOL DirectPacket
  477. );
  478. VOID
  479. NegpReadRegistryParameters(
  480. HKEY Key
  481. );
  482. #ifndef WIN32_CHICAGO
  483. //
  484. // NT-specific functions
  485. //
  486. DWORD
  487. WINAPI
  488. NegParamChange(
  489. PVOID p
  490. );
  491. PNEG_TRUST_LIST
  492. NegpGetTrustList(
  493. VOID
  494. );
  495. VOID
  496. NegpDerefTrustList(
  497. PNEG_TRUST_LIST TrustList
  498. );
  499. VOID
  500. NegpReportEvent(
  501. IN WORD EventType,
  502. IN DWORD EventId,
  503. IN DWORD Category,
  504. IN NTSTATUS Status,
  505. IN DWORD NumberOfStrings,
  506. ...
  507. );
  508. VOID
  509. NTAPI
  510. NegLsaPolicyChangeCallback(
  511. IN POLICY_NOTIFICATION_INFORMATION_CLASS ChangedInfoClass
  512. );
  513. NTSTATUS
  514. NegEnumPackagePrefixesCall(
  515. IN PLSA_CLIENT_REQUEST ClientRequest,
  516. IN PVOID ProtocolSubmitBuffer,
  517. IN PVOID ClientBufferBase,
  518. IN ULONG SubmitBufferLength,
  519. OUT PVOID *ProtocolReturnBuffer,
  520. OUT PULONG ReturnBufferLength,
  521. OUT PNTSTATUS ProtocolStatus
  522. );
  523. NTSTATUS
  524. NegGetCallerNameCall(
  525. IN PLSA_CLIENT_REQUEST ClientRequest,
  526. IN PVOID ProtocolSubmitBuffer,
  527. IN PVOID ClientBufferBase,
  528. IN ULONG SubmitBufferLength,
  529. OUT PVOID *ProtocolReturnBuffer,
  530. OUT PULONG ReturnBufferLength,
  531. OUT PNTSTATUS ProtocolStatus
  532. );
  533. PNEG_LOGON_SESSION
  534. NegpBuildLogonSession(
  535. PLUID LogonId,
  536. ULONG_PTR LogonPackage,
  537. ULONG_PTR DefaultPackage
  538. );
  539. VOID
  540. NegpDerefLogonSession(
  541. PNEG_LOGON_SESSION LogonSession
  542. );
  543. VOID
  544. NegpDerefLogonSessionById(
  545. PLUID LogonId
  546. );
  547. PNEG_LOGON_SESSION
  548. NegpLocateLogonSession(
  549. PLUID LogonId
  550. );
  551. NTSTATUS
  552. NTAPI
  553. NegpMapLogonRequest(
  554. IN PVOID ProtocolSubmitBuffer,
  555. IN PVOID ClientBufferBase,
  556. IN ULONG SubmitBufferSize,
  557. OUT PMSV1_0_INTERACTIVE_LOGON * LogonInfo
  558. );
  559. #endif
  560. #endif // __MEGOTIAT_HXX__