Drop has_mandatory_integrity_control flag
This commit is contained in:
parent
380b9affd1
commit
aacc4f63d0
@ -44,8 +44,6 @@ issetugid (void)
|
|||||||
since that's necessary anyway. */
|
since that's necessary anyway. */
|
||||||
static HANDLE
|
static HANDLE
|
||||||
get_full_privileged_inheritable_token (HANDLE token)
|
get_full_privileged_inheritable_token (HANDLE token)
|
||||||
{
|
|
||||||
if (wincap.has_mandatory_integrity_control ())
|
|
||||||
{
|
{
|
||||||
TOKEN_LINKED_TOKEN linked;
|
TOKEN_LINKED_TOKEN linked;
|
||||||
ULONG size;
|
ULONG size;
|
||||||
@ -80,7 +78,6 @@ get_full_privileged_inheritable_token (HANDLE token)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!SetHandleInformation (token, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT))
|
if (!SetHandleInformation (token, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT))
|
||||||
{
|
{
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
@ -972,14 +969,10 @@ create_token (cygsid &usersid, user_groups &new_groups)
|
|||||||
&mandatory_integrity_sid)))
|
&mandatory_integrity_sid)))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* On systems supporting Mandatory Integrity Control, add the MIC SID. */
|
|
||||||
if (wincap.has_mandatory_integrity_control ())
|
|
||||||
{
|
|
||||||
new_tok_gsids->Groups[new_tok_gsids->GroupCount].Attributes =
|
new_tok_gsids->Groups[new_tok_gsids->GroupCount].Attributes =
|
||||||
SE_GROUP_INTEGRITY | SE_GROUP_INTEGRITY_ENABLED;
|
SE_GROUP_INTEGRITY | SE_GROUP_INTEGRITY_ENABLED;
|
||||||
new_tok_gsids->Groups[new_tok_gsids->GroupCount++].Sid
|
new_tok_gsids->Groups[new_tok_gsids->GroupCount++].Sid
|
||||||
= mandatory_integrity_sid;
|
= mandatory_integrity_sid;
|
||||||
}
|
|
||||||
|
|
||||||
/* Let's be heroic... */
|
/* Let's be heroic... */
|
||||||
status = NtCreateToken (&token, TOKEN_ALL_ACCESS, &oa, TokenImpersonation,
|
status = NtCreateToken (&token, TOKEN_ALL_ACCESS, &oa, TokenImpersonation,
|
||||||
|
@ -21,7 +21,6 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||||||
def_guard_pages:1,
|
def_guard_pages:1,
|
||||||
max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
|
max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
|
||||||
is_server:false,
|
is_server:false,
|
||||||
has_mandatory_integrity_control:false,
|
|
||||||
needs_count_in_si_lpres2:false,
|
needs_count_in_si_lpres2:false,
|
||||||
has_gaa_largeaddress_bug:false,
|
has_gaa_largeaddress_bug:false,
|
||||||
has_transactions:false,
|
has_transactions:false,
|
||||||
@ -52,7 +51,6 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||||||
def_guard_pages:1,
|
def_guard_pages:1,
|
||||||
max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
|
max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
|
||||||
is_server:false,
|
is_server:false,
|
||||||
has_mandatory_integrity_control:false,
|
|
||||||
needs_count_in_si_lpres2:false,
|
needs_count_in_si_lpres2:false,
|
||||||
has_gaa_largeaddress_bug:false,
|
has_gaa_largeaddress_bug:false,
|
||||||
has_transactions:false,
|
has_transactions:false,
|
||||||
@ -83,7 +81,6 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||||||
def_guard_pages:1,
|
def_guard_pages:1,
|
||||||
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
||||||
is_server:false,
|
is_server:false,
|
||||||
has_mandatory_integrity_control:true,
|
|
||||||
needs_count_in_si_lpres2:true,
|
needs_count_in_si_lpres2:true,
|
||||||
has_gaa_largeaddress_bug:true,
|
has_gaa_largeaddress_bug:true,
|
||||||
has_transactions:true,
|
has_transactions:true,
|
||||||
@ -114,7 +111,6 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||||||
def_guard_pages:1,
|
def_guard_pages:1,
|
||||||
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
||||||
is_server:false,
|
is_server:false,
|
||||||
has_mandatory_integrity_control:true,
|
|
||||||
needs_count_in_si_lpres2:false,
|
needs_count_in_si_lpres2:false,
|
||||||
has_gaa_largeaddress_bug:true,
|
has_gaa_largeaddress_bug:true,
|
||||||
has_transactions:true,
|
has_transactions:true,
|
||||||
@ -145,7 +141,6 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||||||
def_guard_pages:2,
|
def_guard_pages:2,
|
||||||
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
||||||
is_server:false,
|
is_server:false,
|
||||||
has_mandatory_integrity_control:true,
|
|
||||||
needs_count_in_si_lpres2:false,
|
needs_count_in_si_lpres2:false,
|
||||||
has_gaa_largeaddress_bug:false,
|
has_gaa_largeaddress_bug:false,
|
||||||
has_transactions:true,
|
has_transactions:true,
|
||||||
@ -176,7 +171,6 @@ wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
|||||||
def_guard_pages:2,
|
def_guard_pages:2,
|
||||||
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
||||||
is_server:false,
|
is_server:false,
|
||||||
has_mandatory_integrity_control:true,
|
|
||||||
needs_count_in_si_lpres2:false,
|
needs_count_in_si_lpres2:false,
|
||||||
has_gaa_largeaddress_bug:false,
|
has_gaa_largeaddress_bug:false,
|
||||||
has_transactions:true,
|
has_transactions:true,
|
||||||
@ -207,7 +201,6 @@ wincaps wincap_10_1511 __attribute__((section (".cygwin_dll_common"), shared)) =
|
|||||||
def_guard_pages:2,
|
def_guard_pages:2,
|
||||||
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
|
||||||
is_server:false,
|
is_server:false,
|
||||||
has_mandatory_integrity_control:true,
|
|
||||||
needs_count_in_si_lpres2:false,
|
needs_count_in_si_lpres2:false,
|
||||||
has_gaa_largeaddress_bug:false,
|
has_gaa_largeaddress_bug:false,
|
||||||
has_transactions:true,
|
has_transactions:true,
|
||||||
|
@ -14,7 +14,6 @@ struct wincaps
|
|||||||
DWORD def_guard_pages;
|
DWORD def_guard_pages;
|
||||||
DWORD max_sys_priv;
|
DWORD max_sys_priv;
|
||||||
unsigned is_server : 1;
|
unsigned is_server : 1;
|
||||||
unsigned has_mandatory_integrity_control : 1;
|
|
||||||
unsigned needs_count_in_si_lpres2 : 1;
|
unsigned needs_count_in_si_lpres2 : 1;
|
||||||
unsigned has_gaa_largeaddress_bug : 1;
|
unsigned has_gaa_largeaddress_bug : 1;
|
||||||
unsigned has_transactions : 1;
|
unsigned has_transactions : 1;
|
||||||
@ -70,7 +69,6 @@ public:
|
|||||||
}
|
}
|
||||||
DWORD IMPLEMENT (max_sys_priv)
|
DWORD IMPLEMENT (max_sys_priv)
|
||||||
bool IMPLEMENT (is_server)
|
bool IMPLEMENT (is_server)
|
||||||
bool IMPLEMENT (has_mandatory_integrity_control)
|
|
||||||
bool IMPLEMENT (needs_count_in_si_lpres2)
|
bool IMPLEMENT (needs_count_in_si_lpres2)
|
||||||
bool IMPLEMENT (has_gaa_largeaddress_bug)
|
bool IMPLEMENT (has_gaa_largeaddress_bug)
|
||||||
bool IMPLEMENT (has_transactions)
|
bool IMPLEMENT (has_transactions)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user