Open imgrant opened 2 months ago
Thank you for opening this issue!
🔔 @rasmusbe @tombonez you might want to have a look.
This issue has been automatically marked as stale because it did not have any recent activity.
It will be closed if no further activity occurs in the next 10 days to keep our backlog clean 😊
@raycastbot keep
Extension
https://www.raycast.com/rasmusbe/flush-dns
Raycast Version
1.77.1
macOS Version
14.5
Description
Description
When activating the 'Flush DNS' command with this extension, a dialog for 'osascript' is presented ("osascript wants to make changes. Enter your password to allow this." (screenshot below). There is no option to use Touch ID, even if the Touch ID PAM module (
pam_tid.so
) is configured in/etc/pam.d/sudo
.This greatly reduces the convenience of the extension, in my opinion. For instance, I previously achieved the same result by opening a terminal and manually pasting the command to flush the cache and restart mDNSResponder (or having it in history or whatever), leveraging my configuration that enables Touch ID for
sudo
commands. I had hoped this extension would make this even easier by it being able to launch it from Raycast.Cause
The command the extension is attempting to run leverages
osascript
with thewith administrator privileges
instruction: https://github.com/raycast/extensions/blob/96f33396c6ceae40f078ff897e148ab04b4a3ae0/extensions/flush-dns/src/index.ts#L48Based on similar reports relating to
osascript
I came across while Googling, I think this might be a change/regression in macOS Sonoma, specifically (but I have not used Raycast and this extension in older versions of macOS so cannot be sure), ie in that previously, passing thewith administrator privileges
instruction toosascript
would present a Touch ID-enabled dialog.Solution
A solution might be to drop the
with administrator privileges
component, since the shell commands also includesudo
; in that situation, if PAM is configured to use Touch ID forsudo
, then a Touch ID-enabled dialog is presented (example screenshot below)Screenshot of password dialog for
osascript
Example screenshot of Touch ID dialog
With
pam_tid.so
enabled in my PAM config forsudo
, running the following shell command (ie omitting thewith administrator privileges
part forosascript
) produces a Touch ID-enabled dialog (forsudo
instead ofosascript
) as follows:Steps To Reproduce
pam_tid.so
enabled forsudo
...osascript
) is presented, with no option to use Touch IDCurrent Behaviour
Touch ID is not usable for the Flush DNS extension
Expected Behaviour
Using Touch ID to authorise the commands to flush the DNS cache would be much more convenient