From: Pierangelo Masarati Date: Sat, 3 Apr 2004 18:48:03 +0000 (+0000) Subject: apparently accept() doesn't fill the sun_path field of the peer socket; hack it X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~158 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2387d2aff85170e16757e7ce2edb0b1f5675c9ed;p=openldap apparently accept() doesn't fill the sun_path field of the peer socket; hack it --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 97556de00e..b0d0f0d776 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -1660,6 +1660,14 @@ slapd_daemon_task( switch ( from.sa_addr.sa_family ) { # ifdef LDAP_PF_LOCAL case AF_LOCAL: + /* FIXME: apparently accept doesn't fill + * the sun_path sun_path member */ + if ( from.sa_un_addr.sun_path[0] == '\0' ) { + AC_MEMCPY( from.sa_un_addr.sun_path, + slap_listeners[l]->sl_sa.sa_un_addr.sun_path, + sizeof( from.sa_un_addr.sun_path ) ); + } + sprintf( peername, "PATH=%s", from.sa_un_addr.sun_path ); ssf = LDAP_PVT_SASL_LOCAL_SSF; {