diff options
author | Pádraig Brady <P@draigBrady.com> | 2014-05-19 18:21:57 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2014-05-21 11:18:27 +0100 |
commit | 7a63d6395ac117b753a18468a9b3f5ed95d176d4 (patch) | |
tree | c01b1115f71bd4a4b98b1dc6f9383d4228507e5f /tests/misc | |
parent | 0c4729516baa2fbefb0af66c38f434b1f7519078 (diff) | |
download | coreutils-7a63d6395ac117b753a18468a9b3f5ed95d176d4.tar.xz |
tests: use chroot --user rather than internal setuidgid tool
* init.cfg (require_root_): Adjust to use chroot, and make
`require_built_ chroot` implicit when chroot used in the test.
* po/POTFILES.in: Remove reference to setuidgid tool.
* src/.gitignore: Likewise.
* src/local.mk: Likewise.
* src/setuidgid.c: Remove.
* tests/cp/preserve-gid.sh: s/setuidgid/chroot --user/.
* tests/cp/special-bits.sh: Likewise.
* tests/id/setgid.sh: Likewise.
* tests/misc/truncate-owned-by-other.sh
* tests/mv/sticky-to-xpart.sh: Likewise.
* tests/rm/fail-2eperm.sh: Likewise.
* tests/rm/no-give-up.sh: Likewise.
* tests/touch/now-owned-by-other.sh: Likewise.
* tests/misc/chroot-fail.sh: Skip if chroot not built.
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/chroot-fail.sh | 1 | ||||
-rwxr-xr-x | tests/misc/truncate-owned-by-other.sh | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/misc/chroot-fail.sh b/tests/misc/chroot-fail.sh index b171ec40c..a84826fd7 100755 --- a/tests/misc/chroot-fail.sh +++ b/tests/misc/chroot-fail.sh @@ -20,6 +20,7 @@ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src print_ver_ chroot +require_built_ chroot # These tests verify exact status of internal failure; since none of # them actually run a command, we don't need root privileges diff --git a/tests/misc/truncate-owned-by-other.sh b/tests/misc/truncate-owned-by-other.sh index 9f269ed4e..e93b7f136 100755 --- a/tests/misc/truncate-owned-by-other.sh +++ b/tests/misc/truncate-owned-by-other.sh @@ -31,6 +31,7 @@ chmod g+w root-owned # Ensure that the current directory is searchable by $NON_ROOT_USERNAME. chmod g+x . -setuidgid $NON_ROOT_USERNAME env PATH="$PATH" truncate -s0 root-owned || fail=1 +chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ + truncate -s0 root-owned || fail=1 Exit $fail |