Re: ldconfig not found, bad path
Erick Branderhorst writes ("ldconfig not found, bad path"):
> I had a slightly corrupted profile for root yesterday in which the
> path wasn't set for the sbin directory's (/sbin, /usr/sbin). Because
> of this an `ldconfig' command from some {pre,post}{inst,rm} script
> wasn't succesfull. Can we solve this?
>
> Adding the path for the command to be executed: /usr/sbin/ldconfig.
No, this is definitely wrong.
> Temporary modifications of the path in {pre,post}{inst,rm} script:
> PATH=/sbin:/usr/sbin:$PATH.
No, this is definitely wrong.
> Temporary modifications of the path from dpkg and friends.
No, this is definitely wrong.
Programs should treat the PATH they're given as good, unless they have
a good reason to think otherwise (eg, they're the login script which
is responsible for setting the initial PATH, or a user-started daemon
which needs a known-secure PATH).
> Don't anticipate on this and assume I'm the only one who's stupid
> enough to corrupt his profile.
I plan to add a feature to dpkg which will cause it to moan loudly if
/usr/sbin isn't on the PATH and you try to do a superuserish thing.
Should I make it fail (overrideably), or just complain ?
Ian.
Reply to: