MediaWiki REL1_33
MediaWiki\Shell\FirejailCommand Class Reference

Restricts execution of shell commands using firejail. More...

Inheritance diagram for MediaWiki\Shell\FirejailCommand:
Collaboration diagram for MediaWiki\Shell\FirejailCommand:

Public Member Functions

 __construct ( $firejail)
 
 whitelistPaths (array $paths)
 @inheritDoc
 
- Public Member Functions inherited from MediaWiki\Shell\Command
 __construct ()
 Constructor.
 
 __destruct ()
 Destructor.
 
 __toString ()
 Returns the final command line before environment/limiting, etc are applied.
 
 cgroup ( $cgroup)
 Sets cgroup for this command.
 
 environment (array $env)
 Sets environment variables which should be added to the executed command environment.
 
 execute ()
 Executes command.
 
 includeStderr ( $yesno=true)
 Controls whether stderr should be included in stdout, including errors from limit.sh.
 
 input ( $inputString)
 Sends the provided input to the command.
 
 limits (array $limits)
 Sets execution limits.
 
 logStderr ( $yesno=true)
 When enabled, text sent to stderr will be logged with a level of 'error'.
 
 params ()
 Adds parameters to the command.
 
 profileMethod ( $method)
 Sets calling function for profiler.
 
 restrict ( $restrictions)
 Set additional restrictions for this request.
 
 unsafeParams ()
 Adds unsafe parameters to the command.
 

Protected Member Functions

 buildFinalCommand ( $command)
 @inheritDoc
 
- Protected Member Functions inherited from MediaWiki\Shell\Command
 hasRestriction ( $restriction)
 Bitfield helper on whether a specific restriction is enabled.
 

Private Attributes

string $firejail
 Path to firejail.
 
string[] $whitelistedPaths = []
 

Additional Inherited Members

- Protected Attributes inherited from MediaWiki\Shell\Command
string $command = ''
 
int $restrictions = 0
 bitfield with restrictions
 

Detailed Description

Restricts execution of shell commands using firejail.

See also
https://firejail.wordpress.com/
Since
1.31

Definition at line 31 of file FirejailCommand.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Shell\FirejailCommand::__construct ( $firejail)
Parameters
string$firejailPath to firejail

Definition at line 46 of file FirejailCommand.php.

References MediaWiki\Shell\FirejailCommand\$firejail.

Member Function Documentation

◆ buildFinalCommand()

◆ whitelistPaths()

MediaWiki\Shell\FirejailCommand::whitelistPaths ( array $paths)

@inheritDoc

Reimplemented from MediaWiki\Shell\Command.

Definition at line 54 of file FirejailCommand.php.

References and().

Member Data Documentation

◆ $firejail

string MediaWiki\Shell\FirejailCommand::$firejail
private

◆ $whitelistedPaths

string [] MediaWiki\Shell\FirejailCommand::$whitelistedPaths = []
private

Definition at line 41 of file FirejailCommand.php.


The documentation for this class was generated from the following file: