Merge pull request #50315 from rallytime/merge-2018.3

[2018.3] Merge forward from 2018.3.3 to 2018.3
This commit is contained in:
Nicole Thomas 2018-10-31 10:16:33 -04:00 committed by GitHub
commit 00437aa9c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3204,7 +3204,7 @@ def directory(name,
# NOTE: Should this be enough to stop the whole check altogether?
if recurse_set:
if 'user' in recurse_set:
if user:
if user or isinstance(user, int):
uid = __salt__['file.user_to_uid'](user)
# file.user_to_uid returns '' if user does not exist. Above
# check for user is not fatal, so we need to be sure user
@ -3222,7 +3222,7 @@ def directory(name,
else:
user = None
if 'group' in recurse_set:
if group:
if group or isinstance(group, int):
gid = __salt__['file.group_to_gid'](group)
# As above with user, we need to make sure group exists.
if isinstance(gid, six.string_types):