Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Dec 1995 13:43:34 +0800 (WST)
From:      Peter Wemm <peter@jhome.DIALix.COM>
To:        "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
Cc:        Guido van Rooij <guido@freefall.freebsd.org>, CVS-committers@freefall.freebsd.org, cvs-libexec@freefall.freebsd.org
Subject:   Re: cvs commit: src/libexec/rlogind rlogind.c
Message-ID:  <Pine.BSF.3.91.951202133613.765C-100000@jhome.DIALix.COM>
In-Reply-To: <199512012135.NAA29851@GndRsh.aac.dev.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.951202133613.765C-100000>