bug-gnulib
[Top][All Lists]
Advanced

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

Re: Fwd: Re: error.c: "Unknown system error" should report errno value


From: Jim Meyering
Subject: Re: Fwd: Re: error.c: "Unknown system error" should report errno value
Date: Wed, 03 Oct 2007 16:26:41 +0200

Martin Koeppe <address@hidden> wrote:
> A question arises: How should one portably test for "root"? Neither
> "root" nor uid 0 seem to be a POSIX requirement. I found one solution
> so far, but I'm not sure how good it really is:
>
> For shell scripts run:
> $ /usr/sbin/chroot / /bin/true
> If successful, you have root rights.

I'm leery of this.
What if chroot works for non-privileged users on some type of system?

Since Interix is the problem here, how about adding
a test that'd be run solely on that system?




reply via email to

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