From 8e59516ab52787bc8d7928ef523a9552eb83cdd6 Mon Sep 17 00:00:00 2001 From: Darren Austin Date: Sat, 21 Apr 2018 18:31:23 +0100 Subject: [PATCH] Added check for absolute path to -i --- lumberjack | 1 + 1 file changed, 1 insertion(+) diff --git a/lumberjack b/lumberjack index a17f93a..6d59621 100755 --- a/lumberjack +++ b/lumberjack @@ -231,6 +231,7 @@ while :; do -i) # Use a FIFO instead of stdin - the FIFO must already exist (use 'mkfifo' first). [[ ! "$2" ]] && die "missing argument to -f" + [[ "${2:0:1}" != "/" ]] && die "$2: must be an absolute path" [[ ! -e "$2" ]] && die "$2: no such file" [[ ! -p "$2" ]] && due "$2: not a FIFO" LJ_INPUT="$2"