summaryrefslogtreecommitdiff
path: root/init.cfg
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-06-26 12:41:01 +0100
committerPádraig Brady <P@draigBrady.com>2014-06-26 15:30:41 +0100
commitacb422bdd1b325285bb46883f02d8fc6402efd14 (patch)
tree1f77b51c48cff7532a9227fa3517c5c26eee30be /init.cfg
parente7c7802964cbf0f77a5883808e28eab56e36907b (diff)
downloadcoreutils-acb422bdd1b325285bb46883f02d8fc6402efd14.tar.xz
tests: use predetermined NON_ROOT_GID
* HACKING: GID is more useful in tests than group name, so rename input param from NON_ROOT_GROUP to NON_ROOT_GID to make it obvious that only a group ID is now acceptable, thus allowing GID lookups to be avoided throughout the tests. * init.cfg (require_root_): Likewise. * tests/misc/truncate-owned-by-other.sh: Avoid looking up the GID. * tests/touch/now-owned-by-other.sh: Likewise. * tests/misc/chroot-credentials.sh: Likewise. Also fix an instance of comparison against NON_ROOT_GROUP which would have given a false failure if a non numeric value was passed in. * tests/id/setgid.sh: Use previously looked up gid as a more accurate base for the subsequent adjustment, and move the uid lookup within chroot, rather than having the overhead of a separate `id` invocation.
Diffstat (limited to 'init.cfg')
-rw-r--r--init.cfg2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.cfg b/init.cfg
index e225bd6d6..725ee1213 100644
--- a/init.cfg
+++ b/init.cfg
@@ -413,7 +413,7 @@ require_root_()
{
uid_is_privileged_ || skip_ "must be run as root"
NON_ROOT_USERNAME=${NON_ROOT_USERNAME=nobody}
- NON_ROOT_GROUP=${NON_ROOT_GROUP=$(id -g $NON_ROOT_USERNAME)}
+ NON_ROOT_GID=${NON_ROOT_GID=$(id -g $NON_ROOT_USERNAME)}
# When the current test invokes chroot, call nonroot_has_perm_
# to check for a common problem.