summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-04-01 07:16:06 +0000
committerAndrew Tridgell <tridge@samba.org>2002-04-01 07:16:06 +0000
commite5c3648fe721d659c8b90a6987998ada4790592b (patch)
treec94828554de4a12ba20c45692843dd0759e1a6e1 /source
parenta5807d5784dc903f1ea38a9825240a505688b7be (diff)
downloadsamba-e5c3648fe721d659c8b90a6987998ada4790592b.tar.gz
samba-e5c3648fe721d659c8b90a6987998ada4790592b.tar.xz
samba-e5c3648fe721d659c8b90a6987998ada4790592b.zip
cope with a missing PAM define
Diffstat (limited to 'source')
-rw-r--r--source/lib/pam_errors.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/lib/pam_errors.c b/source/lib/pam_errors.c
index 1971e3b763b..f74e4bf1765 100644
--- a/source/lib/pam_errors.c
+++ b/source/lib/pam_errors.c
@@ -23,6 +23,10 @@
#ifdef WITH_PAM
#include <security/pam_appl.h>
+#if defined(PAM_AUTHTOK_RECOVERY_ERR) && !defined(PAM_AUTHTOK_RECOVER_ERR)
+#define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR
+#endif
+
/* PAM -> NT_STATUS map */
const static struct {
int pam_code;
@@ -46,10 +50,9 @@ const static struct {
{PAM_CRED_EXPIRED, NT_STATUS_PASSWORD_EXPIRED}, /* FIXME: Is this correct? */
{PAM_CRED_ERR, NT_STATUS_UNSUCCESSFUL},
{PAM_AUTHTOK_ERR, NT_STATUS_UNSUCCESSFUL},
-#if defined(PAM_AUTHTOK_RECOVERY_ERR) && !defined(PAM_AUTHTOK_RECOVER_ERR)
-#define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR
-#endif
+#ifdef PAM_AUTHTOK_RECOVER_ERR
{PAM_AUTHTOK_RECOVER_ERR, NT_STATUS_UNSUCCESSFUL},
+#endif
{PAM_AUTHTOK_EXPIRED, NT_STATUS_PASSWORD_EXPIRED},
{PAM_SUCCESS, NT_STATUS_OK}
};