Allow setting validate_cmd command as a parameter#39
Closed
petems wants to merge 1 commit intoarnoudj:masterfrom
petems:allow_setting_validate_command
Closed
Allow setting validate_cmd command as a parameter#39petems wants to merge 1 commit intoarnoudj:masterfrom petems:allow_setting_validate_command
petems wants to merge 1 commit intoarnoudj:masterfrom
petems:allow_setting_validate_command
Conversation
Contributor
petems
commented
Apr 20, 2016
- I've found putting a cat before the visudo allows better debugging. But it's easier to just allow a user to pick what they want, so lets do that as a parameter! 😄
* Allows better debugging: ``` validate_command = '/bin/cat % && /usr/sbin/visudo -c -f %` ``` ``` Error: Execution of '/bin/cat /etc/sudoers.d/FAIL20160420-3555-17pxezk && /usr/sbin/visudo -c -f /etc/sudoers.d/FAIL20160420-3555-17pxezk' returned 1: # Managed by Puppet! Do not edit locally. # # This should fail Host_Alias FAIL_HOSTS = ALL Runas_Alias FAIL_RUNAS = root Cmnd_Alias FAIL_CMNDS = ALL % FAIL_HOSTS = (FAIL_RUNAS) NOPASSWD: FAIL_CMNDS visudo: >>> /etc/sudoers.d/FAIL20160420-3555-17pxezk: syntax error near line 12 <<< parse error in /etc/sudoers.d/FAIL20160420-3555-17pxezk near line 12 Error: /Stage[main]/Main/Sudo::Sudoers[FAIL]/File[/etc/sudoers.d/FAIL]/ensure: change from absent to file failed: Execution of '/bin/cat /etc/sudoers.d/FAIL20160420-3555-17pxezk && /usr/sbin/visudo -c -f /etc/sudoers.d/FAIL20160420-3555-17pxezk' returned 1: # Managed by Puppet! Do not edit locally. ```
Contributor
Author
|
I've moved this parameter definition work into the FreeBSD PR: #45 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.