Skip to content

Conversation

@braird
Copy link
Contributor

@braird braird commented Dec 12, 2025

This pull request fixes issue #1329.

When editing a file in /etc/sudoers.d/, visudo was checking if that specific file allowed the user to run visudo. This often led to unnecessary lockouts.

The fix implements the suggestion by @squell to skip the lockout check when the file being edited is not /etc/sudoers.

Copy link
Collaborator

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! There could still be false positives if the rule that allows visudo is in /etc/sudoers.d/, but this should prevent most false positives. And avoiding all false positives would be a lot more complicated and I don't think it would be worth it.

@bjorn3 bjorn3 enabled auto-merge December 15, 2025 10:10
@bjorn3 bjorn3 merged commit 500c8e3 into trifectatechfoundation:main Dec 15, 2025
17 checks passed
@squell squell added this to the External Contribs milestone Dec 15, 2025
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 this pull request may close these issues.

visudo /etc/sudoers.d/some-include false positive about sudo visudo lockout

3 participants