--- auth-pam.c.orig	Wed Jun 20 15:40:06 2001
+++ auth-pam.c	Wed Jun 20 15:47:22 2001
@@ -184,7 +184,11 @@
 	}
 
 	if (__pamh && creds_set) {
+#ifdef HAVE_OLD_PAM
+		pam_retval = pam_setcred(__pamh, PAM_CRED_DELETE);
+#else
 		pam_retval = pam_setcred(__pamh, PAM_DELETE_CRED);
+#endif
 		if (pam_retval != PAM_SUCCESS)
 			debug("Cannot delete credentials[%d]: %.200s", 
 			    pam_retval, PAM_STRERROR(__pamh, pam_retval));
@@ -250,7 +254,11 @@
 		case PAM_SUCCESS:
 			/* This is what we want */
 			break;
+#ifdef HAVE_OLD_PAM
+		case PAM_AUTHTOKEN_REQD:
+#else
 		case PAM_NEW_AUTHTOK_REQD:
+#endif
 			message_cat(&__pam_msg, NEW_AUTHTOK_MSG);
 			/* flag that password change is necessary */
 			password_change_required = 1;
@@ -297,7 +305,11 @@
 
 	debug("PAM establishing creds");
 	pam_retval = pam_setcred(__pamh, 
+#ifdef HAVE_OLD_PAM
+	    init ? PAM_CRED_ESTABLISH : PAM_CRED_REINITIALIZE);
+#else
 	    init ? PAM_ESTABLISH_CRED : PAM_REINITIALIZE_CRED);
+#endif
 	if (pam_retval != PAM_SUCCESS) {
 		if (was_authenticated)
 			fatal("PAM setcred failed[%d]: %.200s",

