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
merged 1 commit into from Dec 21, 2017
Merged

Conversation

@twangboy
Copy link
Contributor

twangboy commented Dec 20, 2017

What does this PR do?

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

Stacktrace:

[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\loader.py", line 1435, in _load_module
    mod = imp.load_module(mod_namespace, fn_, fpath, desc)
  File "c:\salt-dev\salt\salt\auth\pam.py", line 51, in <module>
    LIBPAM = CDLL(find_library('pam'))
  File "C:\Python27\lib\ctypes\__init__.py", 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?

No

Commits signed with GPG?

Yes

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.
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #14545 — FAILURE
Details
WIP ready for review
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #20450 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #12961 — SUCCESS
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #17982 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #17548 — SUCCESS
Details
@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
Projects
None yet
2 participants
You can’t perform that action at this time.