mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Move pam library load to try/except block
Because there is no pam library in Windows this was causing a stack trace to occur
This commit is contained in:
parent
7e128e8f15
commit
cf5eae1f77
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,6 @@ from ctypes.util import find_library
|
|||
from salt.utils import get_group_list
|
||||
from salt.ext.six.moves import range # pylint: disable=import-error,redefined-builtin
|
||||
|
||||
LIBPAM = CDLL(find_library('pam'))
|
||||
LIBC = CDLL(find_library('c'))
|
||||
|
||||
CALLOC = LIBC.calloc
|
||||
|
@ -116,6 +115,7 @@ class PamConv(Structure):
|
|||
|
||||
|
||||
try:
|
||||
LIBPAM = CDLL(find_library('pam'))
|
||||
PAM_START = LIBPAM.pam_start
|
||||
PAM_START.restype = c_int
|
||||
PAM_START.argtypes = [c_char_p, c_char_p, POINTER(PamConv),
|
||||
|
|
Loading…
Add table
Reference in a new issue