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

santactl status discrepancy when running as root/non-root #1217

Closed
kallsyms opened this issue Nov 2, 2023 · 1 comment · Fixed by #1244
Closed

santactl status discrepancy when running as root/non-root #1217

kallsyms opened this issue Nov 2, 2023 · 1 comment · Fixed by #1244

Comments

@kallsyms
Copy link
Contributor

kallsyms commented Nov 2, 2023

When USB blocking/remounting is configured via sync server, there can be a discrepancy between what santactl status reports when run as root vs. non-root.

The santactl status command reads SNTConfigurator.blockUSBMount which first reads from syncState then falls back to configState if it was not configured via sync. The SNTConfigurator singleton init loads syncState by calling readSyncStateFromDisk, but this bails immediately if running with euid != 0.

Found this while working on #1214.

@russellhancox
Copy link
Contributor

santactl should retrieve this from santad through an XPC method in SNTDaemonControlXPC service.

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

Successfully merging a pull request may close this issue.

2 participants