|
Bugzilla – Full Text Bug Listing |
| Summary: | Inconsistent visudo output in check mode: permissions are not checked when a file is provided. | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | francois.serman |
| Component: | Visudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | low | ||
| Version: | 1.8.21 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
francois.serman
2017-12-06 03:51:02 MST
This is by design. When the owner and permission check was added to "visudo -c" it explicitly excluded the file specified by the -f option to make it possible to check sudoers file that are not installed. If you want to check an installed sudoers file you should be using "visudo -c" without the -f option. The reason for this is that the sudoers policy is parsed in its entirety so checking an individual include file doesn't tell you whether or not the entire policy parses. The reason for the default file mode being 0440 is to make it possible to have sudoers on an NFS share that remaps uid 0 to an unprivileged uid (which is the default for NFS). Documentation fixed in sudo 1.8.22, out now. |