From owner-freebsd-stable Fri Jun 7 10: 6:46 2002 Delivered-To: freebsd-stable@freebsd.org Received: from cc.tpu.edu.ru (CyberNet.tpu.edu.ru [195.208.174.18]) by hub.freebsd.org (Postfix) with ESMTP id 18BD237B406 for ; Fri, 7 Jun 2002 10:06:32 -0700 (PDT) Received: from phoenix (dump.cctpu.edu.ru [195.208.174.224]) by cc.tpu.edu.ru (8.11.3/8.11.3) with ESMTP id g57H4bf74849 for ; Sat, 8 Jun 2002 01:04:37 +0800 (TSD) (envelope-from sergey@cc.tpu.edu.ru) Date: Sat, 8 Jun 2002 01:07:10 +0800 From: Sergey Zorin X-Mailer: The Bat! (v1.53d) Reply-To: Sergey Zorin X-Priority: 3 (Normal) Message-ID: <31-1516819371.20020608010710@cc.tpu.edu.ru> To: freebsd-stable@freebsd.org Subject: the -U option of telnetd does not work MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, When telnetd starts with -U option it does not refuse connection from addresses not resolved back to name, i.e. this option does not work. It seems that problem is in realhostname_sa function of libutil. Following patch is sufficient to fix this problem: (applied from src/lib/libutil) --- realhostname.c.orig Sat Jul 28 22:24:46 2001 +++ realhostname.c Fri Jun 7 19:28:41 2002 @@ -118,7 +118,7 @@ #endif error = getnameinfo(addr, addrlen, buf, sizeof(buf), NULL, 0, - NI_WITHSCOPEID); + NI_WITHSCOPEID|NI_NAMEREQD); if (error == 0) { struct addrinfo hints, *res, *ores; struct sockaddr *sa; -- Best regards, Sergey mailto:sergey@cc.tpu.edu.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message