-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Service does not work after upgrade #8
Comments
To be clear, running What I'm not sure about is whether you're still experiencing the issue. If manually running |
This is the only service I use through I updated recently to 12.2.1 and saw that
I again ran the command manually:
... And this has restored the expected behavior. |
I see that |
Actually it seems like like the relevant plist would be generated in the formula, which is:
That path is valid and points version |
@stackptr how is it going? I'm just interested whether the issue is resolved by Homebrew or we need to change something in the formula. |
@artginzburg, was this ever resolved? I am getting the same issue. |
@jrmann100 not sure I get what's the issue. Is it that the launch daemon does not run the command right when it is started, but only at system load? |
It seems like my launch daemon was disabled after a macOS upgrade. It seems to have been re-bootstrapped after I manually ran the script as suggested above. |
Hard to isolate the situation though, will open a new issue if it happens again and let this one rest. |
Just now realised I have the same issue. Maybe launch daemons are automatically stopped on system upgrade now. Or maybe it's Homebrew's logic. Need to check. UPD: I think "stopped" as a status does not mean that the service is not active, but rather means that the specified command was executed and is not running right now. Which is expected since the command is not active, it just runs and quits. But I can confirm that |
Mine isn't working after an upgrade either. I've done multiple OS upgrades thru some of the Ventura betas and each time |
I upgraded to |
Tried the following property list on macOS Ventura. It was successful in executing <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.artginzburg.sudoTouchIDDaemon</string>
<key>MachServices</key>
<dict>
<key>org.artginzburg.sudoTouchIDDaemon</key>
<true/>
</dict>
<key>Program</key>
<string>/opt/homebrew/bin/sudo-touchid</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/sudo-touchid</string>
</array>
</dict>
</plist> If anyone wants to try the same, here are the steps:
The output in the file was: |
I tried outputting errors to a file by specifying The error in the file was quite confusing:
I tried explicitly giving Write permissions to the So, I'm guessing that macOS in the last versions prohibits any attempts to programmatically change the system files, even if the attempting script has root privileges. In other words, it seems to only allow changes directly initiated by the user. Which sounds great for safety reasons, and resembles e.g. Safari's behavior (every API that interacts with the system outside the very content of the page the user is on seems to only work via direct user initiative, like a click event). But well, would be good if there was a way to disable this protection. |
Meanwhile, considering the message above, I propose the following: We could make a new script store the current system version. Then it will run without root privileges on system startup and check the current major version. If it's different from the stored one, it will run This is far from automatic, but sounds like the simplest solution for now. |
One solution to this is to grant Full Disk Access permission in macOS to A better solution than granting Full Disk Access to anything via Bash might be to create a binary instead; I followed the lead of a similar post on Stack Overflow and used this C code: #include <stdlib.h>
int main(void) {
int status = system("/opt/homebrew/opt/sudo-touchid/bin/sudo-touchid");
int ret = WEXITSTATUS(status);
return ret;
} Compiled with |
@imgrant thanks, this is huge! I'll check it out in depth when I can |
I had actually already enabled Full Disk Access previously to |
Hmm. 🤷 Did you try the binary wrapper approach? |
No, not yet. I was just stating that I've had already given |
This worked for me until some point recently, possibly due to an OS upgrade. I upgraded the package to see if that would fix things:
After the above,
sudo
still requires my password. It appears the script has not changed the files in the expected ways:I tried uninstalling via
brew
(requiring manually removing/opt/homebrew/Cellar/sudo-touchid/{0.2,0.3}
) but it's the same result.Manually running
/opt/homebrew/opt/sudo-touchid/bin/sudo-touchid
fixes the issue.The text was updated successfully, but these errors were encountered: