From owner-freebsd-bugs Tue Aug 7 14:12:35 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id F075337B69C for ; Tue, 7 Aug 2001 14:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f77LA3b48884; Tue, 7 Aug 2001 14:10:03 -0700 (PDT) (envelope-from gnats) Received: from mail.disney.com (mail.disney.com [204.128.192.15]) by hub.freebsd.org (Postfix) with ESMTP id 120A237B684 for ; Tue, 7 Aug 2001 14:07:51 -0700 (PDT) (envelope-from Jim.Pirzyk@disney.com) Received: from pain10.corp.disney.com (root@pain10.corp.disney.com [153.7.110.100]) by mail.disney.com (Switch-2.0.1/Switch-2.0.1) with SMTP id f77L3Ze25628 for ; Tue, 7 Aug 2001 14:03:35 -0700 (PDT) Received: from [172.30.50.1] by pain.corp.disney.com with ESMTP for FreeBSD-gnats-submit@freebsd.org; Tue, 7 Aug 2001 14:05:22 -0700 Received: from plio.fan.fa.disney.com (plio.fan.fa.disney.com [153.7.118.2]) by pecos.fa.disney.com (8.11.3/8.11.3) with ESMTP id f77L7Hs07425 for ; Tue, 7 Aug 2001 14:07:17 -0700 (PDT) Received: from snoopy.fan.fa.disney.com (snoopy.fan.fa.disney.com [153.7.117.170]) by plio.fan.fa.disney.com (8.9.2/8.9.2) with ESMTP id OAA15311 for ; Tue, 7 Aug 2001 14:04:23 -0700 (PDT) (envelope-from Jim.Pirzyk@mailhost) Received: (from Jim.Pirzyk@localhost) by snoopy.fan.fa.disney.com (8.11.3/8.11.3) id f77L4N011788; Tue, 7 Aug 2001 14:04:23 -0700 (PDT) (envelope-from Jim.Pirzyk) Message-Id: <200108072104.f77L4N011788@snoopy.fan.fa.disney.com> Date: Tue, 7 Aug 2001 14:04:23 -0700 (PDT) From: Jim.Pirzyk@disney.com Reply-To: Jim.Pirzyk@disney.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/29516: telnet from an non FreeBSD host still uses /etc/ttys for root access, ignorning /etc/login.access Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 29516 >Category: bin >Synopsis: telnet from an non FreeBSD host still uses /etc/ttys for root access, ignorning /etc/login.access >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 07 14:10:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: >Release: FreeBSD 4.3-RELEASE i386 >Organization: >Environment: System: FreeBSD snoopy 4.3-RELEASE FreeBSD 4.3-RELEASE #15: Mon Aug 6 15:26:03 PDT 2001 root@snoopy:/auto/roy/dist/pub/FreeBSD/4.3-RELEASE/sys/compile/UP_WORKSTATION i386 On FreeBSD 4.3-RELEASE and 5.0-CURRENT (as of Aug 6th, 2001) on both i386 and alpha. >Description: When telnet'ing as root into a FreeBSD host from a non FreeBSD host, you need to modify the /etc/ttys file to allow root access. When allowing rsh/rlogin access, you have to modify /etc/login.access. >How-To-Repeat: Setup a freebsd box that allows root access over the net, then try to login from another non freebsd box. >Fix: This patch disables the use of the rootterm() function in login.c This then defaults to using the /etc/login.access file for the telnetd sessions. *** ./usr.bin/login/login.c.orig Tue Feb 13 05:05:20 2001 --- ./usr.bin/login/login.c Tue Aug 7 13:57:27 2001 *************** *** 268,274 **** getloginname(); } rootlogin = 0; ! rootok = rootterm(tty); /* Default (auth may change) */ if (strlen(username) > UT_NAMESIZE) username[UT_NAMESIZE] = '\0'; --- 268,274 ---- getloginname(); } rootlogin = 0; ! rootok = 1; /* rootterm(tty); Default (auth may change) */ if (strlen(username) > UT_NAMESIZE) username[UT_NAMESIZE] = '\0'; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message