diff options
author | des <des@FreeBSD.org> | 2007-12-22 19:29:32 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2007-12-22 19:29:32 +0000 |
commit | c9107e167703df06aafd968b8331fd55f5e237c0 (patch) | |
tree | bc8dd5a63a6cc4678f25b07f1b741e007d0837a6 /usr.sbin/ppp | |
parent | 065ee19d9ca4e24a32268d3965c086b4200b129c (diff) | |
download | FreeBSD-src-c9107e167703df06aafd968b8331fd55f5e237c0.zip FreeBSD-src-c9107e167703df06aafd968b8331fd55f5e237c0.tar.gz |
Revert previous commit and fix OpenPAM issue properly.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/auth.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c index b8d572b..66a3de7 100644 --- a/usr.sbin/ppp/auth.c +++ b/usr.sbin/ppp/auth.c @@ -44,7 +44,7 @@ #ifndef NOPAM #include <security/pam_appl.h> -#ifdef _OPENPAM +#ifdef OPENPAM #include <security/openpam.h> #endif #endif /* !NOPAM */ @@ -101,7 +101,7 @@ Auth2Nam(u_short auth, u_char type) return "unknown"; } -#if !defined(NOPAM) && !defined(_OPENPAM) +#if !defined(NOPAM) && !defined(OPENPAM) static int pam_conv(int n, const struct pam_message **msg, struct pam_response **resp, void *data) @@ -116,7 +116,7 @@ pam_conv(int n, const struct pam_message **msg, struct pam_response **resp, return ((*resp)[0].resp != NULL ? PAM_SUCCESS : PAM_CONV_ERR); } -#endif /* !defined(NOPAM) && !defined(_OPENPAM) */ +#endif /* !defined(NOPAM) && !defined(OPENPAM) */ static int auth_CheckPasswd(const char *name, const char *data, const char *key) @@ -137,16 +137,16 @@ auth_CheckPasswd(const char *name, const char *data, const char *key) int status; struct pam_conv pamc = { -#ifdef _OPENPAM +#ifdef OPENPAM &openpam_nullconv, NULL #else - &pam_conv, (char *)key + &pam_conv, key #endif }; if (pam_start("ppp", name, &pamc, &pamh) != PAM_SUCCESS) return (0); -#ifdef _OPENPAM +#ifdef OPENPAM if ((status = pam_set_item(pamh, PAM_AUTHTOK, key)) == PAM_SUCCESS) #endif status = pam_authenticate(pamh, 0); |