Re: rcs-5.8 test failure

Paul Eggert <[email protected]> Mon, 17 Oct 2011 12:52:05 -0700
Newsgroups gmane.comp.version-control.rcs.bugs
Organization UCLA Computer Science Department
Message-ID <[email protected]>
On 10/17/11 11:26, Thien-Thi Nguyen wrote:
> Could we use
> 
>    test 0 = `id -u`

That assumes that "id -u" works, and that only
userid 0 has root or root-like access.  Both
assumptions are typically true these days, but not always.
For example, Solaris 10 "id" does not support the -u option,
and in Solaris even a non-root process can write to an "unwritable"
file if it has the PRIV_FILE_DAC_WRITE privilege;
see the privileges(5) man page.

I was looking for a test that is simple,
is likely to work in all versions of Unix
back to the Stone Age, and which filters out
false positives, and that's why I suggested
"test -w /".