+2011-02-20 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: tempdirs with restrictive permissions are cleaned correctly
+ Before this change, the removal of a temporary test directory
+ containing subdirectories with restrictive permissions (such as
+ 'r--r--r--') could fail.
+ * tests/defs: Ensure that all the subdirectories of a temporary
+ test directory have the 'read', 'write' and 'execute' bits set,
+ before trying to remove it with `rm -rf'.
+ * tests/Makefile.am (clean-local-check): Likewise.
+
2011-02-16 Stefano Lattarini <stefano.lattarini@gmail.com>
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
if test "$$#,$$1" = "1,*.dir"; then \
: there is no test directory to clean; \
else \
- find "$$@" -type d '!' -perm -200 -exec chmod u+w {} ';'; \
+ find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
rm -rf "$$@"; \
fi;
if test "$$#,$$1" = "1,*.dir"; then \
: there is no test directory to clean; \
else \
- find "$$@" -type d '!' -perm -200 -exec chmod u+w {} ';'; \
+ find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
rm -rf "$$@"; \
fi;
curdir=`pwd`
testSubDir=$me.dir
test ! -d $testSubDir || {
- find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";"
+ find $testSubDir -type d ! -perm -700 -exec chmod u+rwx {} ";"
rm -rf $testSubDir
}
mkdir $testSubDir
cd "$curdir"
case $exit_status,$keep_testdirs in
0,)
- find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";"
+ find $testSubDir -type d ! -perm -700 -exec chmod u+rwx {} ";"
rm -rf $testSubDir
;;
esac