fix previous commit

This commit is contained in:
Pierangelo Masarati 2006-10-15 18:24:30 +00:00
parent b6525c14d9
commit 8567ce8eed

View file

@ -1315,20 +1315,28 @@ slap_open_listener(
#endif /* LOCAL_CREDS */
addrlen = sizeof( struct sockaddr_un );
break;
#endif /* LDAP_PF_LOCAL */
}
#ifdef LDAP_PF_LOCAL
/* create socket with all permissions set for those systems
* that honor permissions on sockets (e.g. Linux); typically,
* only write is required. To exploit filesystem permissions,
* place the socket in a directory and use directory's
* permissions. Need write perms to the directory to
* create/unlink the socket; likely need exec perms to access
* the socket */
* the socket (ITS#4709) */
{
mode_t old_umask;
old_umask = umask( 0 );
#endif /* LDAP_PF_LOCAL */
rc = bind( l.sl_sd, *sal, addrlen );
#ifdef LDAP_PF_LOCAL
umask( old_umask );
}
#endif /* LDAP_PF_LOCAL */
if ( rc ) {
err = sock_errno();
Debug( LDAP_DEBUG_ANY,
@ -1338,10 +1346,6 @@ slap_open_listener(
sal++;
continue;
}
}
break;
#endif /* LDAP_PF_LOCAL */
}
switch ( (*sal)->sa_family ) {
#ifdef LDAP_PF_LOCAL