@@ -3663,30 +3663,6 @@ static bool process_does_not_exist (nub_process_t pid) {
3663
3663
return true ; // process does not exist
3664
3664
}
3665
3665
3666
- static bool attach_failed_due_to_sip (nub_process_t pid) {
3667
- bool retval = false ;
3668
- #if defined(__APPLE__) && \
3669
- (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000 )
3670
-
3671
- // csr_check(CSR_ALLOW_TASK_FOR_PID) will be nonzero if System Integrity
3672
- // Protection is in effect.
3673
- if (csr_check (CSR_ALLOW_TASK_FOR_PID) == 0 )
3674
- return false ;
3675
-
3676
- if (rootless_allows_task_for_pid (pid) == 0 )
3677
- retval = true ;
3678
-
3679
- int csops_flags = 0 ;
3680
- int csops_ret = ::csops (pid, CS_OPS_STATUS, &csops_flags,
3681
- sizeof (csops_flags));
3682
- if (csops_ret != -1 && (csops_flags & CS_RESTRICT)) {
3683
- retval = true ;
3684
- }
3685
- #endif
3686
-
3687
- return retval;
3688
- }
3689
-
3690
3666
// my_uid and process_uid are only initialized if this function
3691
3667
// returns true -- that there was a uid mismatch -- and those
3692
3668
// id's may want to be used in the error message.
@@ -4065,13 +4041,6 @@ rnb_err_t RNBRemote::HandlePacket_v(const char *p) {
4065
4041
" processes." );
4066
4042
return SendPacket (return_message.c_str ());
4067
4043
}
4068
- if (attach_failed_due_to_sip (pid_attaching_to)) {
4069
- DNBLogError (" Attach failed because of SIP protection." );
4070
- std::string return_message = " E96;" ;
4071
- return_message += cstring_to_asciihex_string (" cannot attach "
4072
- " to process due to System Integrity Protection" );
4073
- return SendPacket (return_message.c_str ());
4074
- }
4075
4044
}
4076
4045
4077
4046
std::string error_explainer = " attach failed" ;
0 commit comments