diff options
Diffstat (limited to 'security/otpw/files/patch-pam__otpw.c')
-rw-r--r-- | security/otpw/files/patch-pam__otpw.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/security/otpw/files/patch-pam__otpw.c b/security/otpw/files/patch-pam__otpw.c new file mode 100644 index 000000000000..407a4741b312 --- /dev/null +++ b/security/otpw/files/patch-pam__otpw.c @@ -0,0 +1,26 @@ +--- pam_otpw.c.orig 2014-08-07 19:21:15 UTC ++++ pam_otpw.c +@@ -25,6 +25,9 @@ + #define PAM_SM_AUTH + #define PAM_SM_SESSION + #include <security/pam_modules.h> ++#ifdef OPENPAM ++#include <security/pam_appl.h> ++#endif + + #include "otpw.h" + +@@ -226,8 +229,13 @@ PAM_EXTERN int pam_sm_authenticate(pam_h + + /* get user name */ + retval = pam_get_user(pamh, &username, "login: "); ++#ifdef OPENPAM ++ if (retval == PAM_CONV_ERR) ++ return PAM_CONV_ERR; ++#else + if (retval == PAM_CONV_AGAIN) + return PAM_INCOMPLETE; ++#endif + else if (retval != PAM_SUCCESS) { + log_message(LOG_NOTICE, pamh, "no username provided"); + return PAM_USER_UNKNOWN; |