Re: [PATCH] tests: adjust PATH to include /usr/sbin for filefrag-using t
From:
Jim Meyering
Subject:
Re: [PATCH] tests: adjust PATH to include /usr/sbin for filefrag-using tests
Date:
Wed, 23 Nov 2011 18:46:29 +0100
Erik Auerswald wrote:
...
>> Therefore I don't think it's a problem of the system, but
>> more the behavior of coreutils tests to use administrative
>> tools (those usually used by root and therefore in [/usr]/sbin).
>> As a result, I think the test should either be run as root
>> only (which is of course often not required) or care about
>> having /usr/sbin and /sbin in the PATH when it's using such
>> tools.
>
> I'd say that's reasonable. The FHS states that
>
> "Utilities used for system administration (and other root-only commands)
> are stored in /sbin, /usr/sbin, and /usr/local/sbin."
> (http://www.pathname.com/fhs/pub/fhs-2.3.html#SBINSYSTEMBINARIES)
>
> Building software (e.g. coreutils) is not usually done with
> an administrative account, thus PATH needs not contain the sbin
> directories. If some test does require them, they should be added to
> the PATH of that test.
>
> That said, probably some of the sbin programs should rather be in bin,
> because they are of use for regular users as well.
The point is that the separation is not clear.
Even /sbin programs like mkfs.* can be useful to non-root users.
I use a few of those in parted tests.
Also, ifconfig is useful to non-root users, yet resides in /sbin.
Thus, by omitting /sbin and /usr/sbin, that version of sudo is
causing trouble. Fedora made the same change to sudo, but ended
up reverting it due to all of the trouble it caused.