[PATCH] tests: make regex safe against working directory name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Scott James Remnant <scott@xxxxxxxxxxxx>
---
 tests/run.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/run.sh b/tests/run.sh
index f4a6e7b..b99f876 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -17,11 +17,11 @@
 #
 
 TS_TOPDIR=$(cd $(dirname $0) && pwd)
-comps=$(find $TS_TOPDIR/ts/ -type f -perm /a+x -regex "[^\.~]*" |  sort)
+comps=$(find $TS_TOPDIR/ts/ -type f -perm /a+x -regex ".*/[^\.~]*" |  sort)
 
 if [ -n "$1" ]; then
 	if [ -d "$TS_TOPDIR/ts/$1" ]; then
-		comps=$(find $TS_TOPDIR/ts/$1 -type f -perm /a+x -regex "[^\.~]*" |  sort)
+		comps=$(find $TS_TOPDIR/ts/$1 -type f -perm /a+x -regex ".*/[^\.~]*" |  sort)
 	else
 		echo
 		echo "usage: $0 [<component>]"
-- 
1.6.0.5

--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux