Description
When utilizing the pam_python3.so wrapper on modern rolling-release distributions (e.g., Arch/EndeavourOS with Python 3.12+), Howdy 2.6.1 fails to execute the PAM hook due to a Python 2 syntax artifact. Furthermore, a deprecation warning in the comparison logic leaks into stderr during successful authentication.
Environment
- OS: Arch Linux / EndeavourOS
- Kernel: 7.0.2-cachyos
- Python: 3.14
- Howdy Version: 2.6.1
Errors
1. PAM Wrapper Crash (/lib/security/howdy/pam.py)
Because Python 3 renamed the module to lowercase, instantiating configparser.configparser() throws:
AttributeError: module 'configparser' has no attribute 'configparser'. Did you mean: 'ConfigParser'?
This causes the module to return PAM_IGNORE, breaking the biometric auth chain.
2. Deprecation Warning (/lib/security/howdy/compare.py)
DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
Proposed Fix
In howdy/src/pam.py (Line 13):
Change the class instantiation to maintain standard Python 3 capitalization:
# Old
config = configparser.configparser()
# New
config = configparser.ConfigParser()
In howdy/src/compare.py (Line 57):
Update the datetime call to the modern, timezone-aware standard:
# Old
"Date: " + datetime.datetime.utcnow().strftime("%Y/%m/%d %H:%M:%S UTC"),
# New
"Date: " + datetime.datetime.now(datetime.UTC).strftime("%Y/%m/%d %H:%M:%S UTC"),
Description
When utilizing the
pam_python3.sowrapper on modern rolling-release distributions (e.g., Arch/EndeavourOS with Python 3.12+), Howdy 2.6.1 fails to execute the PAM hook due to a Python 2 syntax artifact. Furthermore, a deprecation warning in the comparison logic leaks intostderrduring successful authentication.Environment
Errors
1. PAM Wrapper Crash (
/lib/security/howdy/pam.py)Because Python 3 renamed the module to lowercase, instantiating
configparser.configparser()throws:AttributeError: module 'configparser' has no attribute 'configparser'. Did you mean: 'ConfigParser'?This causes the module to return
PAM_IGNORE, breaking the biometric auth chain.2. Deprecation Warning (
/lib/security/howdy/compare.py)DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).Proposed Fix
In
howdy/src/pam.py(Line 13):Change the class instantiation to maintain standard Python 3 capitalization:
In
howdy/src/compare.py(Line 57):Update the datetime call to the modern, timezone-aware standard: