From 91f7cd0a5f649f1f5ffc5ffc199b7e13daf239b8 Mon Sep 17 00:00:00 2001 From: ITzTravelIntime <23339020+ITzTravelInTime@users.noreply.github.com> Date: Mon, 19 Jul 2021 12:22:54 +0200 Subject: [PATCH] Version 3.7.3 - Improved SIP Enabled status detection, now it doesn't no longer take in consideration the CSR_ALLOW_APPLE_INTERNAL flag. --- Sources/TINURecovery/SIP.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/TINURecovery/SIP.swift b/Sources/TINURecovery/SIP.swift index 6d10b15..5eae418 100644 --- a/Sources/TINURecovery/SIP.swift +++ b/Sources/TINURecovery/SIP.swift @@ -182,8 +182,9 @@ public extension SIP.SIPStatus{ ///Indicates if SIP is fully enabled, fully disabled or uses an undeterminated configuration var resultsEnabled: Bool!{ - switch (self & SIP.SIPBits.CSR_DISABLE_FLAGS) { - case SIP.SIPBits.CSR_DISABLE_FLAGS: + let ref = (SIP.SIPBits.CSR_DISABLE_FLAGS & (~SIP.SIPBits.CSR_ALLOW_APPLE_INTERNAL.rawValue) ) + switch (self & ref) { + case ref: return false case 0: return true