View | Details | Raw Unified | Return to bug 30849
Collapse All | Expand All

(-)Makefile (+37 lines)
Lines 16-21 Link Here
16
16
17
#BUILD_DEPENDS=	pgp:${PORTSDIR}/security/pgp
17
#BUILD_DEPENDS=	pgp:${PORTSDIR}/security/pgp
18
18
19
.if defined(WITH_LDAP) && !defined(WITH_LDAP2)
20
LIB_DEPENDS+= ldap.1:${PORTSDIR}/net/openldap
21
LIB_DEPENDS+= lber.1:${PORTSDIR}/net/openldap
22
.endif
23
24
.if defined(WITH_LDAP2)
25
LIB_DEPENDS+=   ldap.2:${PORTSDIR}/net/openldap2
26
LIB_DEPENDS+=   lber.2:${PORTSDIR}/net/openldap2
27
.endif
28
29
19
# This may be set interactively at install-time.  NNTPCache will
30
# This may be set interactively at install-time.  NNTPCache will
20
# cache news articles and related data in ${SPOOLDIR}/nntpcache.
31
# cache news articles and related data in ${SPOOLDIR}/nntpcache.
21
SPOOLDIR?=	/var/spool
32
SPOOLDIR?=	/var/spool
Lines 24-35 Link Here
24
USE_GMAKE=	yes
35
USE_GMAKE=	yes
25
GNU_CONFIGURE=	yes
36
GNU_CONFIGURE=	yes
26
CONFIGURE_ARGS=	--localstatedir=${SPOOLDIR}
37
CONFIGURE_ARGS=	--localstatedir=${SPOOLDIR}
38
39
AUTHINFO_EXT= authinfo_pam.ext
40
.if !defined(WITHOUT_RADIUS)
41
CONFIGURE_ARGS+= --with-authinfo-radius
42
AUTHINFO_EXT+= authinfo_radius.ext
43
.endif
44
.if defined(WITH_LDAP) || defined(WITH_LDAP2)
45
CONFIGURE_ARGS+= --with-authinfo-ldap
46
CPPFLAGS+= -I${PREFIX}/include -I/usr/local/include
47
LDFLAGS+= -L${PREFIX}/lib -L/usr/local/lib
48
AUTHINFO_EXT+= authinfo_ldap.ext
49
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
50
.endif
51
27
NNTPSPOOLDIR?=	${SPOOLDIR}/${PORTNAME}
52
NNTPSPOOLDIR?=	${SPOOLDIR}/${PORTNAME}
28
PLIST_SUB+=	SPOOLDIR=${NNTPSPOOLDIR}
53
PLIST_SUB+=	SPOOLDIR=${NNTPSPOOLDIR}
29
CPIO=		cpio --quiet -pdum -R
54
CPIO=		cpio --quiet -pdum -R
30
MAN8=		nntpcached.8 newshound.8
55
MAN8=		nntpcached.8 newshound.8
31
DOCS=		AUTHORS ChangeLog FAQ FAQ.html HACKING HTML \
56
DOCS=		AUTHORS ChangeLog FAQ FAQ.html HACKING HTML \
32
		INSTALL LICENSING NEWS README README.INN VERSION
57
		INSTALL LICENSING NEWS README README.INN VERSION
58
59
.if !defined(BATCH)
60
post-fetch:
61
	@${ECHO} "To enable LDAP support use either:"
62
	@${ECHO} "	WITH_LDAP - LDAP v1 support"
63
	@${ECHO} "	WITH_LDAP2 - LDAP v2 support"
64
	@${ECHO}
65
	@${ECHO} "To disable radius support use WITHOUT_RADIUS"
66
.endif
67
68
post-configure:
69
	@cd ${WRKSRC}/src && ${GMAKE} ${AUTHINFO_EXT}
33
70
34
post-install:
71
post-install:
35
	@ ${MKDIR} ${PREFIX}/etc/rc.d
72
	@ ${MKDIR} ${PREFIX}/etc/rc.d
(-)patch-src-authinfo_ldap.c (+19 lines)
Added Link Here
1
--- src/authinfo_ldap.c.orig	Sat Dec 18 12:08:30 1999
2
+++ src/authinfo_ldap.c	Wed Sep 26 10:55:27 2001
3
@@ -78,7 +78,16 @@
4
 	
5
 	lderr = ldap_bind_s(ld, dnbuf, pass, LDAP_AUTH_SIMPLE);
6
 	if (lderr != LDAP_SUCCESS && lderr != LDAP_INVALID_CREDENTIALS && lderr != LDAP_INAPPROPRIATE_AUTH)
7
+#if LDAP_API_VERSION >= 2004
8
+	{
9
+		int ld_errno = 0;
10
+		ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
11
+		logen(("LDAP ERROR: ldap user bind failed (%d): %s", lderr, ldap_err2string(ld_errno)));
12
+	}
13
+#else
14
+
15
 		logen(("LDAP ERROR: ldap user bind failed (%d): %s", lderr, ldap_err2string(GET_LDERROR(ld))));
16
+#endif
17
 	ldap_unbind(ld);
18
 	memset(pass, strlen(pass), 0);
19
 	if (lderr == LDAP_SUCCESS) {
(-)patch-src-authinfo_pam.c (+12 lines)
Added Link Here
1
--- src/authinfo_pam.c.orig	Sun Jun 11 14:32:55 2000
2
+++ src/authinfo_pam.c	Wed Sep 26 11:27:09 2001
3
@@ -15,7 +15,9 @@
4
 #include "authinfo_pam.h"
5
 
6
 #include <security/pam_appl.h>
7
+#ifndef __FreeBSD__
8
 #include <security/pam_misc.h>
9
+#endif
10
 
11
 /*
12
  * pam authenticator.

Return to bug 30849