Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Mar 2002 01:52:41 -0500 (EST)
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/36469: [MAINTAINER UPDATE] Make security/pam_ldap build on -CURRENT
Message-ID:  <200203290652.g2T6qfx20243@shumai.marcuscom.com>

next in thread | raw e-mail | index | archive | help

>Number:         36469
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE] Make security/pam_ldap build on -CURRENT
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 28 23:00:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Joe Marcus Clarke
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
MarcusCom, Inc.
>Environment:
System: FreeBSD shumai.marcuscom.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Sun Mar 24 16:40:24 EST 2002 marcus@shumai.marcuscom.com:/usr/obj/usr/src/sys/SHUMAI i386


	
>Description:
bento has revealed a problem with pam_ldap and the new OpenPAM libs.  The
attached patch fixes the build problems, but there is still an issue
where the calling application will core dump when trying to authenticate
the user.  This is still under investigation.

Prompted by: bento and OpenPAM upgrade
Submitted by: Dag-Erling Smorgrav <des@ofug.org>
>How-To-Repeat:
	
>Fix:

ADDED FILES:
 files/patch-ab

--- patch-ab begins here ---
--- 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))
--- patch-ab ends here ---

	

--- Makefile.patch begins here ---
--- Makefile.orig	Fri Mar 29 01:39:42 2002
+++ Makefile	Fri Mar 29 01:45:19 2002
@@ -14,6 +14,12 @@
 
 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 @@
 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 @@
 	@${ECHO} "login    auth    sufficient    ${PREFIX}/lib/pam_ldap.so"
 	@${ECHO} "================================================================================"
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
--- Makefile.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203290652.g2T6qfx20243>