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.

703 lines
23 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. tokenp.h
  5. Abstract:
  6. This module contains the internal (private) declarations needed by the
  7. TOKEN object routines.
  8. It also contains global variables needed by the TOKEN object routines.
  9. Author:
  10. Jim Kelly (JimK) 18-May-1990
  11. Revision History:
  12. v10: robertre
  13. Added SepAccessCheck and SepPrivilegeCheck prototypes
  14. v11: robertre
  15. Added parameter to SepAccessCheck
  16. --*/
  17. #ifndef _TOKENP_
  18. #define _TOKENP_
  19. //#define TOKEN_DEBUG
  20. #include "ntos.h"
  21. #include "sep.h"
  22. #include "seopaque.h"
  23. /////////////////////////////////////////////////////////////////////////
  24. // //
  25. // Token Diagnostics //
  26. // //
  27. /////////////////////////////////////////////////////////////////////////
  28. #if DBG
  29. #define TOKEN_DIAGNOSTICS_ENABLED 1
  30. #endif // DBG
  31. //
  32. // These definitions are useful diagnostics aids
  33. //
  34. #if TOKEN_DIAGNOSTICS_ENABLED
  35. //
  36. // Test for enabled diagnostic
  37. //
  38. #define IF_TOKEN_GLOBAL( FlagName ) \
  39. if (TokenGlobalFlag & (TOKEN_DIAG_##FlagName))
  40. //
  41. // Diagnostics print statement
  42. //
  43. #define TokenDiagPrint( FlagName, _Text_ ) \
  44. IF_TOKEN_GLOBAL( FlagName ) \
  45. DbgPrint _Text_
  46. #else // !TOKEN_DIAGNOSTICS_ENABLED
  47. //
  48. // No diagnostics included in build
  49. //
  50. //
  51. // Test for diagnostics enabled
  52. //
  53. #define IF_TOKEN_GLOBAL( FlagName ) if (FALSE)
  54. //
  55. // Diagnostics print statement (expands to no-op)
  56. //
  57. #define TokenDiagPrint( FlagName, _Text_ ) ;
  58. #endif // TOKEN_DIAGNOSTICS_ENABLED
  59. //
  60. // The following flags enable or disable various diagnostic
  61. // capabilities within token code. These flags are set in
  62. // TokenGlobalFlag (only available within a DBG system).
  63. //
  64. //
  65. // TOKEN_LOCKS - Display information about acquisition and freeing
  66. // of token locks.
  67. //
  68. #define TOKEN_DIAG_TOKEN_LOCKS ((ULONG) 0x00000001L)
  69. /////////////////////////////////////////////////////////////////////////
  70. // //
  71. // Token Related Constants //
  72. // //
  73. /////////////////////////////////////////////////////////////////////////
  74. //
  75. // By default, a token is charged the following for its dynamic component.
  76. // The dynamic component houses the default ACL and primary group ID.
  77. // If the size of these parameters passed upon token creation are larger
  78. // than this default, then the larger value will be charged.
  79. //
  80. #define TOKEN_DEFAULT_DYNAMIC_CHARGE 500
  81. /////////////////////////////////////////////////////////////////////////
  82. // //
  83. // Token Object Body //
  84. // //
  85. /////////////////////////////////////////////////////////////////////////
  86. //
  87. // Tokens have three parts:
  88. //
  89. // Fixed part of body,
  90. // Variable part of body,
  91. // Dynamic part (not in body).
  92. //
  93. // The fixed and variable parts are allocated in a single block of memory.
  94. // The dynamic part is a separately allocated block of memory.
  95. //
  96. // The fixed part of the body contains the fixed length fields. These
  97. // are defined in the TOKEN data type.
  98. //
  99. // The variable part of the body is variable in length and contains
  100. // privileges and user/group SIDs. This part is variable in length
  101. // between different token objects, but does not change once established
  102. // for an individual token.
  103. //
  104. // The dynamic part is used to house default discretionary ACL information
  105. // and the primary group ID.
  106. //
  107. // Pictorially, a token looks like:
  108. //
  109. // ============== +---------------+
  110. // ^ | |
  111. // | | |
  112. // | | |
  113. // | | DynamicPart o-----------+
  114. // | |- - - - - - - -| |
  115. // +-----o Privileges | |
  116. // Token | |- - - - - - - -| |
  117. // Body | +--o UserAndGroups | |
  118. // | | | |- - - - - - - -| |
  119. // | | +--o RestrictedSids| \|/
  120. // | | | |- - - - - - - -| +---------------------+
  121. // | | | | PrimaryGroup o------->| [Primary Group SID] |
  122. // | | | |- - - - - - - -| | o |
  123. // | | | | DefaultAcl o---+ | o |
  124. // | | | |- - - - - - - -| | | o |
  125. // | | | | o | | |- - - - - - - - - - -|
  126. // | | | | o | +--->| [ Default Acl ] |
  127. // v | | | o | | o |
  128. // ==============| | |===============| | o |
  129. // ^ | +->| SIDs Array | | o |
  130. // | | | [User SID ] | +---------------------+
  131. // | | | [Group SID ] |
  132. // | | [Group SID ] |
  133. // Variable | | [Rest. Sid ] |
  134. // Part | | o |
  135. // | |- - - - - - - -|
  136. // | +---->| Privileges |
  137. // | | Array |
  138. // v | |
  139. // ============== +---------------+
  140. //
  141. // WARNING: The positions of fields illustrated in this picture are not
  142. // intented to reflect their actual or even relative positions
  143. // within the real data structures. The exception to this is
  144. // that THE USER SID IS THE FIRST SID IN THE UserAndGroups
  145. // ARRAY.
  146. //
  147. //
  148. // ! ! ! ! IMPORTANT ! ! ! !
  149. //
  150. // The access validation routines assume the SIDs are arranged
  151. // in a particular order within the variable part of the token.
  152. // Any changes to the order of the SIDs must be coordinated with
  153. // corresponding changes to the access validation routines.
  154. //
  155. // ! ! ! ! ! ! ! ! ! ! !
  156. typedef struct _TOKEN {
  157. //
  158. // Fields arranged by size to preserve alignment.
  159. // Large fields before small fields.
  160. //
  161. //
  162. // The following fields are either ReadOnly or ReadWrite.
  163. // ReadOnly fields may be referenced any time a pointer to the
  164. // token is still valid. ReadWrite fields may only be referenced
  165. // when the TokenLock is held.
  166. // The dynamic part of the token (pointed to by the DynamicPart field)
  167. // is also protected by the token lock.
  168. //
  169. // ReadOnly fields are marked Ro: in their comment.
  170. // ReadWrite fields are marked Wr: in their comment.
  171. //
  172. TOKEN_SOURCE TokenSource; // Ro: 16-Bytes
  173. LUID TokenId; // Ro: 8-Bytes
  174. LUID AuthenticationId; // Ro: 8-Bytes
  175. LUID ParentTokenId; // Ro: 8-Bytes
  176. LARGE_INTEGER ExpirationTime; // Ro: 8-Bytes
  177. PERESOURCE TokenLock; // Ro:
  178. #if DBG || TOKEN_LEAK_MONITOR
  179. #define TRACE_SIZE 30
  180. //
  181. // This code is for tracking token leaks, in conjunction with !obtrace.
  182. //
  183. HANDLE ProcessCid; // Cid of creator process
  184. HANDLE ThreadCid; // Cid of creator thread
  185. UCHAR ImageFileName[16]; // Image name of creator process
  186. ULONG CreateMethod; // Either 0xC (SepCreateToken) 0xD (SepDuplicateToken) or 0xF (SepFilterToken)
  187. ULONG_PTR CreateTrace[TRACE_SIZE]; // Stack backtrace that created this token (usermode part is first 20 nonzero stack entries)
  188. #endif
  189. //
  190. // Each time the security information in a token is changed, the
  191. // following ID is changed. Fields that cause this field to be
  192. // updated are marked as (Mod) in their comment field.
  193. //
  194. LUID ModifiedId; // Wr: 8-Bytes
  195. ULONG SessionId; // Wr: 4-bytes
  196. ULONG UserAndGroupCount; // Ro: 4-Bytes
  197. ULONG RestrictedSidCount; // Ro: 4-Bytes
  198. ULONG PrivilegeCount; // Ro: 4-Bytes
  199. ULONG VariableLength; // Ro: 4-Bytes
  200. ULONG DynamicCharged; // Ro: 4-Bytes
  201. ULONG DynamicAvailable; // Wr: 4-Bytes (Mod)
  202. ULONG DefaultOwnerIndex; // Wr: 4-Bytes (Mod)
  203. PSID_AND_ATTRIBUTES UserAndGroups; // Wr: 4-Bytes (Mod)
  204. PSID_AND_ATTRIBUTES RestrictedSids; // Ro: 4-Bytes
  205. PSID PrimaryGroup; // Wr: 4-Bytes (Mod)
  206. PLUID_AND_ATTRIBUTES Privileges; // Wr: 4-Bytes (Mod)
  207. PULONG DynamicPart; // Wr: 4-Bytes (Mod)
  208. PACL DefaultDacl; // Wr: 4-Bytes (Mod)
  209. TOKEN_TYPE TokenType; // Ro: 1-Byte
  210. SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; // Ro: 1-Byte
  211. UCHAR TokenFlags; // Ro: 4-Bytes
  212. BOOLEAN TokenInUse; // Wr: 1-Byte
  213. PSECURITY_TOKEN_PROXY_DATA ProxyData; // Ro: 4-Bytes
  214. PSECURITY_TOKEN_AUDIT_DATA AuditData; // Ro: 4-Bytes
  215. //
  216. // This marks the beginning of the variable part of the token.
  217. // It must follow all other fields in the token.
  218. //
  219. ULONG VariablePart; // Wr: 4-Bytes (Mod)
  220. } TOKEN, * PTOKEN;
  221. //
  222. // Where:
  223. //
  224. // TokenSource - Information provided by the executive component that
  225. // requested the logon that the token represents.
  226. //
  227. //
  228. // TokenId - Is an LUID value. Each token object has a uniquely
  229. // assigned LUID.
  230. //
  231. //
  232. // AuthenticationId - Is the LUID assigned by the domain controller for
  233. // the logon session.
  234. //
  235. //
  236. // ExpirationTime - Not yet supported in NT.
  237. //
  238. //
  239. // ModifiedId - Is an LUID which is changed each time a modification is
  240. // made to this token which changes the security semantics of the
  241. // token. This includes enabling/disabling privileges and groups
  242. // and changing default ACLs, et cetera. Any token which is a
  243. // duplicate of this token will have the same ModifiedId (until
  244. // one or the other is changed). This does not cover changes to
  245. // non-security semantics fields, like TokenInUse.
  246. //
  247. //
  248. // UserAndGroupCount - Indicates the number of user/group IDs in this token.
  249. // This value must be at least 1. A value of 1 indicates a user
  250. // ID with no supplemental group IDs. A value of 5 indicates a
  251. // user ID and 4 supplemental group IDs.
  252. //
  253. // PrivilegeCount - Indicates how many privileges are included in
  254. // this token. May be zero or larger.
  255. //
  256. // TokenType - Indicates which type of token this token object is.
  257. //
  258. // ImpersonationLevel - For TokenImpersonation type tokens, this field
  259. // indicates the impersonation level. For TokenPrimary type tokens,
  260. // this field is ignored.
  261. //
  262. // DynamicCharged - Indicates how much pool quota has been charged
  263. // for the dynamic portion of this token.
  264. //
  265. // DynamicAvailable - Indicates how much of the charged quota is still
  266. // available for use. This is modified when pool associated
  267. // with the dynamic portion of the token is allocated or freed,
  268. // such as when the default DACL or primary group is replaced.
  269. //
  270. //
  271. // DefaultOwnerIndex - If non-zero, identifies an ID that has explicitly
  272. // been established as the default owner for this token. If it is zero,
  273. // the standard default (user ID) is used as the default owner.
  274. //
  275. // UserAndGroups - Points to an array of SID_AND_ATTRIBUTES. The first
  276. // element in this array is the token's user ID. Any additional
  277. // elements are those of groups. The number of entries in this
  278. // array is one greater than
  279. //
  280. // PrimaryGroup - Points to an SID that is to be used as the primary
  281. // group of the token. There are no value restrictions
  282. // placed upon what can be used as a primary group. This
  283. // SID is not one of user or group IDs (although it may have the
  284. // same value as one of those IDs).
  285. //
  286. // Privileges - Points to an array of privileges represented as
  287. // LUID_AND_ATTRIBUTES. The number of elements in this array
  288. // is contained in the PrivilegesCount field.
  289. //
  290. // TokenInUse - Is a boolean that indicates whether a primary token
  291. // is already in use by a process. This field value is only
  292. // valid for primary tokens.
  293. //
  294. // ProxyData - Optionally points to a Proxy data structure, containing
  295. // the information to be passed to AVR routines by file systems.
  296. // This field being non-null identifies the token as a proxy token.
  297. //
  298. // AuditData - Optionally points to an Audit data structure, containing
  299. // global auditing data for this subject.
  300. //
  301. // NOTE: Access to this field is guarded by the global
  302. // PROCESS SECURITY FIELDS LOCK.
  303. // VariablePart - Is the beginning of the variable part of the token.
  304. //
  305. ////////////////////////////////////////////////////////////////////////
  306. //
  307. // Internal version of Object Type list
  308. //
  309. ////////////////////////////////////////////////////////////////////////
  310. typedef struct _IOBJECT_TYPE_LIST {
  311. USHORT Level;
  312. USHORT Flags;
  313. #define OBJECT_SUCCESS_AUDIT 0x1
  314. #define OBJECT_FAILURE_AUDIT 0x2
  315. GUID ObjectType;
  316. LONG ParentIndex;
  317. ULONG Remaining;
  318. ULONG CurrentGranted;
  319. ULONG CurrentDenied;
  320. } IOBJECT_TYPE_LIST, *PIOBJECT_TYPE_LIST;
  321. NTSTATUS
  322. SeCaptureObjectTypeList (
  323. IN POBJECT_TYPE_LIST ObjectTypeList OPTIONAL,
  324. IN ULONG ObjectTypeListLength,
  325. IN KPROCESSOR_MODE RequestorMode,
  326. OUT PIOBJECT_TYPE_LIST *CapturedObjectTypeList
  327. );
  328. VOID
  329. SeFreeCapturedObjectTypeList(
  330. IN PVOID ObjectTypeList
  331. );
  332. /////////////////////////////////////////////////////////////////////////
  333. // //
  334. // Token Specific Macros //
  335. // //
  336. /////////////////////////////////////////////////////////////////////////
  337. #ifndef TOKEN_DIAGNOSTICS_ENABLED
  338. #define SepAcquireTokenReadLock(T) KeEnterCriticalRegion(); \
  339. ExAcquireResourceSharedLite((T)->TokenLock, TRUE)
  340. #define SepAcquireTokenWriteLock(T) KeEnterCriticalRegion(); \
  341. ExAcquireResourceExclusiveLite((T)->TokenLock, TRUE)
  342. #define SepReleaseTokenReadLock(T) ExReleaseResourceLite((T)->TokenLock); \
  343. KeLeaveCriticalRegion()
  344. #else // TOKEN_DIAGNOSTICS_ENABLED
  345. #define SepAcquireTokenReadLock(T) if (TokenGlobalFlag & TOKEN_DIAG_TOKEN_LOCKS) { \
  346. DbgPrint("SE (Token): Acquiring Token READ Lock for access to token 0x%lx\n", (T)); \
  347. } \
  348. KeEnterCriticalRegion(); \
  349. ExAcquireResourceSharedLite((T)->TokenLock, TRUE)
  350. #define SepAcquireTokenWriteLock(T) if (TokenGlobalFlag & TOKEN_DIAG_TOKEN_LOCKS) { \
  351. DbgPrint("SE (Token): Acquiring Token WRITE Lock for access to token 0x%lx ********************* EXCLUSIVE *****\n", (T)); \
  352. } \
  353. KeEnterCriticalRegion(); \
  354. ExAcquireResourceExclusiveLite((T)->TokenLock, TRUE)
  355. #define SepReleaseTokenReadLock(T) if (TokenGlobalFlag & TOKEN_DIAG_TOKEN_LOCKS) { \
  356. DbgPrint("SE (Token): Releasing Token Lock for access to token 0x%lx\n", (T)); \
  357. } \
  358. ExReleaseResourceLite((T)->TokenLock); \
  359. KeLeaveCriticalRegion()
  360. #endif // TOKEN_DIAGNOSTICS_ENABLED
  361. #define SepReleaseTokenWriteLock(T,M) \
  362. { \
  363. if ((M)) { \
  364. ExAllocateLocallyUniqueId( &((PTOKEN)(T))->ModifiedId ); \
  365. } \
  366. SepReleaseTokenReadLock( T ); \
  367. }
  368. //
  369. // Reference individual privilege attribute flags of any privilege array
  370. //
  371. // P - is a pointer to an array of privileges (PLUID_AND_ATTRIBUTES)
  372. // I - is the index of the privilege
  373. // A - is the name of the attribute desired (e.g., Enabled, EnabledByDefault, etc. )
  374. //
  375. #define SepArrayPrivilegeAttributes(P,I) ( (P)[I].Attributes )
  376. //
  377. // Reference individual privilege attribute flags of token privileges
  378. //
  379. // T - is a pointer to a token
  380. // I - is the index of the privilege
  381. // A - is the name of the attribute desired (e.g., Enabled, EnabledByDefault, etc. )
  382. //
  383. #define SepTokenPrivilegeAttributes(T,I) ( (T)->Privileges[I].Attributes )
  384. //
  385. // Reference individual group attribute flags of any group array
  386. //
  387. // G - is a pointer to the array of groups (SID_AND_ATTRIBUTES[])
  388. // I - is the index of the group
  389. //
  390. #define SepArrayGroupAttributes(G,I) ( (G)[I].Attributes )
  391. //
  392. // Reference individual group attribute flags of token groups
  393. //
  394. // T - is a pointer to a token
  395. // I - is the index of the group
  396. //
  397. #define SepTokenGroupAttributes(T,I) ( (T)->UserAndGroups[I].Attributes )
  398. ////////////////////////////////////////////////////////////////////////
  399. // //
  400. // Private Routine Declarations //
  401. // //
  402. ////////////////////////////////////////////////////////////////////////
  403. NTSTATUS
  404. SepAdjustGroups(
  405. IN PTOKEN Token,
  406. IN BOOLEAN MakeChanges,
  407. IN BOOLEAN ResetToDefault,
  408. IN ULONG GroupCount OPTIONAL,
  409. IN PSID_AND_ATTRIBUTES NewState OPTIONAL,
  410. OUT PTOKEN_GROUPS PreviousState OPTIONAL,
  411. OUT PSID SidBuffer OPTIONAL,
  412. OUT PULONG ReturnLength,
  413. OUT PULONG ChangeCount,
  414. OUT PBOOLEAN ChangesMade
  415. );
  416. NTSTATUS
  417. SepAdjustPrivileges(
  418. IN PTOKEN Token,
  419. IN BOOLEAN MakeChanges,
  420. IN BOOLEAN DisableAllPrivileges,
  421. IN ULONG PrivilegeCount OPTIONAL,
  422. IN PLUID_AND_ATTRIBUTES NewState OPTIONAL,
  423. OUT PTOKEN_PRIVILEGES PreviousState OPTIONAL,
  424. OUT PULONG ReturnLength,
  425. OUT PULONG ChangeCount,
  426. OUT PBOOLEAN ChangesMade
  427. );
  428. VOID
  429. SepAppendDefaultDacl(
  430. IN PTOKEN Token,
  431. IN PACL PAcl
  432. );
  433. VOID
  434. SepAppendPrimaryGroup(
  435. IN PTOKEN Token,
  436. IN PSID PSid
  437. );
  438. NTSTATUS
  439. SepDuplicateToken(
  440. IN PTOKEN ExistingToken,
  441. IN POBJECT_ATTRIBUTES ObjectAttributes,
  442. IN BOOLEAN EffectiveOnly,
  443. IN TOKEN_TYPE TokenType,
  444. IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel OPTIONAL,
  445. IN KPROCESSOR_MODE RequestorMode,
  446. OUT PTOKEN *DuplicateToken
  447. );
  448. NTSTATUS
  449. SepFilterToken(
  450. IN PTOKEN ExistingToken,
  451. IN KPROCESSOR_MODE RequestorMode,
  452. IN ULONG Flags,
  453. IN ULONG GroupCount,
  454. IN PSID_AND_ATTRIBUTES GroupsToDisable OPTIONAL,
  455. IN ULONG PrivilegeCount,
  456. IN PLUID_AND_ATTRIBUTES PrivilegesToDelete OPTIONAL,
  457. IN ULONG SidCount,
  458. IN PSID_AND_ATTRIBUTES RestrictedSids OPTIONAL,
  459. IN ULONG SidLength,
  460. OUT PTOKEN * FilteredToken
  461. );
  462. BOOLEAN
  463. SepSidInSidAndAttributes (
  464. IN PSID_AND_ATTRIBUTES SidAndAttributes,
  465. IN ULONG SidCount,
  466. IN PSID PrincipalSelfSid,
  467. IN PSID Sid
  468. );
  469. VOID
  470. SepRemoveDisabledGroupsAndPrivileges(
  471. IN PTOKEN Token,
  472. IN ULONG Flags,
  473. IN ULONG GroupCount,
  474. IN PSID_AND_ATTRIBUTES GroupsToDisable,
  475. IN ULONG PrivilegeCount,
  476. IN PLUID_AND_ATTRIBUTES PrivilegesToDelete
  477. );
  478. VOID
  479. SepFreeDefaultDacl(
  480. IN PTOKEN Token
  481. );
  482. VOID
  483. SepFreePrimaryGroup(
  484. IN PTOKEN Token
  485. );
  486. NTSTATUS
  487. SepExpandDynamic(
  488. IN PTOKEN Token,
  489. IN ULONG NewLength
  490. );
  491. BOOLEAN
  492. SepIdAssignableAsOwner(
  493. IN PTOKEN Token,
  494. IN ULONG Index
  495. );
  496. VOID
  497. SepMakeTokenEffectiveOnly(
  498. IN PTOKEN Token
  499. );
  500. BOOLEAN
  501. SepTokenInitialization( VOID );
  502. VOID
  503. SepTokenDeleteMethod (
  504. IN PVOID Token
  505. );
  506. //
  507. // These are here because if they are placed in sep.h, we don't
  508. // have the PTOKEN datatype available.
  509. //
  510. BOOLEAN
  511. SepPrivilegeCheck(
  512. IN PTOKEN Token,
  513. IN OUT PLUID_AND_ATTRIBUTES RequiredPrivileges,
  514. IN ULONG RequiredPrivilegeCount,
  515. IN ULONG PrivilegeSetControl,
  516. IN KPROCESSOR_MODE PreviousMode
  517. );
  518. BOOLEAN
  519. SepAccessCheck (
  520. IN PSECURITY_DESCRIPTOR SecurityDescriptor,
  521. IN PSID PrincipalSelfSid,
  522. IN PTOKEN PrimaryToken,
  523. IN PTOKEN ClientToken OPTIONAL,
  524. IN ACCESS_MASK DesiredAccess,
  525. IN PIOBJECT_TYPE_LIST ObjectTypeList OPTIONAL,
  526. IN ULONG ObjectTypeListLength,
  527. IN PGENERIC_MAPPING GenericMapping,
  528. IN ACCESS_MASK PreviouslyGrantedAccess,
  529. IN KPROCESSOR_MODE PreviousMode,
  530. OUT PACCESS_MASK GrantedAccess,
  531. OUT PPRIVILEGE_SET *Privileges OPTIONAL,
  532. OUT PNTSTATUS AccessStatus,
  533. IN BOOLEAN ReturnResultList,
  534. OUT PBOOLEAN ReturnSomeAccessGranted,
  535. OUT PBOOLEAN ReturnSomeAccessDenied
  536. );
  537. BOOLEAN
  538. SepObjectInTypeList (
  539. IN GUID *ObjectType,
  540. IN PIOBJECT_TYPE_LIST ObjectTypeList,
  541. IN ULONG ObjectTypeListLength,
  542. OUT PULONG ReturnedIndex
  543. );
  544. #ifdef TOKEN_DEBUG
  545. VOID
  546. SepDumpToken(
  547. IN PTOKEN T
  548. );
  549. #endif //TOKEN_DEBUG
  550. ////////////////////////////////////////////////////////////////////////
  551. // //
  552. // Global Variables //
  553. // //
  554. ////////////////////////////////////////////////////////////////////////
  555. extern const GENERIC_MAPPING SepTokenMapping;
  556. extern POBJECT_TYPE SeTokenObjectType;
  557. //extern ERESOURCE SepTokenLock;
  558. #ifdef TOKEN_DIAGNOSTICS_ENABLED
  559. extern ULONG TokenGlobalFlag;
  560. #endif // TOKEN_DIAGNOSTICS_ENABLED
  561. #endif // _TOKENP_