summaryrefslogtreecommitdiff
path: root/lib/chef/provider/user/dscl.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove require mixlib/shellouts where not necessaryrequire_the_right_shelloutTim Smith2018-07-101-1/+1
| | | | | | the dscl user provider uses mixin/shell_out instead and the specs don't seem to use mixlib/shellout or actually need the require. Signed-off-by: Tim Smith <tsmith@chef.io>
* fix Style/UnneededInterpolationLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Unification of shell_out APIsLamont Granquist2018-06-151-6/+6
| | | | | | | converts all usage to just shell_out() from the numerous helper utilities that we've had previously. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #7249 from chef/lcg/cleanup-userLamont Granquist2018-05-211-7/+3
|\ | | | | Cleanup AIX and Solaris user resources.
| * bonus fix to remove unnecessary duping in dscl userLamont Granquist2018-05-101-7/+3
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Fixing shell_out to have correct syntaxNick McSpadden2018-05-151-1/+1
| | | | | | | | Signed-off-by: Nick McSpadden <nmcspadden@gmail.com>
* | Merge branch 'master' into mac_uidNick McSpadden2018-05-141-61/+69
|\ \ | |/
| * mechanical conversion of most debug log statements to traceThom May2018-03-261-2/+2
| | | | | | | | Signed-off-by: Thom May <thom@chef.io>
| * Check for set home property before file existence (fixes #5777)Sean Karlage2018-01-041-1/+1
| | | | | | | | Signed-off-by: Sean Karlage <skarlage@fb.com>
| * Chef-13: Remove supports API from all user providersLamont Granquist2017-02-281-3/+3
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * user provider cleanupLamont Granquist2016-12-221-53/+56
| | | | | | | | | | | | | | | | * removes more run_command * converts to shell_out_compact * some other misc style cleanup Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * Add a default GID for user creation on MacOS (#5393)cgerke2016-11-021-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | * Avoid ArgumentError new_resource.gid.to_s will be empty if a recipe calls the user resource without gid and changes the home property. Will result in an exception and if chef is run by root, the home dir will end up being owned by root from the mv. * Avoid chown issues when using manage_home and not specifying a gid Using a sensible CONSTANT for gid when new_resource.gid.nil? Signed-off-by: Chris Gerke <chris.gerke@gmail.com>
| * fix manage_home provider inconsistencylcg/manage-home-consistencyLamont Granquist2016-10-061-2/+2
| | | | | | | | | | | | | | | | on freebsd and mac we're now telling people to use `manage_home` instead of `supports[:manage_home]` but it doesn't actually work. fixes that so that it works now. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * user provider manage_home behavior and refactorLamont Granquist2016-08-191-0/+1
| | | | | | | | | | | | | | | | | | split out the user provider into 1:1 resources. fix the behavior of the linux user provider to implement manage_home behavior correctly. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Fixing missing final newlineNick McSpadden2016-05-051-1/+1
| |
* | UID now starts at 501, uses createhomedir insteadNick McSpadden2016-05-051-9/+7
|/
* s/escape_glob/escape_glob_dir/lcg/fix-escape-globLamont Granquist2016-03-101-1/+1
| | | | | Removes all remaining references to the deprecated escape_glob helper routine.
* flip multiline function arguments aroundlcg/rubocop-0.37.2Lamont Granquist2016-02-191-2/+2
| | | | no enforced trailing comma on arguments...
* 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?
* auto fixing some rubocopsLamont Granquist2016-02-091-5/+5
| | | | | | | | | Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
* autofixing whitespace copsLamont Granquist2016-02-051-18/+17
| | | | | | | | | | | | | | | | | | | | | | 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
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-021-1/+1
| | | 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-021-1/+1
| | | 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"
* Use double quotes by defaultThom May2016-01-141-13/+13
| | | | | | | 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.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-3/+3
| | | | chefstyle -a fixed 1044 occurrances
* really fix copslcg/really-fix-copsLamont Granquist2016-01-121-8/+8
|
* fix PR#3193 mutating new resourcelcg/3193Lamont Granquist2015-10-241-101/+108
| | | | | also converts ivar to accessors note with comments other new_resource mutating to clean up
* provider/user/dscl: Set "comment" default valueMikhail Zholobov2015-10-241-1/+2
| | | | | "comment" attribute should be defined to create user account properly on OS X. Otherwise, the RealName will be empty.
* provider/user/dscl: Set default gid to 20Mikhail Zholobov2015-10-231-2/+5
| | | | | gid should always be defined to create user account properly on OS X. "staff" (gid 20) is a default group for regular user accounts.
* Sometimes plutil returns an invalid utf-8 string, which gets interpreted as ↵Jay Mundrawala2015-03-091-1/+5
| | | | | | ascii This causes plist gem to crash
* provider_resolver migration from provider_mappingLamont Granquist2015-03-041-0/+2
| | | | | | | | - 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
* Merge pull request #2723 from patcox/CHEF-2667Phil Dibowitz2015-01-141-3/+13
|\ | | | | bugfix dscl provider
| * fix small readability issue, as per code reviewPat Cox2015-01-121-1/+3
| |
| * bugfix dscl providerPat Cox2015-01-121-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | We need to compare with the UID, not a GUID. So we need to map the correct field for comparison. Also fix a bug in determining used uids. This fixes this exception when the specified uid is actually in use by the correct user: Chef::Exceptions::RequestedUIDUnavailable: uid 48 is already in use
* | add code comment, add unit test for case when no salt is foundPat Cox2015-01-121-0/+4
| |
* | OS X user provider - fix exception if no salt is foundPat Cox2015-01-121-0/+1
|/ | | | | | | | Some system users don't have salts. This exception is fixed by this commit: # in `convert_to_binary': NoMethodError: undefined method `size' for nil:NilClass
* typo fixes - https://github.com/vlajos/misspell_fixerVeres Lajos2014-11-081-1/+1
|
* Remove requires path_helper from provider class, add to provider subclasses ↵Claire McQuin2014-09-241-0/+1
| | | | using PathHelper.
* Escape path for globbing.Claire McQuin2014-09-221-2/+2
|
* Updates based on @jaymzh's comments.Serdar Sutay2014-09-041-2/+6
|
* Set the password at the right time using the correct info in order not to ↵Serdar Sutay2014-09-041-28/+28
| | | | overwrite other changes.
* Updates based on PR comments.Serdar Sutay2014-08-121-21/+37
|
* * Dscl user provider changes to support Mac 10.7, 10.8 & 10.9.Serdar Sutay2014-08-121-156/+528
| | | | | | * Make the dscl user provider password handling idempotent. * Refactor / modernize dscl user provider unit tests. * Functional tests for dscl user provider.
* add shell_out to base provider codeLamont Granquist2014-07-291-2/+0
|
* Normalize whitespace on all filesSeth Vargo2013-09-261-28/+28
|
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+288
The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!