mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #52396 from dmurphy18/fix_aix_ssh
Altered code to support salt-ssh on AIX
This commit is contained in:
commit
0d096086dd
@ -118,7 +118,8 @@ def need_deployment():
|
||||
if dstat.st_uid != euid:
|
||||
# Attack detected, try again
|
||||
need_deployment()
|
||||
if dstat.st_mode != 16832:
|
||||
# AIX has non-POSIX bit 0o240700, isolate to 0o40700
|
||||
if dstat.st_mode & ~65536 != 16832:
|
||||
# Attack detected
|
||||
need_deployment()
|
||||
# If SUDOing then also give the super user group write permissions
|
||||
|
@ -45,6 +45,14 @@ def _load_libcrypto():
|
||||
# two checks below
|
||||
lib = glob.glob('/opt/local/lib/libcrypto.so*') + glob.glob('/opt/tools/lib/libcrypto.so*')
|
||||
lib = lib[0] if len(lib) > 0 else None
|
||||
if not lib and salt.utils.platform.is_aix():
|
||||
if os.path.isdir('/opt/salt/lib'):
|
||||
# preference for Salt installed fileset
|
||||
lib = glob.glob('/opt/salt/lib/libcrypto.so*')
|
||||
lib = lib[0] if len(lib) > 0 else None
|
||||
else:
|
||||
lib = glob.glob('/opt/freeware/lib/libcrypto.so*')
|
||||
lib = lib[0] if len(lib) > 0 else None
|
||||
if lib:
|
||||
return cdll.LoadLibrary(lib)
|
||||
raise OSError('Cannot locate OpenSSL libcrypto')
|
||||
|
Loading…
Reference in New Issue
Block a user