X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fos-local.c;h=5ad819eccf08d9df006f3a645e85cd24b337614a;hb=49d73e12a720cfe052a335d82e67994ff261d21c;hp=df4196266f97ab475dc435d259a8219b7e5abdce;hpb=55dba4395f81f75ad8f247d3c0fad7119fe1ea9d;p=openldap diff --git a/libraries/libldap/os-local.c b/libraries/libldap/os-local.c index df4196266f..5ad819eccf 100644 --- a/libraries/libldap/os-local.c +++ b/libraries/libldap/os-local.c @@ -33,6 +33,7 @@ #endif /* HAVE_IO_H */ #include "ldap-int.h" +#include "ldap_defaults.h" /* int ldap_int_tblsize = 0; */ @@ -191,7 +192,7 @@ ldap_connect_to_path(LDAP *ld, Sockbuf *sb, const char *path, int async) } if ( path == NULL || path[0] == '\0' ) { - path = "/tmp/.ldap-sock"; + path = LDAPI_SOCK; } else { if ( strlen(path) > (sizeof( server.sun_path ) - 1) ) { ldap_pvt_set_errno( ENAMETOOLONG ); @@ -201,7 +202,7 @@ ldap_connect_to_path(LDAP *ld, Sockbuf *sb, const char *path, int async) oslocal_debug(ld, "ldap_connect_to_path: Trying %s\n", path, 0, 0); - memset( &server, 0, sizeof(server) ); + memset( &server, '\0', sizeof(server) ); server.sun_family = AF_UNIX; strcpy( server.sun_path, path );