Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions modules/macos_safaridriver/files/add_tcc_perms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ os_version=$(sw_vers -productVersion)
# the legacy fleet has always relied on. On SIP-on hosts the equivalent
# grants come from the org.mozilla.ci-tcc-pppc MDM profile deployed via
# SimpleMDM; the sqlite3 writes would silently fail or abort there.
SIP_DISABLED=false
if csrutil status 2>/dev/null | grep -qi "disabled"; then
SIP_DISABLED=true
#
# Default to SIP-off (legacy behavior). Only treat the host as SIP-on when
# csrutil status clearly says "enabled". Some hosts return output like
# "unknown (Custom Configuration)" when SIP is in a partial/custom state;
# a naive `grep "disabled"` misses those and silently skips the system-DB
# writes that the legacy fleet relies on. Fail-safe to preserving legacy
# behavior for anything ambiguous.
SIP_DISABLED=true
if csrutil status 2>/dev/null | grep -qiE "status:[[:space:]]*enabled\.?$"; then
SIP_DISABLED=false
fi

# Function to run SQLite queries
Expand Down
13 changes: 10 additions & 3 deletions modules/macos_tcc_perms/files/tcc_perms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,16 @@ csreq_for_binary() {
# SIP-compatible fleet) those writes silently fail; the equivalent
# system-level grants come from the org.mozilla.ci-tcc-pppc MDM profile
# deployed via SimpleMDM instead.
SIP_DISABLED=false
if csrutil status 2>/dev/null | grep -qi "disabled"; then
SIP_DISABLED=true
#
# Default to SIP-off (legacy behavior). Only treat the host as SIP-on when
# csrutil status clearly says "enabled". Some hosts return output like
# "unknown (Custom Configuration)" when SIP is in a partial/custom state;
# a naive `grep "disabled"` misses those and silently skips the system-DB
# writes that the legacy fleet relies on. Fail-safe to preserving legacy
# behavior for anything ambiguous.
SIP_DISABLED=true
if csrutil status 2>/dev/null | grep -qiE "status:[[:space:]]*enabled\.?$"; then
SIP_DISABLED=false
fi

# Get the macOS version
Expand Down