mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #9215 from uvsmtid/develop
Use uppercase for `OS` environment variable
This commit is contained in:
commit
627f358b57
@ -146,8 +146,8 @@ def verify_files(files, user):
|
||||
'''
|
||||
Verify that the named files exist and are owned by the named user
|
||||
'''
|
||||
if 'os' in os.environ:
|
||||
if os.environ['os'].startswith('Windows'):
|
||||
if 'OS' in os.environ:
|
||||
if os.environ['OS'].startswith('Windows'):
|
||||
return True
|
||||
import pwd # after confirming not running Windows
|
||||
try:
|
||||
@ -186,8 +186,8 @@ def verify_env(dirs, user, permissive=False, pki_dir=''):
|
||||
Verify that the named directories are in place and that the environment
|
||||
can shake the salt
|
||||
'''
|
||||
if 'os' in os.environ:
|
||||
if os.environ['os'].startswith('Windows'):
|
||||
if 'OS' in os.environ:
|
||||
if os.environ['OS'].startswith('Windows'):
|
||||
return True
|
||||
import pwd # after confirming not running Windows
|
||||
import grp
|
||||
@ -285,8 +285,8 @@ def check_user(user):
|
||||
'''
|
||||
Check user and assign process uid/gid.
|
||||
'''
|
||||
if 'os' in os.environ:
|
||||
if os.environ['os'].startswith('Windows'):
|
||||
if 'OS' in os.environ:
|
||||
if os.environ['OS'].startswith('Windows'):
|
||||
return True
|
||||
if user == getpass.getuser():
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user