Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2001 14:04:23 -0700 (PDT)
From:      Jim.Pirzyk@disney.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/29516: telnet from an non FreeBSD host still uses /etc/ttys for root access, ignorning /etc/login.access
Message-ID:  <200108072104.f77L4N011788@snoopy.fan.fa.disney.com>

next in thread | raw e-mail | index | archive | help

>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




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