]> git.sur5r.net Git - openldap/commitdiff
apparently accept() doesn't fill the sun_path field of the peer socket; hack it
authorPierangelo Masarati <ando@openldap.org>
Sat, 3 Apr 2004 18:48:03 +0000 (18:48 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 3 Apr 2004 18:48:03 +0000 (18:48 +0000)
servers/slapd/daemon.c

index 97556de00e0aa2ccae56dde3a0cf399c7f184b60..b0d0f0d77673ad0d474753963717f742f102c892 100644 (file)
@@ -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;
                                {