Subject: Re: bin/17340: the meaning of the "-c" option to /usr/bin/su is overloaded
To: David Laight <firstname.lastname@example.org>
From: Greg A. Woods <email@example.com>
Date: 06/21/2002 22:33:02
[ On Friday, June 21, 2002 at 23:32:46 (+0100), David Laight wrote: ]
> Subject: Re: bin/17340: the meaning of the "-c" option to /usr/bin/su is overloaded
> > When the '-' option was introduced (before System III), it was
> > implemented with a silly non-getopt() hack. It was still that way in
> > SysVr3.2. I don't know what happened when '-' was deprecated and '-l'
> > was introduced to replace it in order to bring 'su' closer to POSIX
> > compatability.
> I found some SVR4 sources (probably UnixWare 2 ish) from around
> 1997. su just looked at argv to see if it was "-".
> No getopt() call, no other options.
Interesting. (It's probably more or less unchanged since SysVr3.2)
I don't see '-l' documented in SunOS-5.6 either....
Unfortunately 'su' is (still) one of those implementation-defined
things, so the best one can do w.r.t. API standards is to show how it
should conform to the generic rules for command-line parameters.
Luckily it seems *BSD's implementation has conformed since at least the
Greg A. Woods
+1 416 218-0098; <firstname.lastname@example.org>; <email@example.com>; <firstname.lastname@example.org>
Planix, Inc. <email@example.com>; VE3TCP; Secrets of the Weird <firstname.lastname@example.org>