Date: Thu, 17 Feb 2000 17:15:23 +0000 From: Ben Smithurst <ben@scientia.demon.co.uk> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/16789: fingerd logging not IPv6 aware Message-ID: <E12LUWR-0001dk-00@platinum.scientia.demon.co.uk>
next in thread | raw e-mail | index | archive | help
>Number: 16789 >Category: bin >Synopsis: fingerd logging not IPv6 aware >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 17 10:00:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Ben Smithurst >Release: FreeBSD 4.0-CURRENT i386 >Organization: >Environment: >Description: fingerd's -l option is not IPv6 aware, which can cause problems attempting to obtain the hostname for an IPv6 connection. >How-To-Repeat: change "tcp" to "tcp46" on the "finger" line in /etc/inetd.conf, add fingerd's -l option, and connect to the finger service via an IPv6 address. >Fix: simple patch, may not be perfect: diff -ur fingerd.orig/fingerd.c fingerd/fingerd.c --- fingerd.orig/fingerd.c Sat Aug 28 01:09:28 1999 +++ fingerd/fingerd.c Thu Feb 17 17:07:26 2000 @@ -70,7 +70,7 @@ register FILE *fp; register int ch; register char *lp; - struct sockaddr_in sin; + struct sockaddr_storage sin; int p[2], logging, secure, sval; #define ENTRIES 50 char **ap, *av[ENTRIES + 1], **comp, line[1024], *prog; @@ -130,7 +130,8 @@ sval = sizeof(sin); if (getpeername(0, (struct sockaddr *)&sin, &sval) < 0) logerr("getpeername: %s", strerror(errno)); - realhostname(rhost, sizeof rhost - 1, &sin.sin_addr); + realhostname_sa(rhost, sizeof rhost - 1, + (struct sockaddr *)&sin, sval); rhost[sizeof(rhost) - 1] = '\0'; syslog(LOG_NOTICE, "query from %s: `%s'", rhost, t); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E12LUWR-0001dk-00>