bug-coreutils
[Top][All Lists]
Advanced

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

Re: 4.5.9 test failure: fail-2eperm


From: Jim Meyering
Subject: Re: 4.5.9 test failure: fail-2eperm
Date: Tue, 11 Mar 2003 17:02:32 +0100

address@hidden (Paul Jarc) wrote:
> Jim Meyering <address@hidden> wrote:
>> For the time being, I've made the following change:
>>
>>      * tests/rm/fail-2eperm: Rather than simply using the first non-root
>>      user name, make sure that the selected user name has a usable shell.
>
> But then you might find a real user account; that user can interfere
> with the tests by sending signals, or, depending on what the tests do,
> possibly writing files in the test area.  Letting the installing user
> specify which account to use is the only safe way; any programmatic
> guess will be wrong some of the time.

I'm convinced.  As my `For the time being' comment implies,
the above is a temporary fix.

>>> I think the right way to do this sort of thing is to let the user
>>> specify a username or UID to use for non-root tests.  Then you can
>>> pass the UID directly to setuid() rather than using su, so you don't
>>
>> That'd work in the perl test scripts, but what about the
>> bourne shell ones?
>
> Make a simple wrapper program to do the setuid and then exec its
> arguments.  It would be approximately equivalent to:
> <URL:http://cr.yp.to/daemontools/setuidgid.html>

That looks like a fine approach.  Thank you!
I've just added this to TODO:

  Apply suggestion from Paul Jarc to use something along the
  lines of http://cr.yp.to/daemontools/setuidgid.html to avoid
  kludges (as in tests/rm/fail-2eperm) when running tests as root.




reply via email to

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