MediaWiki
1.32.0
|
Restricts execution of shell commands using firejail. More...
Public Member Functions | |
__construct ( $firejail) | |
whitelistPaths (array $paths) | |
@inheritDoc More... | |
Public Member Functions inherited from MediaWiki\Shell\Command | |
__construct () | |
Constructor. More... | |
__destruct () | |
Destructor. More... | |
cgroup ( $cgroup) | |
Sets cgroup for this command. More... | |
environment (array $env) | |
Sets environment variables which should be added to the executed command environment. More... | |
execute () | |
Executes command. More... | |
includeStderr ( $yesno=true) | |
Controls whether stderr should be included in stdout, including errors from limit.sh. More... | |
input ( $inputString) | |
Sends the provided input to the command. More... | |
limits (array $limits) | |
Sets execution limits. More... | |
logStderr ( $yesno=true) | |
When enabled, text sent to stderr will be logged with a level of 'error'. More... | |
params () | |
Adds parameters to the command. More... | |
profileMethod ( $method) | |
Sets calling function for profiler. More... | |
restrict ( $restrictions) | |
Set additional restrictions for this request. More... | |
unsafeParams () | |
Adds unsafe parameters to the command. More... | |
Protected Member Functions | |
buildFinalCommand ( $command) | |
@inheritDoc More... | |
Protected Member Functions inherited from MediaWiki\Shell\Command | |
hasRestriction ( $restriction) | |
Bitfield helper on whether a specific restriction is enabled. More... | |
Private Attributes | |
string | $firejail |
Path to firejail. More... | |
string[] | $whitelistedPaths = [] |
Additional Inherited Members | |
Protected Attributes inherited from MediaWiki\Shell\Command | |
string | $command = '' |
int | $restrictions = 0 |
bitfield with restrictions More... | |
Restricts execution of shell commands using firejail.
Definition at line 31 of file FirejailCommand.php.
MediaWiki\Shell\FirejailCommand::__construct | ( | $firejail | ) |
string | $firejail | Path to firejail |
Definition at line 46 of file FirejailCommand.php.
References MediaWiki\Shell\FirejailCommand\$firejail.
|
protected |
@inheritDoc
Reimplemented from MediaWiki\Shell\Command.
Definition at line 62 of file FirejailCommand.php.
References MediaWiki\Shell\Command\$command, MediaWiki\Shell\FirejailCommand\$firejail, $IP, as, MediaWiki\Shell\Command\hasRestriction(), MediaWiki\Shell\Shell\NO_EXECVE, MediaWiki\Shell\Shell\NO_LOCALSETTINGS, MediaWiki\Shell\Shell\NO_NETWORK, MediaWiki\Shell\Shell\NO_ROOT, MediaWiki\Shell\Shell\PRIVATE_DEV, and MediaWiki\Shell\Shell\SECCOMP.
MediaWiki\Shell\FirejailCommand::whitelistPaths | ( | array | $paths | ) |
@inheritDoc
Reimplemented from MediaWiki\Shell\Command.
Definition at line 54 of file FirejailCommand.php.
|
private |
Path to firejail.
Definition at line 36 of file FirejailCommand.php.
Referenced by MediaWiki\Shell\FirejailCommand\__construct(), and MediaWiki\Shell\FirejailCommand\buildFinalCommand().
|
private |
Definition at line 41 of file FirejailCommand.php.