3 if test "`id -u`" != '0'; then
4 echo "This test only works when run as root. Skipping." >&2
8 if test "`id -u nobody`" = ""; then
9 echo "This test requires that your system have a 'nobody' user. Sorry." >&2
13 if test "$OVERRIDE_GCDA_PERMISSIONS_HACK" = "yes"; then
14 find src
-type f
-name '*gcda' -print0 |
xargs -0 chmod 0666
17 "${builddir:-.}/src/test/test-switch-id" nobody setuid ||
exit 1
18 "${builddir:-.}/src/test/test-switch-id" nobody root-bind-low ||
exit 1
19 "${builddir:-.}/src/test/test-switch-id" nobody setuid-strict ||
exit 1
20 "${builddir:-.}/src/test/test-switch-id" nobody built-with-caps ||
exit 0
21 # ... Go beyond this point only if we were built with capability support.
23 "${builddir:-.}/src/test/test-switch-id" nobody have-caps ||
exit 1
24 "${builddir:-.}/src/test/test-switch-id" nobody setuid-keepcaps ||
exit 1
26 if test "$OVERRIDE_GCDA_PERMISSIONS_HACK" = "yes"; then
27 find src
-type f
-name '*gcda' -print0 |
xargs -0 chmod 0644