mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-02 13:09:42 -05:00
ITS#44 fix. denied connections should not be added to connections.
This commit is contained in:
parent
8009e591ce
commit
15fb73a473
1 changed files with 8 additions and 8 deletions
|
|
@ -260,14 +260,9 @@ slapd_daemon(
|
|||
"FIONBIO ioctl on %d failed\n", ns, 0, 0 );
|
||||
}
|
||||
|
||||
c[ns].c_sb.sb_sd = ns;
|
||||
Debug( LDAP_DEBUG_CONNS, "new connection on %d\n", ns,
|
||||
0, 0 );
|
||||
|
||||
pthread_mutex_lock( &ops_mutex );
|
||||
c[ns].c_connid = num_conns++;
|
||||
pthread_mutex_unlock( &ops_mutex );
|
||||
|
||||
len = sizeof(from);
|
||||
|
||||
if ( getpeername( ns, (struct sockaddr *) &from, &len )
|
||||
|
|
@ -307,9 +302,9 @@ slapd_daemon(
|
|||
STRING_UNKNOWN))
|
||||
{
|
||||
/* DENY ACCESS */
|
||||
Statslog( LDAP_DEBUG_STATS,
|
||||
"conn=%d fd=%d connection from %s (%s) denied.\n",
|
||||
c[ns].c_connid, ns,
|
||||
Statslog( LDAP_DEBUG_ANY,
|
||||
"fd=%d connection from %s (%s) denied.\n",
|
||||
ns,
|
||||
client_name == NULL ? "unknown" : client_name,
|
||||
client_addr == NULL ? "unknown" : client_addr,
|
||||
0 );
|
||||
|
|
@ -320,6 +315,11 @@ slapd_daemon(
|
|||
}
|
||||
#endif /* HAVE_TCPD */
|
||||
|
||||
c[ns].c_sb.sb_sd = ns;
|
||||
pthread_mutex_lock( &ops_mutex );
|
||||
c[ns].c_connid = num_conns++;
|
||||
pthread_mutex_unlock( &ops_mutex );
|
||||
|
||||
Statslog( LDAP_DEBUG_STATS,
|
||||
"conn=%d fd=%d connection from %s (%s) accepted.\n",
|
||||
c[ns].c_connid, ns,
|
||||
|
|
|
|||
Loading…
Reference in a new issue