From 25637520610e45cb00fb046f6b7dba5b0b02470a Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Fri, 26 Feb 2021 21:19:16 -0600 Subject: [PATCH] Meet taint mode requirements for handling test syslog socket name --- upload-ftp-v1.2.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/upload-ftp-v1.2.pl b/upload-ftp-v1.2.pl index 78c2eee..e57f56f 100755 --- a/upload-ftp-v1.2.pl +++ b/upload-ftp-v1.2.pl @@ -242,7 +242,12 @@ sub main { # Initialize our syslogging - setlogsock(unix => $ENV{TEST_SYSLOG_SOCKET}) if IN_TEST_MODE; + if (IN_TEST_MODE) { + $ENV{TEST_SYSLOG_SOCKET} =~ m/^([[:alnum:]\/]+)$/ + or die "strange test syslog socket"; + -S $1 or die "test syslog socket is not a socket"; + setlogsock(unix => $1); + } openlog("ftp-upload", 'pid', $facility); ftp_syslog('info', "($log_style) Beginning upload processing run."); -- 2.25.1