summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-05-02 23:30:00 +0200
committerJim Meyering <jim@meyering.net>2007-05-02 23:34:33 +0200
commitaa3f52d17b099a5bac9367f09856e61a14de9b68 (patch)
tree49691501156a803087349c244502bf27de96c337 /tests
parent60f3c362f51500cc6e9b5dbcd5ff4dfd3fcd914e (diff)
downloadcoreutils-aa3f52d17b099a5bac9367f09856e61a14de9b68.tar.xz
Invoke rm via 'setuidgid ... env PATH="$PATH" ...', as in fail-eperm.
* tests/rm/fail-2eperm: Patch from AIDA Shinra. Reported by Peter Dyballa. * THANKS: Add AIDA Shinra and Peter Dyballa.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/rm/fail-2eperm6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm
index 076195034..503817591 100755
--- a/tests/rm/fail-2eperm
+++ b/tests/rm/fail-2eperm
@@ -2,7 +2,7 @@
# Like fail-eperm, but the failure must be for a file encountered
# while trying to remove the containing directory with the sticky bit set.
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -52,13 +52,13 @@ fail=0
# Try to ensure that $NON_ROOT_USERNAME can access
# the required version of rm.
-rm_version=`setuidgid $NON_ROOT_USERNAME rm --version|sed -n '1s/.* //p'`
+rm_version=`setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version|sed -n '1s/.* //p'`
case $rm_version in
$PACKAGE_VERSION) ;;
*) echo "$0: cannot access required version ($PACKAGE_VERSION) of rm" 1>&2
fail=1 ;;
esac
-setuidgid $NON_ROOT_USERNAME rm -rf a 2> out-t && fail=1
+setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm -rf a 2> out-t && fail=1
# On some systems, we get `Not owner'. Convert it.
# On other systems (HPUX), we get `Permission denied'. Convert it, too.