crashlog: on server only allows write to subdir log.

prevent people to write to .ssh/ that could be bad.
This commit is contained in:
Kenneth Johansson 2015-09-23 17:11:42 +02:00
parent e6a35436b6
commit 5dad7b69fc

View file

@ -33,11 +33,11 @@ done
shift $(($OPTIND - 1))
file="$*"
dir=$(dirname "$file")
if [ "$file" == "." ]
if [ "$dir" != "log" ]
then
echo "Implicit filename \".\" not allowed."
echo "You must specify the exact target filename"
echo "only allowed to write to log/"
exit 1
fi