mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Altered code to support salt-ssh on AIX
This commit is contained in:
parent
8fa0e51336
commit
6d98577e37
2 changed files with 10 additions and 1 deletions
|
@ -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.ospath.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…
Add table
Reference in a new issue