Skip to content

Commit 67a0e8d

Browse files
author
Serghey Rodin
committed
limit config visibility to /etc and /var/lib
1 parent a1b3aa3 commit 67a0e8d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/v-open-fs-config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ if [ ! -z "$src_file" ]; then
3535
echo "Error: invalid source path $src_file"
3636
exit 2
3737
fi
38+
spath=$(echo "$rpath" |egrep "/etc|/var/lib")
39+
if [ -z "$spath" ]; then
40+
echo "Error: invalid source path $src_file"
41+
exit 2
42+
fi
3843
fi
3944

4045
# Reading conf

0 commit comments

Comments
 (0)