| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide a user resource that is compatible with default TCC restrictions
that were introduced in macOS 10.14.
Changes:
* This resource and the corresponding provider have been modified to
work with default macOS TCC policies. Direct access to user binary
plists are no longer permitted by default, thus we've chosen to use
use newer methods of creating, modifying and removing users.
* Due to the tooling required by the provider this provider is only
suitable for use on macOS >= 10.14. Support for older platforms has
been removed.
New Features:
* Primary group management is now included.
* 'admin' is now a boolean property that configures a user to an admin.
* 'admin_username' and 'admin_password' are new properties that define the
admin user credentials required for toggling SecureToken for an
exiting user.
The 'admin_username' must correspond to a system admin with SecureToken
enabled in order to toggle SecureToken.
* 'secure_token' is a boolean property that sets the desired state
for SecureToken. SecureToken token is required for FileVault full
disk encryption.
Signed-off-by: Ryan Cragun <ryan@chef.io>
|
|
|
|
|
|
| |
since we use double quotes, be consistent everywhere.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
given how many regexps we have with /'s in the match this seems like
a very good one.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
i like this one, gives visual priority to returns or raises that are
buried in the middle of things.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this is using:
Layout/AlignArguments:
Enabled: true
EnforcedStyle: with_fixed_indentation
the default style can use really excessive whitespace. on starting
lines which are already long, it fully indents across to where the
arguments start and then begins the line there.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
| |
Stops the kernel from scanning through all the activated gems every time in order
to resolve names into pathnames.
See rubygems/rubygems#2762
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
This gives a speed boost since rubygems does not have to scan through
every gem in the gemset in order to find the file.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
This worked until I moved the interations property into the dscl_user resource directly.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
We can greatly simplify our dscl user provider by removing support for macOS 10.7 and 10.7 which has been upgraded to 10.8. No one is using this anyone as it's beyond EOL with Apple and has been for years.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Cleanup AIX and Solaris user resources.
|
| |
| |
| |
| | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| | |
Signed-off-by: Nick McSpadden <nmcspadden@gmail.com>
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Signed-off-by: Thom May <thom@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Sean Karlage <skarlage@fb.com>
|
| |
| |
| |
| | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
* removes more run_command
* converts to shell_out_compact
* some other misc style cleanup
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | |
|
|/ |
|
|
|
|
|
| |
Removes all remaining references to the deprecated escape_glob
helper routine.
|
|
|
|
| |
no enforced trailing comma on arguments...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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?
|
|
|
|
|
|
|
|
|
| |
Style/NegatedWhile
Style/ParenthesesAroundCondition
Style/WhileUntilDo
Style/WordArray
Performance/ReverseEach
Style/ColonMethodCall
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
|
|
|
| |
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"
|
|
|
|
|
|
|
| |
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 -a fixed 1044 occurrances
|
| |
|
|
|
|
|
| |
also converts ivar to accessors
note with comments other new_resource mutating to clean up
|
|
|
|
|
| |
"comment" attribute should be defined to create user account properly on OS X.
Otherwise, the RealName will be empty.
|
|
|
|
|
| |
gid should always be defined to create user account properly on OS X.
"staff" (gid 20) is a default group for regular user accounts.
|
|
|
|
|
|
| |
ascii
This causes plist gem to crash
|
|
|
|
|
|
|
|
| |
- 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
|
|\
| |
| | |
bugfix dscl provider
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
|/
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
using PathHelper.
|
| |
|