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/cp | |
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/cp')
-rwxr-xr-x | tests/cp/preserve-gid.sh | 5 | ||||
-rwxr-xr-x | tests/cp/special-bits.sh | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/cp/preserve-gid.sh b/tests/cp/preserve-gid.sh index 77dcdb657..f141ac141 100755 --- a/tests/cp/preserve-gid.sh +++ b/tests/cp/preserve-gid.sh @@ -117,8 +117,9 @@ t1() { u=$1; shift g=$1; shift t0 "$f" "$u" "$g" \ - setuidgid -g "$nameless_gid1,$nameless_gid2" \ - "$nameless_uid" env PATH="$tmp_path" "$@" + chroot --user=+$nameless_uid:+$nameless_gid1 \ + --groups="+$nameless_gid1,+$nameless_gid2" \ + / env PATH="$tmp_path" "$@" } t1 a0 "$nameless_uid" "$nameless_gid1" cp diff --git a/tests/cp/special-bits.sh b/tests/cp/special-bits.sh index 60d26a936..a55eea21f 100755 --- a/tests/cp/special-bits.sh +++ b/tests/cp/special-bits.sh @@ -42,7 +42,7 @@ set _ $(ls -l b); shift; p1=$1 set _ $(ls -l b2); shift; p2=$1 test $p1 = $p2 || fail=1 -setuidgid $NON_ROOT_USERNAME env PATH="$PATH" cp -p c c2 || fail=1 +chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" cp -p c c2 || fail=1 set _ $(ls -l c); shift; p1=$1 set _ $(ls -l c2); shift; p2=$1 test $p1 = $p2 && fail=1 |