From: Jeff Trawick Date: Mon, 22 Oct 2001 13:04:12 +0000 (+0000) Subject: Fix some bungling of the remote port in rfc1413.c so that X-Git-Tag: 2.0.27~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8074a4dc03724cafe74eabd918eb51fc8df6cb7c;p=thirdparty%2Fapache%2Fhttpd.git Fix some bungling of the remote port in rfc1413.c so that IdentityCheck retrieves the proper user id instead of failing and thus always returning "nobody." Submitted by: Dick Streefland Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91632 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index a942ac295ab..1ad9ee67a97 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,10 @@ Changes with Apache 2.0.27-dev + *) Fix some bungling of the remote port in rfc1413.c so that + IdentityCheck retrieves the proper user id instead of failing + and thus always returning "nobody." + [Dick Streefland ] + *) Introduced thread saftey for mod_rewrite's internal cache. [Brian Pane ] diff --git a/server/rfc1413.c b/server/rfc1413.c index 669c9e97c64..fd2e99c1597 100644 --- a/server/rfc1413.c +++ b/server/rfc1413.c @@ -195,11 +195,9 @@ static apr_status_t rfc1413_query(apr_socket_t *sock, conn_rec *conn, char buffer[RFC1413_MAXDATA + 1]; char user[RFC1413_USERLEN + 1]; /* XXX */ apr_size_t buflen; - apr_sockaddr_t *localsa; - apr_socket_addr_get(&localsa, APR_LOCAL, sock); - apr_sockaddr_port_get(&sav_our_port, localsa); - sav_rmt_port = RFC1413_PORT; + apr_sockaddr_port_get(&sav_our_port, conn->local_addr); + apr_sockaddr_port_get(&sav_rmt_port, conn->remote_addr); /* send the data */ buflen = apr_snprintf(buffer, sizeof(buffer), "%hu,%hu\r\n", sav_rmt_port,