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

Should auth_value be 2 when enabling? #61

Closed
rafpaf opened this issue Aug 28, 2022 · 3 comments · Fixed by #67
Closed

Should auth_value be 2 when enabling? #61

rafpaf opened this issue Aug 28, 2022 · 3 comments · Fixed by #67

Comments

@rafpaf
Copy link

rafpaf commented Aug 28, 2022

I had trouble getting tccutil to work on macOS 12.4, but once I had enabled access to the TCC database via csrutil disable, this worked like a charm:

sudo sqlite3 "/Library/Application Support/com.apple.TCC/TCC.db" "update access set auth_value = 2 where client = 'com.knollsoft.Rectangle'"

I noticed that your script currently sets auth_value to 1 and I wonder if it should use the value 2 with this version of macOS.

@jacobsalmela
Copy link
Owner

Interesting. Thanks for the finding. Perhaps a conditional for that value would work well. I don't recall explicitly setting it to 1 for a specific reason but it may need to be there for older versions of macOS.

Feel free to make a PR otherwise I'll assign this to myself

@C-Duv
Copy link
Contributor

C-Duv commented Feb 26, 2024

I also noticed this on macOS 13.5 (Ventura).

According to this "macOS TCC" article on HackTricks, value 1 is for unknown and value 2 for allowed:

The auth_value can have different values: denied(0), unknown(1), allowed(2), or limited(3).

As I am using Homebrew to install tccutil, I am currently using the following sed command as a quick fix:

sed -i "" "s/{enable_mode_name}='1'/{enable_mode_name}='2'/" "$(realpath "/opt/homebrew/bin/tccutil")"

I'll file a PR…

C-Duv added a commit to C-Duv/tccutil that referenced this issue Feb 26, 2024
The script was setting auth_value to value `1` when enabling an application/client in the tccutil database.

According to jacobsalmela#61, on macOS 12.4 and macOS 13.5 the correct value for enabling is `2`.

This commit adds a conditional value depending on OS version to use `auth_value=2` on macOS 12.0 and higher.

Issue: jacobsalmela#61
@C-Duv
Copy link
Contributor

C-Duv commented Feb 26, 2024

Done ✔️: #67.

jacobsalmela pushed a commit that referenced this issue Feb 26, 2024
The script was setting auth_value to value `1` when enabling an application/client in the tccutil database.

According to #61, on macOS 12.4 and macOS 13.5 the correct value for enabling is `2`.

This commit adds a conditional value depending on OS version to use `auth_value=2` on macOS 12.0 and higher.

Issue: #61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants