aboutsummaryrefslogtreecommitdiff
path: root/security/heimdal
diff options
context:
space:
mode:
authorShaun Amott <shaun@FreeBSD.org>2006-10-07 00:42:57 +0000
committerShaun Amott <shaun@FreeBSD.org>2006-10-07 00:42:57 +0000
commit5a231e11706ce7a9f0f8789f64d18698451cf109 (patch)
tree58f5e5d7e583f8659759383884ac4b0a9e029bb7 /security/heimdal
parent9fc58c8463e476ad034d380892e8208f88a2a3c5 (diff)
Notes
Diffstat (limited to 'security/heimdal')
-rw-r--r--security/heimdal/Makefile12
-rw-r--r--security/heimdal/files/extrapatch-lib_hdb_hdb-ldap.c11
2 files changed, 23 insertions, 0 deletions
diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile
index 62f967565882..0de037ed3fb4 100644
--- a/security/heimdal/Makefile
+++ b/security/heimdal/Makefile
@@ -7,6 +7,7 @@
PORTNAME= heimdal
PORTVERSION= 0.7.2
+PORTREVISION= 1
CATEGORIES= security ipv6
MASTER_SITES= ftp://ftp.pdc.kth.se/pub/heimdal/src/ \
ftp://ftp.sunet.se/pub/unix/admin/mirror-pdc/pub/heimdal/src/ \
@@ -43,6 +44,13 @@ CFLAGS+= -fPIC
.if defined(WITH_LDAP)
USE_OPENLDAP= yes
CONFIGURE_ARGS+= --with-openldap=${LOCALBASE}
+EXTRA_PATCHES+= ${FILESDIR}/extrapatch-lib_hdb_hdb-ldap.c
+. if defined(LDAP_SOCKET_PATH)
+_SOCK= ${LDAP_SOCKET_PATH:C|/|%2f|g}
+. else
+LDAP_RUN_DIR?= /var/run/openldap
+_SOCK= ${LDAP_RUN_DIR:C|/|%2f|g}%2fldapi
+. endif
.endif
.if defined(WITH_CRACKLIB)
@@ -63,6 +71,10 @@ CONFLICTS+= wu-ftpd-[0-9]* wu-ftpd+ipv6-[0-9]*
.endif
post-patch:
+.if defined(WITH_LDAP)
+ @${REINPLACE_CMD} -e 's|%%LDAP_SOCKET%%|${_SOCK:Q}|g' \
+ ${WRKSRC}/lib/hdb/hdb-ldap.c
+.endif
@${REINPLACE_CMD} -e 's|$$ac_cv_header_fnmatch_h|yes|' \
${WRKSRC}/configure
diff --git a/security/heimdal/files/extrapatch-lib_hdb_hdb-ldap.c b/security/heimdal/files/extrapatch-lib_hdb_hdb-ldap.c
new file mode 100644
index 000000000000..817a475a7218
--- /dev/null
+++ b/security/heimdal/files/extrapatch-lib_hdb_hdb-ldap.c
@@ -0,0 +1,11 @@
+--- lib/hdb/hdb-ldap.c.orig Mon Apr 18 09:03:54 2005
++++ lib/hdb/hdb-ldap.c Sat Oct 7 01:08:23 2006
+@@ -1421,7 +1421,7 @@
+ if (HDB2LDAP(db) != NULL) /* server is UP */
+ return 0;
+
+- rc = ldap_initialize(&((struct hdbldapdb *)db->hdb_db)->h_lp, "ldapi:///");
++ rc = ldap_initialize(&((struct hdbldapdb *)db->hdb_db)->h_lp, "ldapi://%%LDAP_SOCKET%%/");
+ if (rc != LDAP_SUCCESS) {
+ krb5_set_error_string(context, "ldap_initialize: %s",
+ ldap_err2string(rc));