Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move pam library load to try/except block #45114

merged 1 commit into from Dec 21, 2017


Copy link

twangboy commented Dec 20, 2017

What does this PR do?

This was throwing an error because there is no pam library in Windows.


[CPU:58.2%|MEM:69.9%]  ... 14:41:42,114 [salt.loader                                :1452][ERROR   ] Failed to import
auth pam, this is due most likely to a syntax error:
Traceback (most recent call last):
  File "c:\salt-dev\salt\salt\", line 1435, in _load_module
    mod = imp.load_module(mod_namespace, fn_, fpath, desc)
  File "c:\salt-dev\salt\salt\auth\", line 51, in <module>
    LIBPAM = CDLL(find_library('pam'))
  File "C:\Python27\lib\ctypes\", line 362, in __init__
    self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be string, not None

What issues does this PR fix or reference?

Found in test suite run

Previous Behavior

Loader throws a stack trace in Windows

New Behavior

No stack trace

Tests written?


Commits signed with GPG?


Because there is no pam library in Windows this was causing a stack
trace to occur
@rallytime rallytime merged commit 7dc3cc4 into saltstack:2016.11 Dec 21, 2017
5 of 7 checks passed
5 of 7 checks passed
default Build finished.
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #14545 — FAILURE
WIP ready for review
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #20450 — SUCCESS
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #12961 — SUCCESS
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #17982 — SUCCESS
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #17548 — SUCCESS
@twangboy twangboy deleted the twangboy:win_fix_pam branch Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.