From 7a63d6395ac117b753a18468a9b3f5ed95d176d4 Mon Sep 17 00:00:00 2001 From: Pádraig Brady
Date: Mon, 19 May 2014 18:21:57 +0100 Subject: 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. --- tests/id/setgid.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/id') diff --git a/tests/id/setgid.sh b/tests/id/setgid.sh index 9da35385e..aa43ea37f 100755 --- a/tests/id/setgid.sh +++ b/tests/id/setgid.sh @@ -27,7 +27,8 @@ gp1=$(expr $g + 1) echo $gp1 > exp || framework_failure_ -setuidgid -g $gp1 $NON_ROOT_USERNAME env PATH="$PATH" id -G > out || fail=1 +chroot --user=$NON_ROOT_USERNAME:$gp1 --groups='' / env PATH="$PATH" \ + id -G > out || fail=1 compare exp out || fail=1 # With coreutils-8.16 and earlier, id -G would print both: $gp1 $g -- cgit v1.2.3-70-g09d2