[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BUG in 'su'

From: Greywolf
Subject: BUG in 'su'
Date: Tue, 1 May 2001 10:50:25 -0700 (PDT)

Hey, sh-utils folks,

There's a MAJOR bug in su.

I should be able to say

        su - user -X

and have the -X flag be passed to $user's shell at startup so that I can
debug startup scripts without having to put a 'set echo' or 'set verbose'
in the scripts (since they're scattered all over the place and I don't
know which one gets sourced first).  This is debugging a startup problem
in csh, by the way, but that I can handle.

The main problem is that su is broken -- it refuses to pass any shell
options to a user.  Go to a (for example) NetBSD machine and you will
discover that the above usage actually works.  su should not be
interpreting any other flags than '-' or '-l' or '-m/-p'; all others
should be passed on to the shell (originally the '-f' was there to
avoid syntax confusion in an emergency ("do I do su -f user or su
user -f?")).

Solaris behaves in the same way except that they tend to interpret '-f'
in the SysV way that it means 'full login', i.e. it's an alias for '-'.
I disagree with that interpretation, FWIW.

                /* Second Wave UNIX Historian since 1984 */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]