-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
Add filename checking for visudo -f #255
Comments
The problem with this is that visudo has no way of knowing that you are editing a file that will be included via @includedir. |
Would it have been useful if "visudo -c" warned about files it was ignoring? |
It certainly would have been useful to have "visudo -c" report on that! Sort of the sudo equivalent of an "apachectl configtest" or similar. I hear you on the fact that visudo has no way to know whether a file is being included via @includedir. Are there circumstances where one might be editing something not in @includedir? That definitely seems like an edge case. Ultimately this was a once-in-a-career mistake for me, but if I can help save others some time, it'd be really nice. |
I just pushed changes to "visudo -c" that may help with this:
My concern with warning about editing any file with a '.' in it is that given a sudoers with a line like:
I don't think visudo should warn for:
|
Hi folks,
After banging my head against a sudo issue for a couple of hours, I finally traced it back to... my sudoers.d file having a period in it. Any chance that a check could be added to
visudo -f
to warn people if they're editing a file that will be ignored?I may be able to fix this myself, but getting the issue filed so I don't forget about it.
The text was updated successfully, but these errors were encountered: