]> git.sur5r.net Git - openldap/commitdiff
make sure sun_path is cleared out before accept()
authorPierangelo Masarati <ando@openldap.org>
Fri, 30 Jul 2004 09:56:22 +0000 (09:56 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 30 Jul 2004 09:56:22 +0000 (09:56 +0000)
servers/slapd/daemon.c

index cfa9873631974fa9a173abfb5735322991d9b6a2..fe85302d604caab6aeed859185f025851ff3c841 100644 (file)
@@ -1540,6 +1540,11 @@ slapd_daemon_task(
                        FD_CLR( slap_listeners[l]->sl_sd, &readfds );
                        FD_CLR( slap_listeners[l]->sl_sd, &writefds );
 
+#  ifdef LDAP_PF_LOCAL
+                       /* FIXME: apparently accept doesn't fill
+                        * the sun_path sun_path member */
+                       from.sa_un_addr.sun_path[0] = '\0';
+#  endif /* LDAP_PF_LOCAL */
                        s = accept( slap_listeners[l]->sl_sd,
                                (struct sockaddr *) &from, &len );
                        if ( s == AC_SOCKET_INVALID ) {