]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/daemon.c
add logs; fix bug in group/dn selection logic
[openldap] / servers / slapd / daemon.c
index d98ca7fe7bf6cf0bcf73086c104aa870fad1d359..d7257eaffc29940f69a12ac82d958a11b05cd9ae 100644 (file)
@@ -83,9 +83,6 @@ static int waking;
 do { if (w) tcp_write( wake_sds[1], "0", 1 ); } while(0)
 #endif
 
-#ifndef HAVE_WINSOCK
-static
-#endif
 volatile sig_atomic_t slapd_shutdown = 0, slapd_gentle_shutdown = 0;
 volatile sig_atomic_t slapd_abrupt_shutdown = 0;
 
@@ -1493,7 +1490,7 @@ slapd_daemon_task(
                        socklen_t len = sizeof(from);
                        long id;
                        slap_ssf_t ssf = 0;
-                       struct berval authid = { 0, NULL };
+                       struct berval authid = BER_BVNULL;
 #ifdef SLAPD_RLOOKUPS
                        char hbuf[NI_MAXHOST];
 #endif
@@ -1663,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;
                                {