Merge "shell: Add debug logging to find binaries that aren't being restricted"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 22 Dec 2017 01:33:27 +0000 (01:33 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 22 Dec 2017 01:33:28 +0000 (01:33 +0000)
includes/shell/FirejailCommand.php

index 0338b53..ec9eb09 100644 (file)
@@ -62,6 +62,11 @@ class FirejailCommand extends Command {
        protected function buildFinalCommand( $command ) {
                // If there are no restrictions, don't use firejail
                if ( $this->restrictions === 0 ) {
+                       $splitCommand = explode( ' ', $command, 2 );
+                       $this->logger->debug(
+                               "firejail: Command {$splitCommand[0]} {params} has no restrictions",
+                               [ 'params' => isset( $splitCommand[1] ) ? $splitCommand[1] : '' ]
+                       );
                        return parent::buildFinalCommand( $command );
                }