Subject: Re: bin/17340: the meaning of the "-c" option to /usr/bin/su is overloaded
To: NetBSD GNATS submissions and followups <email@example.com>
From: David Laight <firstname.lastname@example.org>
Date: 06/21/2002 21:11:25
> > The command 'su -c "random command"' no longer functions,
> > though 'su root -c "random command"' does act as before.
If it's not a silly question, when, and of what version did this
> > A likely mistake was the use of the "-c" argument to reflect
> > changes in login class along with its traditional usage as the
> > prefix specifier to the command to be executed..
> (I think the cause was probably a more careful options parser in getopt(3))
Don't think so - I've just reinstated libc.so.12.83, makes no difference.
> I think the mistake is to assume the "su -c command" form will work.
I can't see a version of su where it would. getopts() returning
'?' has always made netbsd's su exit.
OTOH a SYSV/Solaris su might behave differently.
David Laight: email@example.com