From 17433a84123814f3735c9bf3ca3e4b329d274e0f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 11 Apr 2002 10:04:29 +0000 Subject: [PATCH] Fix ITS#1722 - IPv4 addresses also need to be massaged for sasl_server_new. --- servers/slapd/sasl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index ce037a693f..bc75463834 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -755,6 +755,8 @@ int slap_sasl_open( Connection *conn ) iplocalport = ch_strdup( conn->c_sock_name.bv_val + 3 ); /* Convert IPv6 addresses to address;port syntax. */ p = strrchr( iplocalport, ' ' ); + /* Convert IPv4 addresses to address;port syntax. */ + if ( p != NULL ) p = strchr( iplocalport, ':' ); if ( p != NULL ) { *p = ';'; } @@ -766,6 +768,8 @@ int slap_sasl_open( Connection *conn ) ipremoteport = ch_strdup( conn->c_peer_name.bv_val + 3 ); /* Convert IPv6 addresses to address;port syntax. */ p = strrchr( ipremoteport, ' ' ); + /* Convert IPv4 addresses to address;port syntax. */ + if ( p != NULL ) p = strchr( ipremoteport, ':' ); if ( p != NULL ) { *p = ';'; } -- 2.39.5