3 * Copyright (C) 2002 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __NTOSKRNL_INCLUDE_INTERNAL_SE_H
21 #define __NTOSKRNL_INCLUDE_INTERNAL_SE_H
25 extern POBJECT_TYPE SepTokenObjectType
;
28 extern SID_IDENTIFIER_AUTHORITY SeNullSidAuthority
;
29 extern SID_IDENTIFIER_AUTHORITY SeWorldSidAuthority
;
30 extern SID_IDENTIFIER_AUTHORITY SeLocalSidAuthority
;
31 extern SID_IDENTIFIER_AUTHORITY SeCreatorSidAuthority
;
32 extern SID_IDENTIFIER_AUTHORITY SeNtSidAuthority
;
35 extern PSID SeNullSid
;
36 extern PSID SeWorldSid
;
37 extern PSID SeLocalSid
;
38 extern PSID SeCreatorOwnerSid
;
39 extern PSID SeCreatorGroupSid
;
40 extern PSID SeCreatorOwnerServerSid
;
41 extern PSID SeCreatorGroupServerSid
;
42 extern PSID SeNtAuthoritySid
;
43 extern PSID SeDialupSid
;
44 extern PSID SeNetworkSid
;
45 extern PSID SeBatchSid
;
46 extern PSID SeInteractiveSid
;
47 extern PSID SeServiceSid
;
48 extern PSID SeAnonymousLogonSid
;
49 extern PSID SePrincipalSelfSid
;
50 extern PSID SeLocalSystemSid
;
51 extern PSID SeAuthenticatedUserSid
;
52 extern PSID SeRestrictedCodeSid
;
53 extern PSID SeAliasAdminsSid
;
54 extern PSID SeAliasUsersSid
;
55 extern PSID SeAliasGuestsSid
;
56 extern PSID SeAliasPowerUsersSid
;
57 extern PSID SeAliasAccountOpsSid
;
58 extern PSID SeAliasSystemOpsSid
;
59 extern PSID SeAliasPrintOpsSid
;
60 extern PSID SeAliasBackupOpsSid
;
63 extern LUID SeCreateTokenPrivilege
;
64 extern LUID SeAssignPrimaryTokenPrivilege
;
65 extern LUID SeLockMemoryPrivilege
;
66 extern LUID SeIncreaseQuotaPrivilege
;
67 extern LUID SeUnsolicitedInputPrivilege
;
68 extern LUID SeTcbPrivilege
;
69 extern LUID SeSecurityPrivilege
;
70 extern LUID SeTakeOwnershipPrivilege
;
71 extern LUID SeLoadDriverPrivilege
;
72 extern LUID SeCreatePagefilePrivilege
;
73 extern LUID SeIncreaseBasePriorityPrivilege
;
74 extern LUID SeSystemProfilePrivilege
;
75 extern LUID SeSystemtimePrivilege
;
76 extern LUID SeProfileSingleProcessPrivilege
;
77 extern LUID SeCreatePermanentPrivilege
;
78 extern LUID SeBackupPrivilege
;
79 extern LUID SeRestorePrivilege
;
80 extern LUID SeShutdownPrivilege
;
81 extern LUID SeDebugPrivilege
;
82 extern LUID SeAuditPrivilege
;
83 extern LUID SeSystemEnvironmentPrivilege
;
84 extern LUID SeChangeNotifyPrivilege
;
85 extern LUID SeRemoteShutdownPrivilege
;
88 extern PACL SePublicDefaultUnrestrictedDacl
;
89 extern PACL SePublicOpenDacl
;
90 extern PACL SePublicOpenUnrestrictedDacl
;
91 extern PACL SeUnrestrictedDacl
;
96 BOOLEAN
SeInit1(VOID
);
97 BOOLEAN
SeInit2(VOID
);
99 VOID
SepInitLuid(VOID
);
100 VOID
SepInitPrivileges(VOID
);
101 BOOLEAN
SepInitSecurityIDs(VOID
);
102 BOOLEAN
SepInitDACLs(VOID
);
103 BOOLEAN
SepInitSDs(VOID
);
105 VOID
SepInitializeTokenImplementation(VOID
);
107 NTSTATUS
SepCreateSystemProcessToken(struct _EPROCESS
* Process
);
108 NTSTATUS
SepInitializeNewProcess(struct _EPROCESS
* NewProcess
,
109 struct _EPROCESS
* ParentProcess
);
111 NTSTATUS
SeExchangePrimaryToken(struct _EPROCESS
* Process
,
112 PIACCESS_TOKEN NewToken
,
113 PIACCESS_TOKEN
* OldTokenP
);
115 NTSTATUS
SeCaptureLuidAndAttributesArray(PLUID_AND_ATTRIBUTES Src
,
116 ULONG PrivilegeCount
,
117 KPROCESSOR_MODE PreviousMode
,
118 PLUID_AND_ATTRIBUTES AllocatedMem
,
119 ULONG AllocatedLength
,
122 PLUID_AND_ATTRIBUTES
* Dest
,
126 RtlCopySidAndAttributesArray(ULONG Count
,
127 PSID_AND_ATTRIBUTES_ARRAY Src
,
129 PSID_AND_ATTRIBUTES_ARRAY Dest
,
131 PVOID
* RemainingSidArea
,
132 PULONG RemainingSidAreaSize
);
134 #endif /* !AS_INVOKED */
136 #endif /* __NTOSKRNL_INCLUDE_INTERNAL_SE_H */