jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/397606 )

Change subject: shell: Add debug logging to find binaries that aren't being 
restricted
......................................................................


shell: Add debug logging to find binaries that aren't being restricted

Assume the first part of the command is the binary, and include it directly
in the message to make grouping work on a per-binary basis. Includ the rest
of the params as log context just in case it is useful.

Change-Id: Ibfff7b1fee083efffae833b9bfa71ae9806c1bbd
---
M includes/shell/FirejailCommand.php
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/shell/FirejailCommand.php 
b/includes/shell/FirejailCommand.php
index 0338b53..ec9eb09 100644
--- a/includes/shell/FirejailCommand.php
+++ b/includes/shell/FirejailCommand.php
@@ -62,6 +62,11 @@
        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 );
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/397606
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibfff7b1fee083efffae833b9bfa71ae9806c1bbd
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to