Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2009 18:34:32 +0400
From:      pluknet <pluknet@gmail.com>
To:        Cristiano Deana <cristiano.deana@gmail.com>
Cc:        stable <stable@freebsd.org>, questions@freebsd.org
Subject:   Re: ftpd - Logging and resolving IP
Message-ID:  <a31046fc0907200734v6588f11i7129611d87c91c7b@mail.gmail.com>
In-Reply-To: <d8a4930a0907200552h59d371d1g3514deabfac5126e@mail.gmail.com>
References:  <d8a4930a0907200552h59d371d1g3514deabfac5126e@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/7/20 Cristiano Deana <cristiano.deana@gmail.com>:
> Hi,
>
> i use ftpd (base system), logging login, xfer, auth failure. What i
> need is to log the IP address of the client, not the hostname.
> I looked in ftpd(8) ma it seems it's not possible to disable the
> reverse resolution.
>
> Any idea?
>
> Thanks in advance
>

I hope it's still applicable.

--- libexec/tftpd/tftpd.c.orig  2007-11-09 06:13:22.000000000 +0300
+++ libexec/tftpd/tftpd.c       2007-11-09 06:13:49.000000000 +0300
@@ -487,7 +487,7 @@
                char hbuf[NI_MAXHOST];

                getnameinfo((struct sockaddr *)&from, from.ss_len,
-                           hbuf, sizeof(hbuf), NULL, 0, 0);
+                           hbuf, sizeof(hbuf), NULL, 0, NI_NUMERICHOST);
                syslog(LOG_INFO, "%s: %s request for %s: %s", hbuf,
                        tp->th_opcode == WRQ ? "write" : "read",
                        filename, errtomsg(ecode));

-- 
wbr,
pluknet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a31046fc0907200734v6588f11i7129611d87c91c7b>