Merge pull request #26899 from twangboy/fix_26730

file.symlink gets windows account instead of root
This commit is contained in:
David Boucha 2015-09-08 16:14:29 -05:00
commit 20a48f7f2e

View file

@ -835,6 +835,14 @@ def symlink(
user = __opts__['user']
if salt.utils.is_windows():
# Make sure the user exists in Windows
# Salt default is 'root'
if not __salt__['user.info'](user):
# User not found, use the account salt is running under
# If username not found, use System
user = os.getenv('username', 'System')
if group is not None:
log.warning(
'The group argument for {0} has been ignored as this '