I noticed that the "IdentityCheck" feature didn't work with yesterdays
snapshot (httpd-2.0_20011019161216.tar.gz), although the same setup
works with apache-1.3.9. The returned userid is always "nobody".
Looking at the code shows that the first port number sent to identd is
always 113, which looks very strange. With the patch attached below,
IdentityCheck works again for me.

-- 
Dick Streefland                    ////               De Bilt
[EMAIL PROTECTED]         (@ @)       The Netherlands
------------------------------oOO--(_)--OOo------------------

--- httpd-2.0/server/rfc1413.c.orig     Thu Jul 19 00:12:15 2001
+++ httpd-2.0/server/rfc1413.c  Sat Oct 20 23:06:59 2001
@@ -195,11 +195,9 @@
     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,

Reply via email to