1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-19 10:15:48 +02:00

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.
This commit is contained in:
Jim Meyering
2007-05-02 23:30:00 +02:00
parent 60f3c362f5
commit aa3f52d17b
3 changed files with 12 additions and 3 deletions

View File

@@ -1,3 +1,10 @@
2007-05-02 Jim Meyering <jim@meyering.net>
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.
2007-04-28 Paul Eggert <eggert@cs.ucla.edu>
* src/nohup.c (usage): Describe how standard input and output

2
THANKS
View File

@@ -12,6 +12,7 @@ Aaron Hawley ashawley@uvm.edu
Achim Blumensath blume@corona.oche.de
Adam Klein aklein@debian.org
Adrian Bunk bunk@stusta.de
AIDA Shinra shinra@j10n.org
Akim Demaille demaille@inf.enst.fr
Alain Magloire alain@qnx.com
Alan Iwi iwi@atm.ox.ac.uk
@@ -399,6 +400,7 @@ Pawel Prokop pablo@wizard.ae.krakow.pl
Per Cederqvist ceder@lysator.liu.se
Per Kristian Hove perhov@math.ntnu.no
Peter Breitenlohner peb@mppmu.mpg.de
Peter Dyballa peter_dyballa@web.de
Peter Eriksson peter@ifm.liu.se
Peter Fales psfales@lucent.com
Peter Horst peter@ointment.org

View File

@@ -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.