From: Jacob Bachmeyer Date: Sat, 27 Feb 2021 03:19:16 +0000 (-0600) Subject: Meet taint mode requirements for handling test syslog socket name X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=25637520610e45cb00fb046f6b7dba5b0b02470a;p=gatekeeper.git Meet taint mode requirements for handling test syslog socket name --- 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.");