]> git.ipfire.org Git - thirdparty/coreutils.git/commit
Use `id -u' to see if we're running as root,
authorJim Meyering <jim@meyering.net>
Sat, 19 Jul 2003 11:19:12 +0000 (11:19 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 19 Jul 2003 11:19:12 +0000 (11:19 +0000)
commit1d510c3f9bfd66a4c6c7880af01ba7a5b96b59cf
tree0f18a4c801608e734b48d0e6a5c2f6479c10cd65
parentc321e53e8861cb04fcc6eea875f395fbd669f5e7
Use `id -u' to see if we're running as root,
rather than trying go write to an write-protected file.
When running as root, ensure $NON_ROOT_USERNAME is valid.
When running as root with `require-non-root', ensure that `.'
is writable by $NON_ROOT_USERNAME, then reinvoke $0 set-user-ID
to $NON_ROOT_USERNAME.  If `.' is not writable, then skip the test.
tests/priv-check