feat: enhance macOS 14+ compatibility with sudo_local and add pam_reattach support - #21
feat: enhance macOS 14+ compatibility with sudo_local and add pam_reattach support#21artginzburg merged 4 commits into
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances macOS compatibility by implementing a dual approach for TouchID sudo configuration: using the modern /etc/pam.d/sudo_local file for macOS 14+ and maintaining backward compatibility with the legacy /etc/pam.d/sudo modification for older versions. The changes include automatic migration from legacy configurations, pam_reattach support for GUI session reattachment, and improved error handling.
- Implements macOS version detection to choose appropriate configuration method
- Adds automatic migration from legacy TouchID configurations
- Introduces pam_reattach support via
--with-reattachflag for tmux/screen compatibility
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| sudo-touchid.sh | Complete refactor with modular functions, macOS version detection, and dual installation methods |
| README.md | Updated documentation to reflect new features and installation approaches |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…pport - Enhance macOS 14+ support using /etc/pam.d/sudo_local instead of modifying system-managed sudo file - Add pam_reattach.so support for GUI session reattachment in tmux/screen sessions - Implement automatic detection and migration from legacy configurations on next run provided a compatible macOS version is installed - Add --migrate and --with-reattach options - Update documentation with version-specific behavior and migration details - Bump version to 0.5
|
keen to understand if this fits the appetite for a sonoma+ patch and migration given it includes more niceties than the sonoma/ branch. it's also a lot heavier so i understand if there's simply not the desire to bring it back in. happy to simplify or adapt otherwise if there are bits both unwanted and wanted (: |
|
It's sad that this PR doesn't get any interest. |
i'm honestly tempted to start a fork. i'm not sure this project is maintained anymore ): |
|
I am sorry, this one was a busy month. I'll merge this today. Afterwards, I think maybe the script should fail (stop execution) when running Adding |
|
no worries @artginzburg - i've pushed a commit for the reattach item. happy to do the with-watchid one too if desired? let me know 😄 |
|
I think we should skip pam_watchid for now: We could include Moreover, they have a custom install script, which makes |
Overview
This PR enhances macOS 14+ support and pam_reattach support while maintaining backward compatibility with previous versions.
Changes
/etc/pam.d/sudo_localfor macOS 14+ - Follows the modern recommended modular approach rather than modifying system files.pam_reattachintegration via--with-reattachflag.--migrateflag to perform a manual migration.Caveats
Compatibility
Fixes #15.