From owner-cvs-all Sat Aug 24 10:37:47 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E419037B400; Sat, 24 Aug 2002 10:37:42 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB0A343E6A; Sat, 24 Aug 2002 10:37:42 -0700 (PDT) (envelope-from jdp@FreeBSD.org) Received: from freefall.freebsd.org (jdp@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7OHbgJU063821; Sat, 24 Aug 2002 10:37:42 -0700 (PDT) (envelope-from jdp@freefall.freebsd.org) Received: (from jdp@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7OHbgNV063820; Sat, 24 Aug 2002 10:37:42 -0700 (PDT) Message-Id: <200208241737.g7OHbgNV063820@freefall.freebsd.org> From: John Polstra Date: Sat, 24 Aug 2002 10:37:42 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/net rcmd.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jdp 2002/08/24 10:37:42 PDT Modified files: lib/libc/net rcmd.c Log: Fix a bug in __ivaliduser_sa() which caused some rsh/rlogin attempts to fail needlessly if a reverse DNS lookup of the IP address didn't come up with a hostname. As a comment in the code clearly stated, the "damn hostname" was looked up only for the purpose of netgroup matching. But if that lookup failed, the function bailed out immediately even though in many cases netgroup matching would not be used. This change marks the hostname as unknown but continues. Where netgroup matching is performed, an unknown hostname is handled conservatively. I.e., for "+@netgroup" (accept) entries an unknown hostname never matches, and for "-@netgroup" (reject) entries an unknown hostname always matches. In the lines affected (only), I also fixed a few bogus casts. There are others, and in fact this entire file would be a good candidate for a cleanup sweep. Reviewed by: imp (wearing his flourescent yellow Security Team cap) MFC after: 2 days Revision Changes Path 1.37 +5 -5 src/lib/libc/net/rcmd.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message