aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorshaun <shaun@FreeBSD.org>2006-10-07 08:42:57 +0800
committershaun <shaun@FreeBSD.org>2006-10-07 08:42:57 +0800
commite712d2ebc9139fe1597bd4dfaaeeba8192e09c78 (patch)
treef225afae1e4b52278f1c11e5aa017c91df93b823 /security
parent534a65cfc11520d416b7d64ca48fbd1f8f80f2b9 (diff)
downloadfreebsd-ports-gnome-e712d2ebc9139fe1597bd4dfaaeeba8192e09c78.tar.gz
freebsd-ports-gnome-e712d2ebc9139fe1597bd4dfaaeeba8192e09c78.tar.zst
freebsd-ports-gnome-e712d2ebc9139fe1597bd4dfaaeeba8192e09c78.zip
When using LDAP as a KDC back-end, allow users to override the
hard-coded LDAP socket path. By default, we will use the path where OpenLDAP usually puts its socket. PR: ports/72149 Submitted by: Pawel Wieleba <wielebap@iem.pw.edu.pl>
Diffstat (limited to 'security')
-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));