include $(TOPDIR)/rules.mk
PKG_NAME:=openldap
-PKG_VERSION:=2.4.16
+PKG_VERSION:=2.4.19
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/openldap-release/ \
ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ \
ftp://ftp.plig.org/pub/OpenLDAP/openldap-release/
-PKG_MD5SUM:=ed5b86e9d2b372d10edfe3bb59fee165
+PKG_MD5SUM:=4a6dab2711fcf141f19bb680bc335887
PKG_FIXUP = libtool
endef
define Package/libopenldap/description
-=
OpenLDAP Software is an open source implementation of the
Lightweight Directory Access Protocol (LDAP).
This package contains the shared LDAP client libraries, needed by other programs.
endef
define Package/openldap-utils/description
-=
OpenLDAP Software is an open source implementation of the
Lightweight Directory Access Protocol (LDAP).
This package contains client programs required to access LDAP servers.
endef
+define Package/openldap-server
+ $(call Package/openldap/Default)
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+libopenldap +db47
+ TITLE+= (server)
+endef
+
+define Package/openldap-server/description
+ OpenLDAP Software is an open source implementation of the
+ Lightweight Directory Access Protocol (LDAP).
+ This package contains server programs required to provide LDAP services.
+endef
+
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-dynamic \
--enable-syslog \
--disable-local \
- --disable-slapd \
--disable-slurpd \
--with-cyrus-sasl \
--without-fetch \
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
endef
+
+define Package/openldap-server/install
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/ldap.init $(1)/etc/init.d/ldap
+ $(INSTALL_DIR) $(1)/etc/openldap/schema
+ $(CP) $(PKG_INSTALL_DIR)/etc/openldap/schema/* $(1)/etc/openldap/schema/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ # OpenLDAP installs slapd into libexecdir, not sbindir:
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/slapd $(1)/usr/sbin/
+endef
$(eval $(call BuildPackage,libopenldap))
$(eval $(call BuildPackage,openldap-utils))
+$(eval $(call BuildPackage,openldap-server))
--- /dev/null
+diff -u --recursive openldap-2.4.19-vanilla/servers/slapd/connection.c openldap-2.4.19/servers/slapd/connection.c
+--- openldap-2.4.19-vanilla/servers/slapd/connection.c 2009-11-17 19:04:26.000000000 -0500
++++ openldap-2.4.19/servers/slapd/connection.c 2009-11-17 19:09:02.000000000 -0500
+@@ -783,7 +783,9 @@
+ {
+ assert( connections != NULL );
+ assert( c != NULL );
+- assert( c->c_struct_state == SLAP_C_USED );
++
++ if ( c->c_struct_state != SLAP_C_USED ) return;
++
+ assert( c->c_conn_state != SLAP_C_INVALID );
+
+ /* c_mutex must be locked by caller */
+@@ -816,7 +818,9 @@
+ {
+ assert( connections != NULL );
+ assert( c != NULL );
+- assert( c->c_struct_state == SLAP_C_USED );
++
++ if ( c->c_struct_state != SLAP_C_USED ) return;
++
+ assert( c->c_conn_state == SLAP_C_CLOSING );
+
+ /* NOTE: c_mutex should be locked by caller */
+diff -u --recursive openldap-2.4.19-vanilla/servers/slapd/daemon.c openldap-2.4.19/servers/slapd/daemon.c
+--- openldap-2.4.19-vanilla/servers/slapd/daemon.c 2009-11-17 19:04:26.000000000 -0500
++++ openldap-2.4.19/servers/slapd/daemon.c 2009-11-17 19:10:54.000000000 -0500
+@@ -989,13 +989,17 @@
+ void
+ slapd_set_read( ber_socket_t s, int wake )
+ {
++ int do_wake = 1;
+ ldap_pvt_thread_mutex_lock( &slap_daemon.sd_mutex );
+
+- assert( SLAP_SOCK_IS_ACTIVE( s ));
+- if (!SLAP_SOCK_IS_READ( s )) SLAP_SOCK_SET_READ( s );
+-
++ if( SLAP_SOCK_IS_ACTIVE( s ) && !SLAP_SOCK_IS_READ( s )) {
++ SLAP_SOCK_SET_READ( s );
++ } else {
++ do_wake = 0;
++ }
+ ldap_pvt_thread_mutex_unlock( &slap_daemon.sd_mutex );
+- WAKE_LISTENER(wake);
++ if ( do_wake )
++ WAKE_LISTENER(wake);
+ }
+
+ time_t