Skip to content

2.0.0

Compare
Choose a tag to compare
@FirefighterBlu3 FirefighterBlu3 released this 14 Mar 01:23
e91137a

Release 2.0.0

The surface functionality hasn't changed much but a few bugs have been fixed. Under the hood, a lot has changed. Functionality has now been moved into a class that helped with value tracking. I planned on removing Python 2 support but was convinced to leave it in for now as apparently there are still a lot of python2 users. 😕 🤷‍♂️

Most testing has moved to occur underneath tox, this is superior as it provides for testing in a clean environment and an installed environment.

Merges

Bugs fixed

  • Documentation in the README.md is updated, the new method of authentication is pam.authenticate(...) vs. pam.pam(...) (but it's still supported). Thank you @gkmcd. Some by-hand pam_unix.so and unix_chkpwd examples provided for testing
  • @leewi9 pointed out that TTY handling was less than optimal in some situations in #18
  • #12 resolved by @okin and #8 was also solved by this patch

Features & Changes

  • Unit testing and code coverage is 100% for all automated methods. Some methods require a valid TEST_USERNAME and TEST_PASSWORD to function and those are marked SKIP if not found in the environment. Sorry :-} -- mocking the internals of libc and libpam are far too hairy for the trivial bit of testing that can be verified by hand

    Testing summary
    Name Stmts Miss Excluded Branch BrPart Cover
    pam/__init__.py 59 0 2 2 0 100%
    pam/__internals.py 281 0 14 76 0 100%
    TOTAL 340 0 16 78 0 100%
  • bandit added for security checks
  • flake8 added for linting
  • mypy for type hinting
  • coverage added (generated reports go in htmlcov/
  • Multi-factor authentication is supported now from #25 @abompard
  • All of the constants are now exposed such as pam.PAM_SUCCESS or pam.PAM_PERM_DENIED
  • pam.authenticate(..., print_failure_messages=False) parameter was added to help your debugging