Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Aug 2002 14:30:32 -0500 (CDT)
From:      "Scot W. Hetzel" <hetzels@westbend.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/42152: net/openldap2: Unable to connect to ldap port (IPv4)
Message-ID:  <200208241930.g7OJUWwt007419@wbiW009.westbend.net>

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

>Number:         42152
>Category:       ports
>Synopsis:       net/openldap2: Unable to connect to ldap port (IPv4)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 28 21:00:05 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Scot W. Hetzel
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
West Bend Internet
>Environment:
System: FreeBSD current.westbend.net 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Aug 21 08:30:05 CDT 2002 root@current.westbend.net:/usr/obj/usr/src/srcC/sys/GENERIC-SMP i386

>Description:

    After installing the net/openldap2 port, I am unable to connect with ldapsearch
    to the TCPv4 port (389), but the TCPv6 port works.  Checking the output of
    netstat -a | grep ldap, only the TCPv6 port is listed:

        current# netstat -a | grep ldap
        tcp6       0      0  *.ldap                 *.*                    LISTEN

    A search thru the OpenLDAP archives resulted in a similar problem on NetBSD:

        http://www.openldap.org/lists/openldap-software/200203/msg00188.html

>How-To-Repeat:

    Install OpenLDAP2 and try to connect to the TCPv4 port with ldapsearch.

>Fix:

    Change slapd.sh to start slapd with -h "ldap://[::] ldap://0.0.0.0"; 

    The following msg mentions that NetBSD has 'mapped addresses' off by
    default, and that enabling this will also cause OpenLDAP v2 to bind to
    both the TCPv4 & TCPv6 ports. Do we have this option of FreeBSD?

    http://www.openldap.org/lists/openldap-software/200203/msg00215.html

Index: files/slapd.sh
===================================================================
RCS file: /home/ncvs/ports/net/openldap2/files/slapd.sh,v
retrieving revision 1.1
diff -u -r1.1 slapd.sh
--- files/slapd.sh	25 Sep 2000 05:43:46 -0000	1.1
+++ files/slapd.sh	24 Aug 2002 18:57:28 -0000
@@ -2,14 +2,30 @@
 #
 # $FreeBSD: ports/net/openldap2/files/slapd.sh,v 1.1 2000/09/25 05:43:46 knu Exp $
 
-slapd=@@PREFIX@@/libexec/slapd
+slapd_program=@@PREFIX@@/libexec/slapd
+
+# Uncommnet one of the following:
+#
+# IPv4 Only
+#slapd_args='-h "ldap://0.0.0.0";'
+#
+# IPv6 and IPv4
+#slapd_ags='-h "ldap://[::] ldap://0.0.0.0";'
+#
+# IPv6 Only
+#slapd_args='-h "ldap://[::];'
+#
+#
+slapd_args=
+
 pidfile=/var/run/slapd.pid
 
 case "$1" in
 start)
     if [ -x $slapd ]; then
 	echo -n ' slapd'
-	$slapd
+	${slapd_program} ${slapd_args}
+
     fi
     ;;
 stop)
>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?200208241930.g7OJUWwt007419>