Skip to content

Commit cf756e1

Browse files
committed
[Fix] addition of prefixing eval to find command required certain values
to be escaped differently for proper function of '-r|--recent' [Fix] util-linux 2.3 'column' command with '-o' but earlier versions do not, resulting in scan reports generating empty hit lists
1 parent 3ff19e3 commit cf756e1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

files/VERSION.hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
47de214c0770008e4f72a5f06bb9afba7755fb5b81d2cf4817682bd6241144be
1+
09b93cbbc7a572eec62c23cb319b5ab98b9bb20d7ac0f916793d8239dcc6b25d

files/internals/functions

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ scan() {
897897
if [ -z "$hscan" ]; then
898898
eout "{scan} building file list for $spath of new/modified files from last $days days, this might take awhile..." 1
899899
fi
900-
find_recentopts="( -mtime -$days -o -ctime -$days )"
900+
find_recentopts="\( -mtime -$days -o -ctime -$days \)"
901901
fi
902902

903903
if [ -z "$scan_find_timeout" ];then
@@ -1573,10 +1573,10 @@ monitor_init() {
15731573
if [ "$igregexp" ]; then
15741574
igregexp="$igregexp|$igfile"
15751575
else
1576-
igregexp="($igfile"
1576+
igregexp="\($igfile"
15771577
fi
15781578
done
1579-
igregexp="$igregexp)"
1579+
igregexp="$igregexp\)"
15801580
exclude="--exclude $igregexp"
15811581
fi
15821582
fi

files/internals/scan.etpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ if [ ! "$tot_hits" == "0" ]; then
6767
fi
6868
if [ -f "$hitlist_file" ]; then
6969
echo "FILE HIT LIST:" >> $tmpf
70-
cat $hitlist_file | column -s ':' -t -o ':' >> $tmpf
70+
if [ "$coltest" ]; then
71+
cat $hitlist_file | column -s ':' -t -o ':' >> $tmpf
72+
else
73+
cat $hitlist_file >> $tmpf
74+
fi
7175
fi
7276
fi
7377

0 commit comments

Comments
 (0)