summaryrefslogtreecommitdiff
path: root/lib/chef/provider/group
Commit message (Collapse)AuthorAgeFilesLines
* fix unnecessary quoting of argslcg/deprecate-run-commandLamont Granquist2016-12-201-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix groupadd specs and modernizeLamont Granquist2016-12-201-28/+25
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove run_command from groupaddLamont Granquist2016-12-201-3/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Use `all?` instead of `any?` to check for SUSE usersTom Duffield2016-10-211-1/+1
| | | | | | Using `all?` will return `false` when the array is empty. Signed-off-by: Tom Duffield <tom@chef.io>
* Raise error if suse group manager adds non-existent userCOOL-597/address-suse-test-failuresTom Duffield2016-10-201-4/+23
| | | | | | | | | | The expected behavior of chef, as defined by our tests, is that if a user specified in a group resource does not exist than chef should raise an error. On suse, we use groupmod which will not raise an error if you attempt to add a non-existent user to a group. This change adds in a simple check that will raise an error if the specified does not exist. Signed-off-by: Tom Duffield <tom@chef.io>
* Solaris doesn't support -r for users or group.Noah Kantrowitz2016-09-191-1/+2
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Fix specify members of group on suse/openbsd/solaris2/hpuxTim Smith2016-07-301-1/+1
| | | | | | | | Action is an array. We need to check to see if create is in the action array instead of checking to see if it's ";create" which it never will be. Signed-off-by: Tim Smith <tsmith@chef.io>
* Update specssalam/group-fixSalim Alam2016-04-071-1/+1
|
* Don't fail when removing non-existing group memberSalim Alam2016-04-071-6/+19
|
* remove unnecessary whitespaceMarkus Winter2016-03-151-2/+2
|
* fix for https://github.com/chef/chef/issues/4689Markus Winter2016-03-121-4/+6
| | | | rework the set_members method so duplicates are avoided
* deal with 0.37.2 renamed copsLamont Granquist2016-02-181-1/+1
| | | | | | | | | | | | | | | 252 Style/TrailingCommaInLiteral 84 Style/TrailingCommaInArguments 15 Style/SpaceAroundKeyword -- 351 Total We already dealt with SpaceAroundKeyword under its old name SpaceBeforeModifierKeyword, it looks like it got stricter about spaces after keywords. TrailingComma also got split, and it looks like the TrailingCommaInArguments behavior is new?
* autofixing auto-inserted delimiterslcg/chefstyle-batchLamont Granquist2016-02-091-1/+1
|
* auto fixing some rubocopsLamont Granquist2016-02-091-1/+1
| | | | | | | | | Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
* autofixing whitespace copsLamont Granquist2016-02-055-9/+9
| | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-024-4/+4
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-027-7/+7
| | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-029-9/+9
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-181-1/+1
| | | | | | See chef/chefstyle#11 for analysis and discussion. We select '{}' since audit of our source code shows that is the most common, and that used to be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book.
* Use double quotes by defaultThom May2016-01-149-19/+19
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* chefstyle: fix Lint/StringConversionInInterpolationLamont Granquist2016-01-123-9/+9
| | | | useless use of `"#{foo.to_s}"`
* Don't modify members of new_resource in pw group implmentationjdm/freebsd-pw-fixJay Mundrawala2015-08-171-1/+1
| | | | | | | | | | | | | | | | This was causing the ``` Chef::Resource::Group group modify action when there is a group behaves like correct group management when the users exist when append is not set when group already contains some users should remove all existing users and only add the new users to the group ``` spec to fail. The test passes an array which gets modified which breaks the test.
* Create tests for all previous provider_mappingsjk/one_map_to_rule_them_allJohn Keiser2015-06-022-1/+2
|
* Fix up comments and default priority (when nothing matches)John Keiser2015-06-028-11/+9
|
* Add platform_version to supported filtersJohn Keiser2015-06-022-10/+2
|
* Move provider_mapping values out into the actual resource classesJohn Keiser2015-06-025-0/+15
|
* provider_resolver migration from provider_mappingLamont Granquist2015-03-044-0/+8
| | | | | | | | - move macosx providers to dynamic resolution - move windows providers to dynamic resolution - move openbsd/netbsd providers to dynamic resolution - move all cron providers to dynamic resolution - move mdadm to static mapping
* fix aix related providers to replace popen4 with mixlib shell_outkaustubh-d2015-02-171-4/+3
|
* Updates based on the PR comments.Serdar Sutay2014-10-281-7/+3
|
* Fix freebsd group provider regression introduced by ↵Serdar Sutay2014-10-281-9/+9
| | | | b06510323102fcb35fb7b02891591b3a540ddf27 when there is no members while creating the group.
* use group_name when checking if the group exists on mac osx with dsclThiago Oliveira2014-10-171-2/+2
|
* Fix creation of non-empty FreeBSD groupsJacob Vosmaer2014-08-181-1/+8
| | | | | | | | | | | | | | | | | | | When Chef creates a new FreeBSD group, the `pw groupadd` system command is invoked. If the group is to have members at the time it is created, prior to this change Chef would try to specify the new members with the `-m` option. Unfortunately, `pw groupadd` has no `-m` option: one is supposed to use `-M` instead. See the following excerpt from the `pw` man page: pw [-V etcdir] groupadd [group|gid] [-C config] [-q] [-n group] [-g gid] [-M members] [-o] [-h fd | -H fd] [-N] [-P] [-Y] pw [-V etcdir] groupdel [group|gid] [-n name] [-g gid] [-Y] pw [-V etcdir] groupmod [group|gid] [-C config] [-q] [-n name] [-g gid] [-l name] [-M members] [-m newmembers] [-d oldmembers] [-h fd | -H fd] [-N] [-P] [-Y] http://www.freebsd.org/cgi/man.cgi?query=pw&apropos=0&sektion=0&manpath=FreeBSD+9.3-RELEASE&arch=default&format=html This commit lets Chef use `pw groupadd -M`.
* Fix OSX Group provider to be properly idempotentPhil Dibowitz2014-08-041-9/+27
| | | | | | | Currently the OSX Group provider use the 'Etc' module to determine what exists, and the 'dscl' command to change things. Etc will look to /etc/group by default and fallback to 'dscl', which causes idempotency incorrectness. This change the Group provider to simply look at 'dscl' always.
* aix: fix aix group provider to add/remove group members.kaustubh-d2014-07-311-2/+17
|
* fixing all the extra blank linesLamont Granquist2014-07-294-5/+0
| | | | yes, i just used rubocop on the chef sourcecode...
* add shell_out to base provider codeLamont Granquist2014-07-294-8/+0
|
* omnios uses solaris2-like usermod for groupsRicardo Signes2014-06-021-1/+1
|
* Make conditional more concise with ternary operator per CR feedback.Adam Edwards2014-01-131-7/+1
|
* Rename method to reflect predicate usage from code review feedbackAdam Edwards2014-01-131-3/+3
|
* SID awareness in group base class to fix regression where resource always ↵Adam Edwards2014-01-131-3/+7
| | | | updates
* Also use sid in excluded_members check, fixes group_spec regressionAdam Edwards2014-01-131-4/+14
|
* CHEF-3012: Use SID instead of username for group membership checksadamedx2014-01-131-1/+3
|
* Fix specs on Solaris.sersut2013-11-191-4/+12
|
* Fix specs on FreeBSD.sersut2013-11-191-15/+26
|
* exluded_members support in pw group provider.sersut2013-11-141-9/+41
|
* excluded_members support for groupmod provider.sersut2013-11-141-36/+46
|
* Fix unit tests on group providers.sersut2013-11-142-3/+7
| | | Note that one unit test case is removed for windows. The reason is that now we are guarding against adding existing members therefore we don't need to have the need to call set_members if add_members fails.
* Support for excluded_members property in Suse, Groupadd Gpasswd providers. ↵sersut2013-11-144-59/+94
| | | | Required unsupported error messages in Usermod provider.
* Support :excluded_members in windows group provider.sersut2013-11-121-6/+13
|
* Support :excluded members in gpasswd provider.sersut2013-11-111-15/+29
|