From 84a1f34b0c40625ff517b5ff132d2cf05cb85143 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 15 Aug 2020 18:46:28 -0400 Subject: Check if pipe is writable in wrapper --- catsit.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/catsit.sh b/catsit.sh index bc18a46..0e2a7e1 100644 --- a/catsit.sh +++ b/catsit.sh @@ -19,6 +19,9 @@ shift $((OPTIND - 1)) if ! [ -p "${CATSITD_PIPE}" ]; then die "${CATSITD_PIPE} is not a named pipe" fi +if ! [ -w "${CATSITD_PIPE}" ]; then + die "${CATSITD_PIPE} is not writable" +fi [ $# -lt 1 ] && die 'action required' [ $# -lt 2 ] && die 'service name required' -- cgit 1.4.1