From owner-cvs-libexec Fri Dec 1 21:48:02 1995 Return-Path: owner-cvs-libexec Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id VAA22518 for cvs-libexec-outgoing; Fri, 1 Dec 1995 21:48:02 -0800 Received: from jhome.DIALix.COM (root@jhome.DIALix.COM [192.203.228.69]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id VAA22426 ; Fri, 1 Dec 1995 21:44:54 -0800 Received: (from peter@localhost) by jhome.DIALix.COM (8.7.2/8.7.2) id NAA01377; Sat, 2 Dec 1995 13:43:35 +0800 (WST) Date: Sat, 2 Dec 1995 13:43:34 +0800 (WST) From: Peter Wemm To: "Rodney W. Grimes" cc: Guido van Rooij , CVS-committers@freefall.freebsd.org, cvs-libexec@freefall.freebsd.org Subject: Re: cvs commit: src/libexec/rlogind rlogind.c In-Reply-To: <199512012135.NAA29851@GndRsh.aac.dev.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-libexec@FreeBSD.ORG Precedence: bulk On Fri, 1 Dec 1995, Rodney W. Grimes wrote: > > guido 95/12/01 12:38:44 > > > > Modified: libexec/rlogind rlogind.c > > Log: > > It is not necessary to check if a '-' is in lusername., Checking if > > lusername starts with a '-' is enough. Otherwise, no users with a '-' > > in there name can use rlogin. > > > > Revision Changes Path > > 1.7 +1 -1 src/libexec/rlogind/rlogind.c > > What happens if I start the username with a space or put a space > in it some place? (ie, ` -option' or `foouser -foooptions') ?? It's fine.. the option "lusername" is passed as a single argv entry. If there's a space in it, it'll simply be treated as a space with a login name. Actually, to be certain of these things, we could get rlogind and telnetd etc to pass in a "--" string to close off the options list.. eg: execl(.... "-h", hostname, "--", lusername); The infamous "-froot" bug was specific to the "shadow" suite (and apparently AIX) where there was a coding error. JFH listed the "f" flag in the getopt string as taking an argument for some bizare reason. So far as I can tell, the BSD login was never susceptable to this bug because of it's correct parsing of arguments with getopt(). -Peter > -- > Rod Grimes rgrimes@gndrsh.aac.dev.com > Accurate Automation Company Reliable computers for FreeBSD >