#1076: User Type: Show warning if an empty group is specified#528
Merged
cprice404 merged 5 commits intopuppetlabs:2.7.xfrom Apr 6, 2012
Merged
#1076: User Type: Show warning if an empty group is specified#528cprice404 merged 5 commits intopuppetlabs:2.7.xfrom
cprice404 merged 5 commits intopuppetlabs:2.7.xfrom
Conversation
If rspec already gives us the described class why not using it.
Add a real provider class we can use in the tests.
Remove all references to the mock resource object
Also remove the modification of the PATH environment variable because we will always have our :simple provider which does rely on any commands in /sbin.
If the user passes an empty group to the user type, puppet will execute
an invalid `usermod` command.
e.g. if groups of user 'foo' is currently 'bar' and we do
user { 'foo':
groups => '',
membership => minimum # this is the default
}
puppet will build a should value of ',bar' (old group + the new group '') and
will pass '-G ,bar' to the usermod command (which will then fail).
To really specifiy 'no group' the group property does allow an empty
array so we should fail if we find an empty string as a group.
Contributor
|
looks good to me |
|
have run specs and acceptance locally, all green. haven't reviewed much further than that yet. |
|
This pull request looks good to me, and I've run it through specs and 2-node acceptance tests against 2.7.x/HEAD. Will merge first thing tomorrow morning... too late in the day to do it right now. |
cprice404
added a commit
that referenced
this pull request
Apr 6, 2012
#1076: User Type: Show warning if an empty group is specified
ahpook
pushed a commit
to ahpook/puppet
that referenced
this pull request
Aug 30, 2012
This reverts commit d2012ae. The chkconfig line can use `-` to indicate the service should not be enabled by default. In this case, `reset` disables all runlevels, which is the opposite of what `enable=>true` should do. The original bug referenced in #15797, puppetlabs#528, was also reverted for (presumably) the same reason: puppetlabs@41e1285
ahpook
pushed a commit
to ahpook/puppet
that referenced
this pull request
Aug 30, 2012
This reverts commit d2012ae. The chkconfig line can use `-` to indicate the service should not be enabled by default. In this case, `reset` disables all runlevels, which is the opposite of what `enable=>true` should do. The original bug referenced in #15797, puppetlabs#528, was also reverted for (presumably) the same reason: puppetlabs@41e1285
melissa
pushed a commit
to melissa/puppet
that referenced
this pull request
Mar 30, 2018
(PCP-631) Use Beaker 3.6.0 for fix to reboot
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.
If one specifies an empty string for the group property of the user type, puppet builds an incorrect usermod command.
Example taken from #1076
The correct way to remove all group membership is to use
groups => []so we should guide the user in that direction.The commit series also tries to clean up the user_spec.