- add a patch to let this build with OpenPAM, but mark as broken for

-currents with OpenPAM because functionality is broken.
- touch -> ${TOUCH}

PR:		36469
Submitted by:	maintainer
This commit is contained in:
Pete Fritchman 2002-03-29 07:46:57 +00:00
parent 04214af6c3
commit 55726ef289
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=56842
2 changed files with 105 additions and 2 deletions

View File

@ -14,6 +14,12 @@ DISTNAME= pam_ldap-${PORTVERSION:S/.//g}
MAINTAINER= marcus@marcuscom.com
.include <bsd.port.pre.mk>
.if ${OSVERSION} > 500030
BROKEN= "Does not work correctly with OpenPAM"
.endif
.if defined(WITH_LDAP_V3)
LIB_DEPENDS= ldap.2:${PORTSDIR}/net/openldap2 \
lber.2:${PORTSDIR}/net/openldap2
@ -34,7 +40,7 @@ USE_GMAKE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.//g}
post-extract:
@find ${WRKSRC} -type f | xargs touch -f
@find ${WRKSRC} -type f | xargs ${TOUCH} -f
post-install:
@${ECHO} "================================================================================"
@ -46,4 +52,4 @@ post-install:
@${ECHO} "login auth sufficient ${PREFIX}/lib/pam_ldap.so"
@${ECHO} "================================================================================"
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -0,0 +1,97 @@
$FreeBSD$
--- pam_ldap.c.orig Mon Mar 25 15:54:28 2002
+++ pam_ldap.c Mon Mar 25 15:54:29 2002
@@ -126,12 +126,7 @@
#include "pam_ldap.h"
#include "md5.h"
-#ifdef HAVE_SECURITY_PAM_MISC_H
- /* FIXME: is there something better to check? */
#define CONST_ARG const
-#else
-#define CONST_ARG
-#endif
#ifndef HAVE_LDAP_MEMFREE
#define ldap_memfree(x) free(x)
@@ -2843,11 +2838,11 @@
{
_conv_sendmsg (appconv, "Password change aborted",
PAM_ERROR_MSG, no_warn);
-#ifdef PAM_AUTHTOK_RECOVERY_ERR
- return PAM_AUTHTOK_RECOVERY_ERR;
-#else
+#ifdef PAM_AUTHTOK_RECOVER_ERR
return PAM_AUTHTOK_RECOVER_ERR;
-#endif /* PAM_AUTHTOK_RECOVERY_ERR */
+#else
+ return PAM_AUTHTOK_RECOVERY_ERR;
+#endif /* PAM_AUTHTOK_RECOVER_ERR */
}
else
{
@@ -2887,11 +2882,11 @@
syslog (LOG_ERR,
"pam_ldap: error getting old authentication token (%s)",
pam_strerror (pamh, rc));
-#ifdef PAM_AUTHTOK_RECOVERY_ERR
- return PAM_AUTHTOK_RECOVERY_ERR;
-#else
+#ifdef PAM_AUTHTOK_RECOVER_ERR
return PAM_AUTHTOK_RECOVER_ERR;
-#endif /* PAM_AUTHTOK_RECOVERY_ERR */
+#else
+ return PAM_AUTHTOK_RECOVERY_ERR;
+#endif /* PAM_AUTHTOK_RECOVER_ERR */
}
if (try_first_pass || use_first_pass)
@@ -2901,11 +2896,11 @@
newpass = NULL;
if (use_first_pass && newpass == NULL)
-#ifdef PAM_AUTHTOK_RECOVERY_ERR
- return PAM_AUTHTOK_RECOVERY_ERR;
-#else
+#ifdef PAM_AUTHTOK_RECOVER_ERR
return PAM_AUTHTOK_RECOVER_ERR;
-#endif /* PAM_AUTHTOK_RECOVERY_ERR */
+#else
+ return PAM_AUTHTOK_RECOVERY_ERR;
+#endif /* PAM_AUTHTOK_RECOVER_ERR */
}
tries = 0;
@@ -2955,11 +2950,11 @@
}
else
{
-#ifdef PAM_AUTHTOK_RECOVERY_ERR
- return PAM_AUTHTOK_RECOVERY_ERR;
-#else
+#ifdef PAM_AUTHTOK_RECOVER_ERR
return PAM_AUTHTOK_RECOVER_ERR;
-#endif /* PAM_AUTHTOK_RECOVERY_ERR */
+#else
+ return PAM_AUTHTOK_RECOVERY_ERR;
+#endif /* PAM_AUTHTOK_RECOVER_ERR */
}
if (cmiscptr == NULL)
@@ -2991,11 +2986,11 @@
{
_conv_sendmsg (appconv, "Password change aborted",
PAM_ERROR_MSG, no_warn);
-#ifdef PAM_AUTHTOK_RECOVERY_ERR
- return PAM_AUTHTOK_RECOVERY_ERR;
-#else
+#ifdef PAM_AUTHTOK_RECOVER_ERR
return PAM_AUTHTOK_RECOVER_ERR;
-#endif /* PAM_AUTHTOK_RECOVERY_ERR */
+#else
+ return PAM_AUTHTOK_RECOVERY_ERR;
+#endif /* PAM_AUTHTOK_RECOVER_ERR */
}
}
else if (!strcmp (newpass, miscptr))