diff options
Diffstat (limited to 'net/openldap23-server')
-rw-r--r-- | net/openldap23-server/Makefile | 95 | ||||
-rw-r--r-- | net/openldap23-server/distinfo | 1 | ||||
-rw-r--r-- | net/openldap23-server/files/libtool.diff | 19 | ||||
-rw-r--r-- | net/openldap23-server/files/manpages | 219 | ||||
-rw-r--r-- | net/openldap23-server/files/patch-clients_ud_Makefile.in | 8 | ||||
-rw-r--r-- | net/openldap23-server/files/patch-servers_slapd_daemon.c | 828 | ||||
-rw-r--r-- | net/openldap23-server/files/patch-servers_slapd_schema | 20 | ||||
-rw-r--r-- | net/openldap23-server/files/slapd.sh | 31 | ||||
-rw-r--r-- | net/openldap23-server/pkg-comment | 1 | ||||
-rw-r--r-- | net/openldap23-server/pkg-descr | 12 | ||||
-rw-r--r-- | net/openldap23-server/pkg-plist | 91 |
11 files changed, 0 insertions, 1325 deletions
diff --git a/net/openldap23-server/Makefile b/net/openldap23-server/Makefile deleted file mode 100644 index 984b1a7d60fb..000000000000 --- a/net/openldap23-server/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -# New ports collection makefile for: OpenLDAP 2.x -# Date created: 20 Sep 1998 -# Whom: Lachlan O'Dea -# -# $FreeBSD$ -# - -PORTNAME= openldap -PORTVERSION= 2.0.6 -PORTREVISION= 2 -CATEGORIES= net databases -MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \ - ftp://ftp.net.lut.ac.uk/openldap/%SUBDIR%/ \ - ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/%SUBDIR%/ \ - ftp://mirror.aarnet.edu.au/pub/OpenLDAP/%SUBDIR%/ \ - ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/%SUBDIR%/ \ - http://www.unibase.cz/ldapcz/Programy/Free/OpenLDAP/%SUBDIR%/ \ - ftp://ftp.ntua.gr/mirror/OpenLDAP/%SUBDIR%/ \ - ftp://ftp.loxinfo.co.th/pub/unix/LDAP/OpenLDAP/%SUBDIR%/ \ - ftp://ftp.zcu.cz/pub/network/openldap/%SUBDIR%/ -MASTER_SITE_SUBDIR= openldap-release -EXTRACT_SUFX= .tgz - -MAINTAINER= knu@FreeBSD.org - -USE_AUTOCONF= yes -USE_LIBTOOL= yes -USE_OPENSSL= yes - -CONFIGURE_ARGS= --localstatedir=/var/run \ - --with-threads \ - --enable-shared \ - --enable-dnssrv \ - --with-tls=openssl - -# Include tcp-wrapper support -.if exists(/usr/include/tcpd.h) -CONFIGURE_ARGS+= --enable-wrappers -.endif - -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib - -.if defined(WITH_DB2) -BUILD_DEPENDS= ${LOCALBASE}/lib/libdb2.a:${PORTSDIR}/databases/db -CPPFLAGS+= -I${LOCALBASE}/include/db2 -D_THREAD_SAFE -CONFIGURE_ARGS+= --enable-ldbm \ - --with-ldbm-api=db2 -.endif - -.if defined(WITH_SASL) -LIB_DEPENDS= sasl.8:${PORTSDIR}/security/cyrus-sasl -CPPFLAGS+= -I${LOCALBASE}/include/sasl -.endif - -CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" - -BINS= bin/ldapadd \ - bin/ldapdelete \ - bin/ldapmodify \ - bin/ldapmodrdn \ - bin/ldappasswd \ - bin/ldapsearch \ - bin/ud \ - libexec/fax500 \ - libexec/go500 \ - libexec/go500gw \ - libexec/in.xfingerd \ - libexec/mail500 \ - libexec/maildap \ - libexec/rcpt500 \ - libexec/rp500 \ - libexec/slapd \ - libexec/slurpd - -.include <bsd.port.pre.mk> -.include "${FILESDIR}/manpages" - -post-configure: - cd ${WRKSRC} ; ${PATCH} < ${FILESDIR}/libtool.diff - -pre-build: - cd ${WRKSRC} ; ${MAKE} depend - -post-build: - ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh - -post-install: -.for f in ${BINS} - strip ${PREFIX}/${f} -.endfor - ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample - -.include <bsd.port.post.mk> diff --git a/net/openldap23-server/distinfo b/net/openldap23-server/distinfo deleted file mode 100644 index 8a9668d4e077..000000000000 --- a/net/openldap23-server/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (openldap-2.0.6.tgz) = 6df0ebc7da308999146102f950ecdaed diff --git a/net/openldap23-server/files/libtool.diff b/net/openldap23-server/files/libtool.diff deleted file mode 100644 index 0cf57bbee7ea..000000000000 --- a/net/openldap23-server/files/libtool.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- libtool.orig Tue Oct 31 01:43:06 2000 -+++ libtool Tue Oct 31 01:44:42 2000 -@@ -448,6 +448,16 @@ - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - -+ --only-shared) -+ build_libtool_libs=yes -+ build_old_libs=no -+ ;; -+ -+ --only-static) -+ build_libtool_libs=no -+ build_old_libs=yes -+ ;; -+ - --quiet | --silent) - show=: - ;; diff --git a/net/openldap23-server/files/manpages b/net/openldap23-server/files/manpages deleted file mode 100644 index 1c39b81911fc..000000000000 --- a/net/openldap23-server/files/manpages +++ /dev/null @@ -1,219 +0,0 @@ -MAN1+= ldapdelete.1 -MAN1+= ldapmodify.1 -MAN1+= ldapmodrdn.1 -MAN1+= ldappasswd.1 -MAN1+= ldapsearch.1 -MAN1+= ud.1 -MAN3+= lber-decode.3 -MAN3+= lber-encode.3 -MAN3+= lber-memory.3 -MAN3+= lber-types.3 -MAN3+= ldap.3 -MAN3+= ldap_abandon.3 -MAN3+= ldap_add.3 -MAN3+= ldap_bind.3 -MAN3+= ldap_cache.3 -MAN3+= ldap_compare.3 -MAN3+= ldap_delete.3 -MAN3+= ldap_disptmpl.3 -MAN3+= ldap_entry2text.3 -MAN3+= ldap_error.3 -MAN3+= ldap_first_attribute.3 -MAN3+= ldap_first_entry.3 -MAN3+= ldap_friendly.3 -MAN3+= ldap_get_dn.3 -MAN3+= ldap_get_values.3 -MAN3+= ldap_getfilter.3 -MAN3+= ldap_modify.3 -MAN3+= ldap_modrdn.3 -MAN3+= ldap_open.3 -MAN3+= ldap_result.3 -MAN3+= ldap_schema.3 -MAN3+= ldap_search.3 -MAN3+= ldap_searchprefs.3 -MAN3+= ldap_sort.3 -MAN3+= ldap_ufn.3 -MAN3+= ldap_url.3 -MAN5+= ldap.conf.5 -MAN5+= ldapfilter.conf.5 -MAN5+= ldapfriendly.5 -MAN5+= ldapsearchprefs.conf.5 -MAN5+= ldaptemplates.conf.5 -MAN5+= ldif.5 -MAN5+= slapd.conf.5 -MAN5+= slapd.replog.5 -MAN5+= ud.conf.5 -MAN8+= go500.8 -MAN8+= go500gw.8 -MAN8+= in.xfingerd.8 -MAN8+= mail500.8 -MAN8+= rcpt500.8 -MAN8+= slapadd.8 -MAN8+= slapcat.8 -MAN8+= slapd.8 -MAN8+= slapindex.8 -MAN8+= slappasswd.8 -MAN8+= slurpd.8 -MLINKS+= lber-decode.3 ber_first_element.3 -MLINKS+= lber-decode.3 ber_get_bitstring.3 -MLINKS+= lber-decode.3 ber_get_boolean.3 -MLINKS+= lber-decode.3 ber_get_enum.3 -MLINKS+= lber-decode.3 ber_get_int.3 -MLINKS+= lber-decode.3 ber_get_next.3 -MLINKS+= lber-decode.3 ber_get_null.3 -MLINKS+= lber-decode.3 ber_get_stringa.3 -MLINKS+= lber-decode.3 ber_get_stringb.3 -MLINKS+= lber-decode.3 ber_next_element.3 -MLINKS+= lber-decode.3 ber_peek_tag.3 -MLINKS+= lber-decode.3 ber_scanf.3 -MLINKS+= lber-decode.3 ber_skip_tag.3 -MLINKS+= lber-encode.3 ber_alloc_t.3 -MLINKS+= lber-encode.3 ber_flush.3 -MLINKS+= lber-encode.3 ber_printf.3 -MLINKS+= lber-encode.3 ber_put_enum.3 -MLINKS+= lber-encode.3 ber_put_int.3 -MLINKS+= lber-encode.3 ber_put_null.3 -MLINKS+= lber-encode.3 ber_put_ostring.3 -MLINKS+= lber-encode.3 ber_put_seq.3 -MLINKS+= lber-encode.3 ber_put_set.3 -MLINKS+= lber-encode.3 ber_put_string.3 -MLINKS+= lber-decode.3 ber_start_set.3 -MLINKS+= ldap.3 cldap.3 -MLINKS+= ldap_add.3 ldap_add_s.3 -MLINKS+= ldap_bind.3 ldap_abandon_ext.3 -MLINKS+= ldap_bind.3 ldap_add_ext.3 -MLINKS+= ldap_bind.3 ldap_add_ext_s.3 -MLINKS+= ldap_bind.3 ldap_bind_s.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind1.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind1_s.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind2.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind2_s.3 -MLINKS+= ldap_bind.3 ldap_kerberos_bind_s.3 -MLINKS+= ldap_bind.3 ldap_sasl_bind.3 -MLINKS+= ldap_bind.3 ldap_sasl_bind_s.3 -MLINKS+= ldap_bind.3 ldap_set_rebind_proc.3 -MLINKS+= ldap_bind.3 ldap_simple_bind.3 -MLINKS+= ldap_bind.3 ldap_simple_bind_s.3 -MLINKS+= ldap_bind.3 ldap_unbind.3 -MLINKS+= ldap_bind.3 ldap_unbind_ext.3 -MLINKS+= ldap_bind.3 ldap_unbind_ext_s.3 -MLINKS+= ldap_bind.3 ldap_unbind_s.3 -MLINKS+= ldap_cache.3 ldap_destroy_cache.3 -MLINKS+= ldap_cache.3 ldap_disable_cache.3 -MLINKS+= ldap_cache.3 ldap_enable_cache.3 -MLINKS+= ldap_cache.3 ldap_flush_cache.3 -MLINKS+= ldap_cache.3 ldap_set_cache_options.3 -MLINKS+= ldap_cache.3 ldap_uncache_entry.3 -MLINKS+= ldap_cache.3 ldap_uncache_request.3 -MLINKS+= ldap_charset.3 ldap_8859_to_t61.3 -MLINKS+= ldap_charset.3 ldap_enable_translation.3 -MLINKS+= ldap_charset.3 ldap_set_string_translators.3 -MLINKS+= ldap_charset.3 ldap_t61_to_8859.3 -MLINKS+= ldap_charset.3 ldap_translate_from_t61.3 -MLINKS+= ldap_charset.3 ldap_translate_to_t61.3 -MLINKS+= ldap_compare.3 ldap_compare_ext.3 -MLINKS+= ldap_compare.3 ldap_compare_ext_s.3 -MLINKS+= ldap_compare.3 ldap_compare_s.3 -MLINKS+= ldap_delete.3 ldap_delete_ext.3 -MLINKS+= ldap_delete.3 ldap_delete_ext_s.3 -MLINKS+= ldap_delete.3 ldap_delete_s.3 -MLINKS+= ldap_disptmpl.3 ldap_first_disptmpl.3 -MLINKS+= ldap_disptmpl.3 ldap_first_tmplcol.3 -MLINKS+= ldap_disptmpl.3 ldap_first_tmplrow.3 -MLINKS+= ldap_disptmpl.3 ldap_free_templates.3 -MLINKS+= ldap_disptmpl.3 ldap_init_templates.3 -MLINKS+= ldap_disptmpl.3 ldap_init_templates_buf.3 -MLINKS+= ldap_disptmpl.3 ldap_next_disptmpl.3 -MLINKS+= ldap_disptmpl.3 ldap_next_tmplcol.3 -MLINKS+= ldap_disptmpl.3 ldap_next_tmplrow.3 -MLINKS+= ldap_disptmpl.3 ldap_oc2template.3 -MLINKS+= ldap_disptmpl.3 ldap_tmplattrs.3 -MLINKS+= ldap_entry2text.3 ldap_entry2html.3 -MLINKS+= ldap_entry2text.3 ldap_entry2html_search.3 -MLINKS+= ldap_entry2text.3 ldap_entry2text_search.3 -MLINKS+= ldap_entry2text.3 ldap_vals2html.3 -MLINKS+= ldap_entry2text.3 ldap_vals2text.3 -MLINKS+= ldap_error.3 ld_errno.3 -MLINKS+= ldap_error.3 ldap_err2string.3 -MLINKS+= ldap_error.3 ldap_errlist.3 -MLINKS+= ldap_error.3 ldap_perror.3 -MLINKS+= ldap_error.3 ldap_result2error.3 -MLINKS+= ldap_first_attribute.3 ldap_next_attribute.3 -MLINKS+= ldap_first_entry.3 ldap_count_entries.3 -MLINKS+= ldap_first_entry.3 ldap_next_entry.3 -MLINKS+= ldap_friendly.3 ldap_free_friendlymap.3 -MLINKS+= ldap_friendly.3 ldap_friendly_name.3 -MLINKS+= ldap_get_dn.3 ldap_dn2ufn.3 -MLINKS+= ldap_get_dn.3 ldap_explode_dn.3 -MLINKS+= ldap_get_dn.3 ldap_explode_dns.3 -MLINKS+= ldap_get_dn.3 ldap_explode_rdn.3 -MLINKS+= ldap_get_dn.3 ldap_is_dns_dn.3 -MLINKS+= ldap_get_values.3 ldap_count_values.3 -MLINKS+= ldap_get_values.3 ldap_count_values_len.3 -MLINKS+= ldap_get_values.3 ldap_get_values_len.3 -MLINKS+= ldap_get_values.3 ldap_value_free.3 -MLINKS+= ldap_get_values.3 ldap_value_free_len.3 -MLINKS+= ldap_getfilter.3 ldap_build_filter.3 -MLINKS+= ldap_getfilter.3 ldap_getfilter_free.3 -MLINKS+= ldap_getfilter.3 ldap_getfirstfilter.3 -MLINKS+= ldap_getfilter.3 ldap_getnextfilter.3 -MLINKS+= ldap_getfilter.3 ldap_init_getfilter.3 -MLINKS+= ldap_getfilter.3 ldap_init_getfilter_buf.3 -MLINKS+= ldap_getfilter.3 ldap_setfilteraffixes.3 -MLINKS+= ldap_modify.3 ldap_modify_ext.3 -MLINKS+= ldap_modify.3 ldap_modify_ext_s.3 -MLINKS+= ldap_modify.3 ldap_modify_s.3 -MLINKS+= ldap_modify.3 ldap_mods_free.3 -MLINKS+= ldap_modrdn.3 ldap_modrdn2.3 -MLINKS+= ldap_modrdn.3 ldap_modrdn2_s.3 -MLINKS+= ldap_modrdn.3 ldap_modrdn_s.3 -MLINKS+= ldap_open.3 ldap_init.3 -MLINKS+= ldap_result.3 ldap_msgfree.3 -MLINKS+= ldap_result.3 ldap_msgid.3 -MLINKS+= ldap_result.3 ldap_msgtype.3 -MLINKS+= ldap_schema.3 ldap_attributetype2name.3 -MLINKS+= ldap_schema.3 ldap_attributetype2str.3 -MLINKS+= ldap_schema.3 ldap_attributetype_free.3 -MLINKS+= ldap_schema.3 ldap_matchingrule2name.3 -MLINKS+= ldap_schema.3 ldap_matchingrule2str.3 -MLINKS+= ldap_schema.3 ldap_matchingrule_free.3 -MLINKS+= ldap_schema.3 ldap_objectclass2name.3 -MLINKS+= ldap_schema.3 ldap_objectclass2str.3 -MLINKS+= ldap_schema.3 ldap_objectclass_free.3 -MLINKS+= ldap_schema.3 ldap_scherr2str.3 -MLINKS+= ldap_schema.3 ldap_str2attributetype.3 -MLINKS+= ldap_schema.3 ldap_str2matchingrule.3 -MLINKS+= ldap_schema.3 ldap_str2objectclass.3 -MLINKS+= ldap_schema.3 ldap_str2syntax.3 -MLINKS+= ldap_schema.3 ldap_syntax2name.3 -MLINKS+= ldap_schema.3 ldap_syntax2str.3 -MLINKS+= ldap_schema.3 ldap_syntax_free.3 -MLINKS+= ldap_search.3 ldap_search_ext.3 -MLINKS+= ldap_search.3 ldap_search_ext_s.3 -MLINKS+= ldap_search.3 ldap_search_s.3 -MLINKS+= ldap_search.3 ldap_search_st.3 -MLINKS+= ldap_searchprefs.3 ldap_first_searchobj.3 -MLINKS+= ldap_searchprefs.3 ldap_free_searchprefs.3 -MLINKS+= ldap_searchprefs.3 ldap_init_searchprefs.3 -MLINKS+= ldap_searchprefs.3 ldap_init_searchprefs_buf.3 -MLINKS+= ldap_searchprefs.3 ldap_next_searchobj.3 -MLINKS+= ldap_sort.3 ldap_sort_entries.3 -MLINKS+= ldap_sort.3 ldap_sort_strcasecmp.3 -MLINKS+= ldap_sort.3 ldap_sort_values.3 -MLINKS+= ldap_ufn.3 ldap_ufn_search_c.3 -MLINKS+= ldap_ufn.3 ldap_ufn_search_ct.3 -MLINKS+= ldap_ufn.3 ldap_ufn_search_s.3 -MLINKS+= ldap_ufn.3 ldap_ufn_setfilter.3 -MLINKS+= ldap_ufn.3 ldap_ufn_setprefix.3 -MLINKS+= ldap_ufn.3 ldap_ufn_timeout.3 -MLINKS+= ldap_url.3 ldap_free_urldesc.3 -MLINKS+= ldap_url.3 ldap_is_ldap_url.3 -MLINKS+= ldap_url.3 ldap_url_parse.3 -MLINKS+= ldap_url.3 ldap_url_search.3 -MLINKS+= ldap_url.3 ldap_url_search_s.3 -MLINKS+= ldap_url.3 ldap_url_search_st.3 -MLINKS+= ldapmodify.1 ldapadd.1 -MLINKS+= ldif2ldbm.8 ldif2id2children.8 -MLINKS+= ldif2ldbm.8 ldif2id2entry.8 -MLINKS+= ldif2ldbm.8 ldif2index.8 -MLINKS+= mail500.8 fax500.8 diff --git a/net/openldap23-server/files/patch-clients_ud_Makefile.in b/net/openldap23-server/files/patch-clients_ud_Makefile.in deleted file mode 100644 index 18f342c29a53..000000000000 --- a/net/openldap23-server/files/patch-clients_ud_Makefile.in +++ /dev/null @@ -1,8 +0,0 @@ ---- clients/ud/Makefile.in.orig Wed Jan 13 20:02:11 1999 -+++ clients/ud/Makefile.in Wed Jul 26 14:24:14 2000 -@@ -26,4 +26,4 @@ - install-local: FORCE - -$(MKDIR) $(bindir) - -mv -f $(bindir)/ud $(bindir)/ud- -- $(LTINSTALL) $(INSTALLFLAGS) -m 775 ud $(bindir) -+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ud $(bindir) diff --git a/net/openldap23-server/files/patch-servers_slapd_daemon.c b/net/openldap23-server/files/patch-servers_slapd_daemon.c deleted file mode 100644 index 44baead6a6b7..000000000000 --- a/net/openldap23-server/files/patch-servers_slapd_daemon.c +++ /dev/null @@ -1,828 +0,0 @@ ---- servers/slapd/daemon.c.orig Sat Sep 30 11:24:28 2000 -+++ servers/slapd/daemon.c Tue Oct 31 10:54:09 2000 -@@ -1,4 +1,4 @@ --/* $OpenLDAP: pkg/ldap/servers/slapd/daemon.c,v 1.99.2.12 2000/09/30 16:24:28 kurt Exp $ */ -+/* $OpenLDAP: servers/slapd/daemon.c,v 1.99.2.13 2000/10/30 18:14:51 kurt Exp $ */ - /* - * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. - * COPYING RESTRICTIONS APPLY, see COPYRIGHT file -@@ -59,6 +59,8 @@ - - Listener **slap_listeners = NULL; - -+#define SLAPD_LISTEN 10 -+ - static ber_socket_t wake_sds[2]; - - #ifdef NO_THREADS -@@ -81,8 +83,6 @@ - #endif - volatile sig_atomic_t slapd_shutdown = 0; - --static ldap_pvt_thread_t listener_tid; -- - static struct slap_daemon { - ldap_pvt_thread_mutex_t sd_mutex; - -@@ -193,20 +193,207 @@ - tcp_close(s); - } - -+static void slap_free_listener_addresses(struct sockaddr **sal) -+{ -+ struct sockaddr **sap; -+ -+ if (sal == NULL) { -+ return; -+ } -+ -+ for (sap = sal; *sap != NULL; sap++) { -+ ch_free(*sap); -+ } -+ -+ ch_free(sal); -+} -+ -+/* port = 0 indicates AF_LOCAL */ -+static int slap_get_listener_addresses( -+ const char *host, -+ unsigned short port, -+ struct sockaddr ***sal) -+{ -+ struct sockaddr **sap; -+#ifdef HAVE_GETADDRINFO -+ struct addrinfo hints, *res, *sai; -+ int n, err; -+ -+ memset( &hints, '\0', sizeof(hints) ); -+ hints.ai_flags = AI_PASSIVE; -+ hints.ai_socktype = SOCK_STREAM; -+# ifdef LDAP_PF_LOCAL -+ if ( port == 0 ) { -+ hints.ai_family = AF_LOCAL; -+ /* host specifies a service in this case */ -+ if (err = getaddrinfo(NULL, host, &hints, &res)) { -+ if (err == EAI_FAMILY) { -+ /* XXX Fake it */ -+ struct sockaddr_un *sun = calloc(1, sizeof(struct sockaddr_un)); -+ err = 0; -+ res = calloc(1, sizeof(*res)); -+ assert(sun != NULL); -+ assert(res != NULL); -+ res->ai_flags = hints.ai_flags; -+ res->ai_family = AF_LOCAL; -+ res->ai_socktype = hints.ai_socktype; -+ res->ai_addr = (struct sockaddr *)sun; -+ res->ai_addrlen = sizeof(*sun); -+ sun->sun_len = strlen(LDAPI_SOCK) + 1; -+ sun->sun_family = AF_LOCAL; -+ strcpy(sun->sun_path, LDAPI_SOCK); -+ } else { -+ Debug( LDAP_DEBUG_ANY, "daemon: getaddrinfo failed: %s\n", -+ gai_strerror(err), 0, 0); -+ return -1; -+ } -+ } -+ } else -+# endif -+ { -+ char serv[7]; -+ -+ snprintf(serv, sizeof serv, "%d", port); -+ hints.ai_family = AF_UNSPEC; -+ if (err = getaddrinfo(host, serv, &hints, &res)) { -+ Debug( LDAP_DEBUG_ANY, "daemon: getaddrinfo failed: %s\n", -+ gai_strerror(err), 0, 0); -+ return -1; -+ } -+ } -+ -+ sai = res; -+ for (n=2; (sai = sai->ai_next) != NULL; n++) { -+ /* EMPTY */ ; -+ } -+ *sal = ch_malloc(n * sizeof(*sal)); -+ if (*sal == NULL) { -+ return -1; -+ } -+ -+ sai = res; -+ sap = *sal; -+ do { -+ switch (sai->ai_family) { -+# ifdef LDAP_PF_LOCAL -+ case AF_LOCAL: { -+ *sap = ch_malloc(sizeof(struct sockaddr_un)); -+ if (*sap == NULL) { -+ freeaddrinfo(res); -+ goto errexit; -+ } -+ *(struct sockaddr_un *)*sap = -+ *((struct sockaddr_un *)sai->ai_addr); -+ } break; -+# endif -+# ifdef LDAP_PF_INET6 -+ case AF_INET6: { -+ *sap = ch_malloc(sizeof(struct sockaddr_in6)); -+ if (*sap == NULL) { -+ freeaddrinfo(res); -+ goto errexit; -+ } -+ *(struct sockaddr_in6 *)*sap = -+ *((struct sockaddr_in6 *)sai->ai_addr); -+ } break; -+# endif -+ case AF_INET: { -+ *sap = ch_malloc(sizeof(struct sockaddr_in)); -+ if (*sap == NULL) { -+ freeaddrinfo(res); -+ goto errexit; -+ } -+ *(struct sockaddr_in *)*sap = -+ *((struct sockaddr_in *)sai->ai_addr); -+ } break; -+ default: -+ *sap = NULL; -+ break; -+ } -+ if (*sap != NULL) { -+ (*sap)->sa_family = sai->ai_family; -+ sap++; -+ } -+ } while ((sai = sai->ai_next) != NULL); -+ -+ freeaddrinfo(res); -+ -+#else -+# ifdef LDAP_PF_LOCAL -+ if ( port == 0 ) { -+ *sal = ch_malloc(2 * sizeof(*sal)); -+ if (*sal == NULL) { -+ return -1; -+ } -+ sap = *sal; -+ *sap = ch_malloc(sizeof(struct sockaddr_un)); -+ if (*sap == NULL) -+ goto errexit; -+ (void)memset( (void *)*sap, '\0', sizeof(struct sockaddr_un) ); -+ (*sap)->sa_family = AF_LOCAL; -+ if ( strlen(host) > -+ (sizeof(((struct sockaddr_un *)*sal)->sun_path) - 1) ) { -+ Debug( LDAP_DEBUG_ANY, -+ "daemon: domain socket path (%s) too long in URL", -+ host, 0, 0); -+ goto errexit; -+ } -+ strcpy( ((struct sockaddr_un *)*sap)->sun_path, host ); -+ } else -+# endif -+ { -+ struct in_addr in; -+ -+ if ( host == NULL ) { -+ in.s_addr = htonl(INADDR_ANY); -+ -+ } else if ( !inet_aton( host, &in ) ) { -+ struct hostent *he = gethostbyname( host ); -+ if( he == NULL ) { -+ Debug( LDAP_DEBUG_ANY, -+ "daemon: invalid host %s", host, 0, 0); -+ return -1; -+ } -+ AC_MEMCPY( &in, he->h_addr, sizeof( in ) ); -+ } -+ -+ *sal = ch_malloc(2 * sizeof(*sal)); -+ if (*sal == NULL) { -+ return -1; -+ } -+ -+ sap = *sal; -+ *sap = ch_malloc(sizeof(struct sockaddr_in)); -+ if (*sap == NULL) { -+ goto errexit; -+ } -+ -+ (void)memset( (void *)*sap, '\0', sizeof(struct sockaddr_in) ); -+ (*sap)->sa_family = AF_INET; -+ ((struct sockaddr_in *)*sap)->sin_port = htons(port); -+ ((struct sockaddr_in *)*sap)->sin_addr = in; -+ } -+ sap++; -+#endif -+ -+ *sap = NULL; -+ return 0; -+ -+errexit: -+ slap_free_listener_addresses(*sal); -+ return -1; -+} - --static Listener * open_listener( const char* url ) -+static Listener * slap_open_listener( -+ const char* url ) - { - int tmp, rc; - Listener l; - Listener *li; - LDAPURLDesc *lud; -- char *s; -- int port; --#ifdef HAVE_GETADDRINFO -- char serv[7]; -- struct addrinfo hints, *res, *sai; -- int err; --#endif -+ unsigned short port; -+ int err, addrlen; -+ struct sockaddr **sal, **psal; - - rc = ldap_url_parse( url, &lud ); - -@@ -238,291 +425,171 @@ - } - #endif - --#ifdef HAVE_GETADDRINFO -- memset( &hints, '\0', sizeof(hints) ); -- hints.ai_flags = AI_PASSIVE; -- hints.ai_family = AF_UNSPEC; -- hints.ai_socktype = SOCK_STREAM; -- --# ifdef LDAP_PF_LOCAL -+ port = (unsigned short) lud->lud_port; -+ - if ( ldap_pvt_url_scheme2proto(lud->lud_scheme) == LDAP_PROTO_IPC ) { -+#ifdef LDAP_PF_LOCAL - if ( lud->lud_host == NULL || lud->lud_host[0] == '\0' ) { -- err = getaddrinfo(NULL, LDAPI_SOCK, &hints, &res); -- if (!err) -- unlink( LDAPI_SOCK ); -+ err = slap_get_listener_addresses(LDAPI_SOCK, 0, &sal); - } else { -- err = getaddrinfo(NULL, lud->lud_host, &hints, &res); -- if (!err) -- unlink( lud->lud_host ); -+ err = slap_get_listener_addresses(lud->lud_host, 0, &sal); - } -- } else --# endif /* LDAP_PF_LOCAL */ -- { -- snprintf(serv, sizeof serv, "%d", lud->lud_port); -+#else -+ Debug( LDAP_DEBUG_ANY, "daemon: URL scheme not supported: %s", -+ url, 0, 0); -+ ldap_free_urldesc( lud ); -+ return NULL; -+#endif -+ } else { - if( lud->lud_host == NULL || lud->lud_host[0] == '\0' - || strcmp(lud->lud_host, "*") == 0 ) - { -- err = getaddrinfo(NULL, serv, &hints, &res); -+ err = slap_get_listener_addresses(NULL, port, &sal); - } else { -- err = getaddrinfo(lud->lud_host, serv, &hints, &res); -+ err = slap_get_listener_addresses(lud->lud_host, port, &sal); - } - } - -+ ldap_free_urldesc( lud ); - if ( err ) { -- Debug( LDAP_DEBUG_ANY, "daemon: getaddrinfo failed\n", 0, 0, 0); -- ldap_free_urldesc( lud ); - return NULL; - } - -- ldap_free_urldesc( lud ); -- sai = res; -- do { -- if ( (sai->ai_family != AF_INET) --# ifdef LDAP_PF_INET6 -- && (sai->ai_family != AF_INET6) --# endif --# ifdef LDAP_PF_LOCAL -- && (sai->ai_family != AF_LOCAL) --# endif -- ) -+ psal = sal; -+ while ( *sal != NULL ) { -+ switch( (*sal)->sa_family ) { -+ case AF_INET: -+#ifdef LDAP_PF_INET6 -+ case AF_INET6: -+#endif -+#ifdef LDAP_PF_LOCAL -+ case AF_LOCAL: -+#endif -+ break; -+ default: -+ sal++; - continue; -- l.sl_sd = socket( sai->ai_family, sai->ai_socktype, sai->ai_protocol); -+ } -+ l.sl_sd = socket( (*sal)->sa_family, SOCK_STREAM, 0); - if ( l.sl_sd == AC_SOCKET_INVALID ) { - int err = sock_errno(); - Debug( LDAP_DEBUG_ANY, - "daemon: socket() failed errno=%d (%s)\n", err, - sock_errstr(err), 0 ); -+ sal++; - continue; - } -- -- if ( sai->ai_family != AF_LOCAL ) { --#else -- -- if ( ldap_pvt_url_scheme2proto(lud->lud_scheme) == LDAP_PROTO_IPC ) { -+#ifndef HAVE_WINSOCK -+ if ( l.sl_sd >= dtblsize ) { -+ Debug( LDAP_DEBUG_ANY, -+ "daemon: listener descriptor %ld is too great %ld\n", -+ (long) l.sl_sd, (long) dtblsize, 0 ); -+ tcp_close( l.sl_sd ); -+ sal++; -+ continue; -+ } -+#endif - #ifdef LDAP_PF_LOCAL -- port = 0; -- (void) memset( (void *)&l.sl_sa.sa_un_addr, '\0', sizeof(l.sl_sa.sa_un_addr) ); -- -- l.sl_sa.sa_un_addr.sun_family = AF_LOCAL; -- -- /* hack: overload the host to be the path */ -- if ( lud->lud_host == NULL || lud->lud_host[0] == '\0' ) { -- strcpy( l.sl_sa.sa_un_addr.sun_path, LDAPI_SOCK ); -- } else { -- if ( strlen(lud->lud_host) > (sizeof(l.sl_sa.sa_un_addr.sun_path) - 1) ) { -- Debug( LDAP_DEBUG_ANY, -- "daemon: domain socket path (%s) too long in URL: %s", -- lud->lud_host, url, 0); -- ldap_free_urldesc( lud ); -- return NULL; -- } -- strcpy( l.sl_sa.sa_un_addr.sun_path, lud->lud_host ); -- } -- unlink( l.sl_sa.sa_un_addr.sun_path ); --#if 0 -- /* I don't think we need to set this. */ -- l.sl_sa.sa_un_addr.sun_len = sizeof( l.sl_sa.sa_un_addr.sun_len ) + -- sizeof( l.sl_sa.sa_un_addr.sun_family ) + -- strlen( l.sl_sa.sa_un_addr.sun_path ) + 1; -+ if ( (*sal)->sa_family == AF_LOCAL ) { -+ unlink ( ((struct sockaddr_un *)*sal)->sun_path ); -+ } else - #endif --#else -- Debug( LDAP_DEBUG_ANY, "daemon: URL scheme not supported: %s", -- url, 0, 0); -- ldap_free_urldesc( lud ); -- return NULL; --#endif /* LDAP_PF_LOCAL */ -- } else { -- -- port = lud->lud_port; -- -- (void) memset( (void*) &l.sl_addr, '\0', sizeof(l.sl_addr) ); -- -- l.sl_addr.sin_family = AF_INET; -- l.sl_addr.sin_port = htons( (unsigned short) lud->lud_port ); -- -- if( lud->lud_host == NULL || lud->lud_host[0] == '\0' -- || strcmp(lud->lud_host, "*") == 0 ) -- { -- l.sl_addr.sin_addr.s_addr = htonl(INADDR_ANY); -- -- } else { -- /* host or address was specified */ -- if( !inet_aton( lud->lud_host, &l.sl_addr.sin_addr ) ) { -- struct hostent *he = gethostbyname( lud->lud_host ); -- if( he == NULL ) { -+ { -+#ifdef SO_REUSEADDR -+ /* enable address reuse */ -+ tmp = 1; -+ rc = setsockopt( l.sl_sd, SOL_SOCKET, SO_REUSEADDR, -+ (char *) &tmp, sizeof(tmp) ); -+ if ( rc == AC_SOCKET_ERROR ) { -+ int err = sock_errno(); - Debug( LDAP_DEBUG_ANY, -- "daemon: invalid host (%s) in URL: %s", -- lud->lud_host, url, 0); -- ldap_free_urldesc( lud ); -- return NULL; -+ "slapd(%ld): setsockopt(SO_REUSEADDR) failed errno=%d (%s)\n", -+ (long) l.sl_sd, err, sock_errstr(err) ); - } -- -- AC_MEMCPY( &l.sl_addr.sin_addr, he->h_addr, -- sizeof( l.sl_addr.sin_addr ) ); -+#endif - } -- } -- } -- -- ldap_free_urldesc( lud ); -- -- l.sl_sd = socket( l.sl_sa.sa_addr.sa_family, SOCK_STREAM, 0 ); -- if ( l.sl_sd == AC_SOCKET_INVALID ) { -- int err = sock_errno(); -- Debug( LDAP_DEBUG_ANY, -- "daemon: socket() failed errno=%d (%s)\n", err, -- sock_errstr(err), 0 ); -- return NULL; -- } -- --#ifndef HAVE_WINSOCK -- if ( l.sl_sd >= dtblsize ) { -- Debug( LDAP_DEBUG_ANY, -- "daemon: listener descriptor %ld is too great %ld\n", -- (long) l.sl_sd, (long) dtblsize, 0 ); -- tcp_close( l.sl_sd ); -- return NULL; -- } -+ -+ switch( (*sal)->sa_family ) { -+ case AF_INET: -+ addrlen = sizeof(struct sockaddr_in); -+ break; -+#ifdef LDAP_PF_INET6 -+ case AF_INET6: -+ addrlen = sizeof(struct sockaddr_in6); -+ break; - #endif -- - #ifdef LDAP_PF_LOCAL -- /* for IPv4 and IPv6 sockets only */ -- if ( l.sl_sa.sa_addr.sa_family != AF_LOCAL ) { --#endif /* LDAP_PF_LOCAL */ --#endif /* HAVE_GETADDRINFO */ -- --#ifdef SO_REUSEADDR -- /* enable address reuse */ -- tmp = 1; -- rc = setsockopt( l.sl_sd, SOL_SOCKET, SO_REUSEADDR, -- (char *) &tmp, sizeof(tmp) ); -- if ( rc == AC_SOCKET_ERROR ) { -- int err = sock_errno(); -- Debug( LDAP_DEBUG_ANY, -- "slapd(%ld): setsockopt(SO_REUSEADDR) failed errno=%d (%s)\n", -- (long) l.sl_sd, err, sock_errstr(err) ); -- } -+ case AF_LOCAL: -+ addrlen = sizeof(struct sockaddr_un); -+ break; - #endif -- --#ifdef HAVE_GETADDRINFO -- } /* sai->ai_family != AF_LOCAL */ -- if (!bind(l.sl_sd, sai->ai_addr, sai->ai_addrlen)) -+ } -+ -+ if (!bind(l.sl_sd, *sal, addrlen)) - break; - err = sock_errno(); - Debug( LDAP_DEBUG_ANY, "daemon: bind(%ld) failed errno=%d (%s)\n", -- (long) l.sl_sd, err, sock_errstr(err) ); -+ (long) l.sl_sd, err, sock_errstr(err) ); - tcp_close( l.sl_sd ); -- } while ((sai = sai->ai_next) != NULL); -+ sal++; -+ } /* while ( *sal != NULL ) */ - -- if (!sai) { -+ if ( *sal == NULL ) { - Debug( LDAP_DEBUG_ANY, "daemon: bind(%ld) failed\n", - (long) l.sl_sd, 0, 0 ); -+ slap_free_listener_addresses(psal); - return NULL; - } - -- switch ( sai->ai_family ) { --# ifdef LDAP_PF_LOCAL -- case AF_LOCAL: -- if ( chmod( (char *)sai->ai_addr, S_IRWXU ) < 0 ) { -+ switch ( (*sal)->sa_family ) { -+#ifdef LDAP_PF_LOCAL -+ case AF_LOCAL: { -+ char *addr = ((struct sockaddr_un *)*sal)->sun_path; -+ if ( chmod( addr, S_IRWXU ) < 0 ) { - int err = sock_errno(); - Debug( LDAP_DEBUG_ANY, "daemon: fchmod(%ld) failed errno=%d (%s)", -- (long) l.sl_sd, err, sock_errstr(err) ); -+ (long) l.sl_sd, err, sock_errstr(err) ); - tcp_close( l.sl_sd ); -+ slap_free_listener_addresses(psal); - return NULL; - } -- l.sl_name = ch_malloc( strlen((char *)sai->ai_addr) + sizeof("PATH=") ); -- sprintf( l.sl_name, "PATH=%s", sai->ai_addr ); -- break; --# endif /* LDAP_PF_LOCAL */ -+ l.sl_name = ch_malloc( strlen(addr) + sizeof("PATH=") ); -+ sprintf( l.sl_name, "PATH=%s", addr ); -+ } break; -+#endif /* LDAP_PF_LOCAL */ - - case AF_INET: { -+ char *s; -+#ifdef HAVE_GETADDRINFO - char addr[INET_ADDRSTRLEN]; -- inet_ntop( AF_INET, -- &((struct sockaddr_in *)sai->ai_addr)->sin_addr, -- addr, sizeof(addr) ); -- l.sl_name = ch_malloc( strlen(addr) + strlen(serv) + sizeof("IP=:") ); -- sprintf( l.sl_name, "IP=%s:%s", addr, serv ); -+ inet_ntop( AF_INET, &((struct sockaddr_in *)*sal)->sin_addr, -+ addr, sizeof(addr) ); -+ s = addr; -+#else -+ s = inet_ntoa( l.sl_addr.sin_addr ); -+#endif -+ l.sl_name = ch_malloc( sizeof("IP=255.255.255.255:65535") ); -+ sprintf( l.sl_name, "IP=%s:%d", -+ s != NULL ? s : "unknown" , port ); - } break; - --# ifdef LDAP_PF_INET6 -+#ifdef LDAP_PF_INET6 - case AF_INET6: { - char addr[INET6_ADDRSTRLEN]; -- inet_ntop( AF_INET6, -- &((struct sockaddr_in6 *)sai->ai_addr)->sin6_addr, -- addr, sizeof addr); -- l.sl_name = ch_malloc( strlen(addr) + strlen(serv) + sizeof("IP= ") ); -- sprintf( l.sl_name, "IP=%s %s", addr, serv ); -+ inet_ntop( AF_INET6, &((struct sockaddr_in6 *)*sal)->sin6_addr, -+ addr, sizeof addr); -+ l.sl_name = ch_malloc( strlen(addr) + sizeof("IP= 65535") ); -+ sprintf( l.sl_name, "IP=%s %d", addr, port ); - } break; --# endif /* LDAP_PF_INET6 */ -+#endif /* LDAP_PF_INET6 */ - - default: - Debug( LDAP_DEBUG_ANY, "daemon: unsupported address family (%d)\n", -- (int) sai->ai_family, 0, 0 ); -+ (int) (*sal)->sa_family, 0, 0 ); - break; - } --#else --#ifdef LDAP_PF_LOCAL -- /* close conditional */ -- } --#endif /* LDAP_PF_LOCAL */ -- -- switch ( l.sl_sa.sa_addr.sa_family ) { --#ifdef LDAP_PF_LOCAL -- case AF_LOCAL: -- rc = bind( l.sl_sd, (struct sockaddr *)&l.sl_sa, -- sizeof(l.sl_sa.sa_un_addr) ); -- break; --#endif -- -- case AF_INET: -- rc = bind( l.sl_sd, (struct sockaddr *)&l.sl_sa, -- sizeof(l.sl_sa.sa_in_addr) ); -- break; - -- default: -- rc = AC_SOCKET_ERROR; -- errno = EINVAL; -- break; -- } -- -- if ( rc == AC_SOCKET_ERROR ) { -- int err = sock_errno(); -- Debug( LDAP_DEBUG_ANY, "daemon: bind(%ld) failed errno=%d (%s)\n", -- (long) l.sl_sd, err, sock_errstr(err) ); -- tcp_close( l.sl_sd ); -- return NULL; -- } -- -- switch ( l.sl_sa.sa_addr.sa_family ) { --#ifdef LDAP_PF_LOCAL -- case AF_LOCAL: -- if ( chmod( l.sl_sa.sa_un_addr.sun_path, S_IRWXU ) < 0 ) { -- int err = sock_errno(); -- Debug( LDAP_DEBUG_ANY, -- "daemon: chmod(%ld) failed errno=%d (%s)", -- (long) l.sl_sd, err, sock_errstr(err) ); -- tcp_close( l.sl_sd ); -- return NULL; -- } -- -- l.sl_name = ch_malloc( strlen(l.sl_sa.sa_un_addr.sun_path) -- + sizeof("PATH=") ); -- sprintf( l.sl_name, "PATH=%s", l.sl_sa.sa_un_addr.sun_path ); -- break; --#endif /* LDAP_PF_LOCAL */ -- -- case AF_INET: -- l.sl_name = ch_malloc( sizeof("IP=255.255.255.255:65336") ); -- s = inet_ntoa( l.sl_addr.sin_addr ); -- sprintf( l.sl_name, "IP=%s:%d", -- s != NULL ? s : "unknown" , port ); -- break; -- -- default: -- l.sl_name = ch_strdup( "UNKNOWN" ); -- break; -- } -- --#endif /* HAVE_GETADDRINFO */ -+ slap_free_listener_addresses(psal); - - l.sl_url = ch_strdup( url ); - li = ch_malloc( sizeof( Listener ) ); -@@ -608,7 +675,7 @@ - slap_listeners = ch_malloc( (i+1)*sizeof(Listener *) ); - - for(i = 0; u[i] != NULL; i++ ) { -- slap_listeners[i] = open_listener( u[i] ); -+ slap_listeners[i] = slap_open_listener( u[i] ); - - if( slap_listeners[i] == NULL ) { - charray_free( u ); -@@ -642,7 +709,6 @@ - void *ptr - ) - { -- int rc, tmp; - int l; - time_t last_idle_check = slap_get_time(); - time( &starttime ); -@@ -651,7 +717,7 @@ - if ( slap_listeners[l]->sl_sd == AC_SOCKET_INVALID ) - continue; - -- if ( listen( slap_listeners[l]->sl_sd, 5 ) == -1 ) { -+ if ( listen( slap_listeners[l]->sl_sd, SLAPD_LISTEN ) == -1 ) { - int err = sock_errno(); - Debug( LDAP_DEBUG_ANY, - "daemon: listen(%s, 5) failed errno=%d (%s)\n", -@@ -814,7 +880,7 @@ - } - - for ( l = 0; slap_listeners[l] != NULL; l++ ) { -- ber_int_t s; -+ ber_socket_t s; - socklen_t len = sizeof(from); - long id; - slap_ssf_t ssf = 0; -@@ -860,31 +926,6 @@ - } - #endif - --#ifdef SO_KEEPALIVE -- /* enable keep alives */ -- rc = setsockopt( s, SOL_SOCKET, SO_KEEPALIVE, -- (char *) &tmp, sizeof(tmp) ); -- if ( rc == AC_SOCKET_ERROR ) { -- int err = sock_errno(); -- Debug( LDAP_DEBUG_ANY, -- "slapd(%ld): setsockopt(SO_KEEPALIVE) failed " -- "errno=%d (%s)\n", (long) s, err, sock_errstr(err) ); -- } --#endif --#ifdef TCP_NODELAY -- /* enable no delay */ -- tmp = 1; -- rc = setsockopt( s, IPPROTO_TCP, TCP_NODELAY, -- (char *)&tmp, sizeof(tmp) ); -- if ( rc == AC_SOCKET_ERROR ) { -- int err = sock_errno(); -- Debug( LDAP_DEBUG_ANY, -- "slapd(%ld): setsockopt(TCP_NODELAY) failed " -- "errno=%d (%s)\n", (long) s, err, sock_errstr(err) ); -- } --#endif -- -- - #ifdef LDAP_DEBUG - ldap_pvt_thread_mutex_lock( &slap_daemon.sd_mutex ); - -@@ -896,20 +937,44 @@ - ldap_pvt_thread_mutex_unlock( &slap_daemon.sd_mutex ); - #endif - -+#if defined( SO_KEEPALIVE ) || defined( TCP_NODELAY ) -+#ifdef LDAP_PF_LOCAL -+ /* for IPv4 and IPv6 sockets only */ -+ if ( from.sa_addr.sa_family != AF_LOCAL ) -+#endif /* LDAP_PF_LOCAL */ -+ { -+ int rc; -+ int tmp; -+#ifdef SO_KEEPALIVE -+ /* enable keep alives */ -+ tmp = 1; -+ rc = setsockopt( s, SOL_SOCKET, SO_KEEPALIVE, -+ (char *) &tmp, sizeof(tmp) ); -+ if ( rc == AC_SOCKET_ERROR ) { -+ int err = sock_errno(); -+ Debug( LDAP_DEBUG_ANY, -+ "slapd(%ld): setsockopt(SO_KEEPALIVE) failed " -+ "errno=%d (%s)\n", (long) s, err, sock_errstr(err) ); -+ } -+#endif -+#ifdef TCP_NODELAY -+ /* enable no delay */ -+ tmp = 1; -+ rc = setsockopt( s, IPPROTO_TCP, TCP_NODELAY, -+ (char *)&tmp, sizeof(tmp) ); -+ if ( rc == AC_SOCKET_ERROR ) { -+ int err = sock_errno(); -+ Debug( LDAP_DEBUG_ANY, -+ "slapd(%ld): setsockopt(TCP_NODELAY) failed " -+ "errno=%d (%s)\n", (long) s, err, sock_errstr(err) ); -+ } -+#endif -+ } -+#endif -+ - Debug( LDAP_DEBUG_CONNS, "daemon: new connection on %ld\n", - (long) s, 0, 0 ); - -- len = sizeof(from); -- -- if ( getpeername( s, (struct sockaddr *) &from, &len ) != 0 ) { -- int err = sock_errno(); -- Debug( LDAP_DEBUG_ANY, -- "daemon: getpeername( %ld ) failed: errno=%d (%s)\n", -- (long) s, err, sock_errstr(err) ); -- slapd_close(s); -- continue; -- } -- - switch ( from.sa_addr.sa_family ) { - # ifdef LDAP_PF_LOCAL - case AF_LOCAL: -@@ -948,6 +1013,7 @@ - slapd_close(s); - continue; - } -+ - if ( ( from.sa_addr.sa_family == AF_INET ) - #ifdef LDAP_PF_INET6 - || ( from.sa_addr.sa_family == AF_INET6 ) -@@ -961,7 +1027,7 @@ - sizeof(from.sa_in6_addr.sin6_addr), - AF_INET6 ); - else --# endif LDAP_PF_INET6 -+# endif /* LDAP_PF_INET6 */ - hp = gethostbyaddr( - (char *) &(from.sa_in_addr.sin_addr), - sizeof(from.sa_in_addr.sin_addr), -@@ -1202,23 +1268,25 @@ - connections_init(); - - #define SLAPD_LISTENER_THREAD 1 --#if defined( SLAPD_LISTENER_THREAD ) || !defined(HAVE_PTHREADS) -+#if defined( SLAPD_LISTENER_THREAD ) -+ { -+ ldap_pvt_thread_t listener_tid; - -- /* listener as a separate THREAD */ -- rc = ldap_pvt_thread_create( &listener_tid, -- 0, slapd_daemon_task, NULL ); -+ /* listener as a separate THREAD */ -+ rc = ldap_pvt_thread_create( &listener_tid, -+ 0, slapd_daemon_task, NULL ); - -- if ( rc != 0 ) { -- Debug( LDAP_DEBUG_ANY, -- "listener ldap_pvt_thread_create failed (%d)\n", rc, 0, 0 ); -- return rc; -- } -+ if ( rc != 0 ) { -+ Debug( LDAP_DEBUG_ANY, -+ "listener ldap_pvt_thread_create failed (%d)\n", rc, 0, 0 ); -+ return rc; -+ } - -- /* wait for the listener thread to complete */ -- ldap_pvt_thread_join( listener_tid, (void *) NULL ); -+ /* wait for the listener thread to complete */ -+ ldap_pvt_thread_join( listener_tid, (void *) NULL ); -+ } - #else -- /* expermimental code */ -- listener_tid = pthread_self(); -+ /* experimental code */ - slapd_daemon_task( NULL ); - #endif - -@@ -1307,4 +1375,9 @@ - - /* reinstall self */ - (void) SIGNAL_REINSTALL( sig, slap_sig_wake ); -+} -+ -+ -+void slapd_add_internal(ber_socket_t s) { -+ slapd_add(s); - } diff --git a/net/openldap23-server/files/patch-servers_slapd_schema b/net/openldap23-server/files/patch-servers_slapd_schema deleted file mode 100644 index 31969e8bb621..000000000000 --- a/net/openldap23-server/files/patch-servers_slapd_schema +++ /dev/null @@ -1,20 +0,0 @@ ---- servers/slapd/schema/krb5-kdc.schema.orig Tue Sep 5 13:28:34 2000 -+++ servers/slapd/schema/krb5-kdc.schema Mon Oct 30 13:09:19 2000 -@@ -96,7 +96,7 @@ - attributetype ( 1.3.6.1.4.1.5322.10.1.10 - NAME 'krb5Key' - DESC 'Encoded ASN1 Key as an octet string' -- SYNTAX 1.3.6.1.4.1.1466.115.121.1.5 ) -+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 ) - - attributetype ( 1.3.6.1.4.1.5322.10.1.11 - NAME 'krb5PrincipalRealm' -@@ -112,7 +112,7 @@ - - objectclass ( 1.3.6.1.4.1.5322.10.2.1 - NAME 'krb5Principal' -- SUP top -+ SUP person - AUXILIARY - MUST ( krb5PrincipalName ) - MAY ( cn $ krb5PrincipalRealm ) ) diff --git a/net/openldap23-server/files/slapd.sh b/net/openldap23-server/files/slapd.sh deleted file mode 100644 index 1704074b7968..000000000000 --- a/net/openldap23-server/files/slapd.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -slapd=@@PREFIX@@/libexec/slapd -pidfile=/var/run/slapd.pid - -case "$1" in -start) - if [ -x $slapd ]; then - echo -n ' slapd' - $slapd - fi - ;; -stop) - if [ -f $pidfile ]; then - kill `cat $pidfile` - telnet localhost ldap </dev/null >/dev/null 2>&1 - echo -n ' slapd' - rm $pidfile - else - echo ' slapd: not running' - fi - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - exit 64 - ;; -esac - -exit 0 diff --git a/net/openldap23-server/pkg-comment b/net/openldap23-server/pkg-comment deleted file mode 100644 index 8c499c3923cf..000000000000 --- a/net/openldap23-server/pkg-comment +++ /dev/null @@ -1 +0,0 @@ -Open source LDAP client and server software diff --git a/net/openldap23-server/pkg-descr b/net/openldap23-server/pkg-descr deleted file mode 100644 index aec3ae0f7cf4..000000000000 --- a/net/openldap23-server/pkg-descr +++ /dev/null @@ -1,12 +0,0 @@ -OpenLDAP is a suite of Lightweight Directory Access Protocol (LDAP) servers, -clients, utilities and development tools. LDAP is an Internet standard -directory service protocol that can be used stand-alone, or as a front end -to an X.500 directory. LDAP is defined by RFCs 1777 through 1779. - -OpenLDAP is derived from the University of Michigan LDAP release 3.3 and is -distributed under an open source license. - -WWW: http://www.openldap.org/ - -Lachlan O'Dea -ulmo@earthling.net diff --git a/net/openldap23-server/pkg-plist b/net/openldap23-server/pkg-plist deleted file mode 100644 index 764525594e11..000000000000 --- a/net/openldap23-server/pkg-plist +++ /dev/null @@ -1,91 +0,0 @@ -bin/ldapadd -bin/ldapdelete -bin/ldapmodify -bin/ldapmodrdn -bin/ldappasswd -bin/ldapsearch -bin/ud -@unexec if cmp -s %D/etc/openldap/ldap.conf %D/etc/openldap/ldap.conf.default; then rm -f %D/etc/openldap/ldap.conf; fi -etc/openldap/ldap.conf.default -@exec [ ! -f %B/ldap.conf ] && cp %B/%f %B/ldap.conf -@unexec if cmp -s %D/etc/openldap/ldapfilter.conf %D/etc/openldap/ldapfilter.conf.default; then rm -f %D/etc/openldap/ldapfilter.conf; fi -etc/openldap/ldapfilter.conf.default -@exec [ ! -f %B/ldapfilter.conf ] && cp %B/%f %B/ldapfilter.conf -@unexec if cmp -s %D/etc/openldap/ldapsearchprefs.conf %D/etc/openldap/ldapsearchprefs.conf.default; then rm -f %D/etc/openldap/ldapsearchprefs.conf; fi -etc/openldap/ldapsearchprefs.conf.default -@exec [ ! -f %B/ldapsearchprefs.conf ] && cp %B/%f %B/ldapsearchprefs.conf -@unexec if cmp -s %D/etc/openldap/ldaptemplates.conf %D/etc/openldap/ldaptemplates.conf.default; then rm -f %D/etc/openldap/ldaptemplates.conf; fi -etc/openldap/ldaptemplates.conf.default -@exec [ ! -f %B/ldaptemplates.conf ] && cp %B/%f %B/ldaptemplates.conf -@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi -etc/openldap/slapd.conf.default -@exec [ ! -f %B/slapd.conf ] && cp %B/%f %B/slapd.conf -@unexec if cmp -s %D/etc/openldap/schema/corba.schema %D/etc/openldap/schema/corba.schema.default; then rm -f %D/etc/openldap/schema/corba.schema; fi -etc/openldap/schema/corba.schema.default -@exec [ ! -f %B/schema/corba.schema ] && cp %B/%f %B/schema/corba.schema -@unexec if cmp -s %D/etc/openldap/schema/core.schema %D/etc/openldap/schema/core.schema.default; then rm -f %D/etc/openldap/schema/core.schema; fi -etc/openldap/schema/core.schema.default -@exec [ ! -f %B/schema/core.schema ] && cp %B/%f %B/schema/core.schema -@unexec if cmp -s %D/etc/openldap/schema/cosine.schema %D/etc/openldap/schema/cosine.schema.default; then rm -f %D/etc/openldap/schema/cosine.schema; fi -etc/openldap/schema/cosine.schema.default -@exec [ ! -f %B/schema/cosine.schema ] && cp %B/%f %B/schema/cosine.schema -@unexec if cmp -s %D/etc/openldap/schema/inetorgperson.schema %D/etc/openldap/schema/inetorgperson.schema.default; then rm -f %D/etc/openldap/schema/inetorgperson.schema; fi -etc/openldap/schema/inetorgperson.schema.default -@exec [ ! -f %B/schema/inetorgperson.schema ] && cp %B/%f %B/schema/inetorgperson.schema -@unexec if cmp -s %D/etc/openldap/schema/java.schema %D/etc/openldap/schema/java.schema.default; then rm -f %D/etc/openldap/schema/java.schema; fi -etc/openldap/schema/java.schema.default -@exec [ ! -f %B/schema/java.schema ] && cp %B/%f %B/schema/java.schema -@unexec if cmp -s %D/etc/openldap/schema/krb5-kdc.schema %D/etc/openldap/schema/krb5-kdc.schema.default; then rm -f %D/etc/openldap/schema/krb5-kdc.schema; fi -etc/openldap/schema/krb5-kdc.schema.default -@exec [ ! -f %B/schema/krb5-kdc.schema ] && cp %B/%f %B/schema/krb5-kdc.schema -@unexec if cmp -s %D/etc/openldap/schema/misc.schema %D/etc/openldap/schema/misc.schema.default; then rm -f %D/etc/openldap/schema/misc.schema; fi -etc/openldap/schema/misc.schema.default -@exec [ ! -f %B/schema/misc.schema ] && cp %B/%f %B/schema/misc.schema -@unexec if cmp -s %D/etc/openldap/schema/nadf.schema %D/etc/openldap/schema/nadf.schema.default; then rm -f %D/etc/openldap/schema/nadf.schema; fi -etc/openldap/schema/nadf.schema.default -@exec [ ! -f %B/schema/nadf.schema ] && cp %B/%f %B/schema/nadf.schema -@unexec if cmp -s %D/etc/openldap/schema/nis.schema %D/etc/openldap/schema/nis.schema.default; then rm -f %D/etc/openldap/schema/nis.schema; fi -etc/openldap/schema/nis.schema.default -@exec [ ! -f %B/schema/nis.schema ] && cp %B/%f %B/schema/nis.schema -@unexec if cmp -s %D/etc/openldap/schema/openldap.schema %D/etc/openldap/schema/openldap.schema.default; then rm -f %D/etc/openldap/schema/openldap.schema; fi -etc/openldap/schema/openldap.schema.default -@exec [ ! -f %B/schema/openldap.schema ] && cp %B/%f %B/schema/openldap.schema -@dirrm etc/openldap/schema -@dirrm etc/openldap -etc/rc.d/slapd.sh.sample -include/disptmpl.h -include/lber.h -include/lber_types.h -include/ldap.h -include/ldap_cdefs.h -include/ldap_features.h -include/ldap_schema.h -include/srchpref.h -lib/liblber.a -lib/liblber.so -lib/liblber.so.2 -lib/libldap.a -lib/libldap.so -lib/libldap.so.2 -lib/libldap_r.a -lib/libldap_r.so -lib/libldap_r.so.2 -libexec/fax500 -libexec/go500 -libexec/go500gw -libexec/in.xfingerd -libexec/mail500 -libexec/maildap -libexec/rcpt500 -libexec/rp500 -libexec/slapd -libexec/slurpd -libexec/xrpcomp -sbin/slapadd -sbin/slapcat -sbin/slapindex -sbin/slappasswd -share/openldap/go500gw.help -share/openldap/ldapfriendly -share/openldap/rcpt500.help -@dirrm share/openldap |