From Jim.Pirzyk@disney.com  Tue Aug  7 14:07:51 2001
Return-Path: <Jim.Pirzyk@disney.com>
Received: from mail.disney.com (mail.disney.com [204.128.192.15])
	by hub.freebsd.org (Postfix) with ESMTP id 120A237B684
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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
Subject: telnet from an non FreeBSD host still uses /etc/ttys for root access, ignorning /etc/login.access
X-Send-Pr-Version: 3.113
X-GNATS-Notify: ru

>Number:         29516
>Category:       bin
>Synopsis:       telnet(1) from an non FreeBSD host still uses /etc/ttys for root access, ignorning /etc/login.access
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    markm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 07 14:10:01 PDT 2001
>Closed-Date:    Mon Aug 26 12:56:32 UTC 2013
>Last-Modified:  Mon Aug 26 12:56:32 UTC 2013
>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:
Responsible-Changed-From-To: freebsd-bugs->markm 
Responsible-Changed-By: ru 
Responsible-Changed-When: Fri Sep 14 09:24:30 PDT 2001 
Responsible-Changed-Why:  
Mark, could you please look into this? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29516 
State-Changed-From-To: open->closed 
State-Changed-By: markm 
State-Changed-When: Mon Aug 26 12:56:07 UTC 2013 
State-Changed-Why:  
Stale. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=29516 
>Unformatted:
