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

Re: itp: static bins / resolving static debian issues



* Craig Sanders said:

> > No, Craig, it won't influence any scripts at all. /bin/sh won't point
> > to /bin/sash, sash will be used only for root, all the scripts will
> > invoke /bin/{ba|a,c}sh - whatever /bin/sh points to. I think sash
> > should be root shell.
> 
> you are making the mistake of assuming that every system is set up
> exactly like yours and that other system admins will not write their
> root crontab file to take advantage of the fact that root's sh is bash.
I don't understand your concern. The majority of scripts use #!/bin/sh at
the top, right? The linux kernel when asked to execute the script looks at
that line and invokes whatever is mentioned there to interpret the script,
right? So, it DOESN'T matter what sheel does the root account have - linux
kernel doesn't care about it. So, if I have /bin/spiffysash set as my root
shell, the crontab lib uses /bin/sh at the top, and /bin/sh doesn't point to
spiffysash but to /bin/bash then STILL bash is used to interpret the script,
right? There's no connection between the root shell and the system default
shell - /bin/sh. If you want to be sure your script uses bash, put /bin/bash
at the top - if you don't, then the script is buggy when it uses bashisms
and relies on /bin/sh pointing to /bin/bash.
 
> changing root's shell on ANY system is not a thing to be done lightly,
> and the longer a system has been in use, the more likely things are to
> break when arbitrary changes are made.
root's shell is nothing but a root's shell. SYSTEM shell is /bin/sh - and
changing the latter shouldn't be done lightly.

marek

Attachment: pgphwMDBmMQAE.pgp
Description: PGP signature


Reply to: