Skip to content
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

Handle new syntex for includedir statement #10

Closed

Conversation

fapdash
Copy link

@fapdash fapdash commented Apr 19, 2023

On newer sudo versions the default inclusion statement is @includedir instead of #includedir. After running the role the directory gets included a second time:

@includedir /etc/sudoers.d

For compatibility reasons I didn't change the line value so on newer installations the @includedir will be replaced by the old syntax.

Reference:

It is possible to include other sudoers files from within the -->

https://www.sudo.ws/docs/man/sudoers.man/#Including_other_files_from_within_sudoers

fixes #9

On newer sudo versions the default inclusion statement is
`@includedir` instead of `#includedir`. After running the role the
directory gets included a second time:

```
@includedir /etc/sudoers.d
```

For compatibility reasons I didn't change the `line` value so on newer
installations the `@includedir` will be replaced by the old syntax.

Reference:

> It is possible to include other sudoers files from within the -->

https://www.sudo.ws/docs/man/sudoers.man/#Including_other_files_from_within_sudoers

fixes andrewrothstein#9
@fapdash
Copy link
Author

fapdash commented Apr 19, 2023

@andrewrothstein We could also split this into two tasks, the first checking for the new syntax and checking for the old syntax in a second task, only if the newer syntax wasn't found.

wdyt?

@andrewrothstein
Copy link
Owner

let's do two tasks instead. keep the new fresh and support the old.

@fapdash
Copy link
Author

fapdash commented Apr 28, 2023

Will have capacity to work on this in 2-3 weeks.

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.

Role leads to doubled inclusion of the sudoers_dropin_dir
2 participants