Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 12+ uses auth_value=2 to enable an application #67

Merged
Merged
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
3 changes: 2 additions & 1 deletion tccutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ def enable(client):
# right away (without closing the window).
# Set to 1 to enable the client.
enable_mode_name = 'auth_value' if osx_version >= version('10.16') else 'allowed'
enable_value = '2' if osx_version >= version('12.0') else '1'
try:
c.execute(f"UPDATE access SET {enable_mode_name}='1' WHERE client='{client}' AND service IS '{service}'")
c.execute(f"UPDATE access SET {enable_mode_name}='{enable_value}' WHERE client='{client}' AND service IS '{service}'")
except sqlite3.OperationalError:
print("Attempting to write a readonly database. You probably need to disable SIP.", file=sys.stderr)
commit_changes()
Expand Down
Loading