> How exactly is that any better?> > Just because the executable bit is set on 
> a file, it doesn't mean that> executing it is actually going to work, and now 
> the fallback to /sbin/sh> is broken too.
First, whoever implements the "[ -x /bin/tcsh ]" *knows*, in advance, that that 
is where the shell is, and that it is executable. -x is just a sanity test, in 
order to be able to adapt to circumstances as much as possible.
 
Second, if you still think that's not enough sanity checking, replace with, or 
add to the above example something like `file -h | awk '/ELF .*[Dd]ynamically 
linked,/'` and then you'll *know* whether your "executable" truly is one.
 
Third, let's assume, for the purpose of scalability, that even that is 
completely wrong. /bin/blabla isn't executable or isn't there, the check 
doesn't work right... whatever. In that case, just doing "su" instead of "su -" 
will get you in there with /sbin/sh as your shell and you can still fix 
whetever it is that's broken.
 
Fourth, in a well designed environment, where you have a system engineer who 
also happens to know what he/she is doing, this modification will come as part 
the Solaris Flash(TM) build, AND it will actually be a part of a PACKAGE. Which 
also means that it is most likely been tested to death, passed the IT phase, 
passed PTA tests, and is deemed production ready.
 
I mean, come on. I've been doing this "UNIX thing" for a little longer than one 
day.
 
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to