Martin Koeppe <[EMAIL PROTECTED]> 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