Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion privacyidea_pam.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,14 @@ def pam_sm_authenticate(pamh, flags, argv):
syslog.openlog(facility=syslog.LOG_AUTH)

Auth = Authenticator(pamh, config)

# Empty conversation to test password/keyboard_interactive
message = pamh.Message(pamh.PAM_TEXT_INFO, " ")
response = pamh.conversation(message)
if response.resp == '':
rval = pamh.PAM_AUTHINFO_UNAVAIL
return rval

try:
if pamh.authtok is None or not try_first_pass:
message = pamh.Message(pamh.PAM_PROMPT_ECHO_OFF, "%s " % prompt)
Expand Down Expand Up @@ -486,4 +494,3 @@ def _create_table(c):
c.execute("CREATE TABLE refilltokens (serial text, refilltoken text)")
except sqlite3.OperationalError:
pass