From: Quanah Gibson-Mount Date: Tue, 20 May 2008 02:05:30 +0000 (+0000) Subject: ITS#5507 X-Git-Tag: OPENLDAP_REL_ENG_2_4_10~38 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f29f2aaaa8117a8e7162660019a9d1b28c5edae5;p=openldap ITS#5507 --- diff --git a/CHANGES b/CHANGES index 9b0f7969af..d2857b67aa 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ OpenLDAP 2.4 Change Log OpenLDAP 2.4.10 Engineering + Fixed libldap file descriptor leak with SELinux (ITS#5507) Fixed slapd missing termination of integerFilter keys (ITS#5503) Fixed slapd-ldap entry_get() op-dependent behavior (ITS#5513) Fixed slapo-syncprov csn update with delta-syncrepl (ITS#5493) diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index e854535432..b70d60dda2 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -36,6 +36,9 @@ #ifdef HAVE_IO_H #include #endif /* HAVE_IO_H */ +#ifdef HAVE_FCNTL_H +#include +#endif #include "ldap-int.h" @@ -110,6 +113,9 @@ ldap_int_socket(LDAP *ld, int family, int type ) { ber_socket_t s = socket(family, type, 0); osip_debug(ld, "ldap_new_socket: %d\n",s,0,0); +#ifdef FD_CLOEXEC + fcntl(s, F_SETFD, FD_CLOEXEC); +#endif return ( s ); } diff --git a/libraries/libldap/os-local.c b/libraries/libldap/os-local.c index 70f948de19..0f3c1ee34d 100644 --- a/libraries/libldap/os-local.c +++ b/libraries/libldap/os-local.c @@ -47,6 +47,9 @@ #ifdef HAVE_IO_H #include #endif /* HAVE_IO_H */ +#ifdef HAVE_FCNTL_H +#include +#endif #include "ldap-int.h" #include "ldap_defaults.h" @@ -89,6 +92,9 @@ ldap_pvt_socket(LDAP *ld) { ber_socket_t s = socket(PF_LOCAL, SOCK_STREAM, 0); oslocal_debug(ld, "ldap_new_socket: %d\n",s,0,0); +#ifdef FD_CLOEXEC + fcntl(s, F_SETFD, FD_CLOEXEC); +#endif return ( s ); }