Merge "Add semantic tags to license info text"
[lhc/web/wiklou.git] / includes / shell / Shell.php
index 084e10e..d57bf4f 100644 (file)
@@ -31,6 +31,7 @@ use MediaWiki\MediaWikiServices;
  *
  * Use call chaining with this class for expressiveness:
  *  $result = Shell::command( 'some command' )
+ *       ->input( 'foo' )
  *       ->environment( [ 'ENVIRONMENT_VARIABLE' => 'VALUE' ] )
  *       ->limits( [ 'time' => 300 ] )
  *       ->execute();
@@ -45,13 +46,13 @@ class Shell {
         * Apply a default set of restrictions for improved
         * security out of the box.
         *
-        * Equal to NO_ROOT | SECCOMP | PRIVATE_DEV
+        * Equal to NO_ROOT | SECCOMP | PRIVATE_DEV | NO_LOCALSETTINGS
         *
         * @note This value will change over time to provide increased security
         *       by default, and is not guaranteed to be backwards-compatible.
         * @since 1.31
         */
-       const RESTRICT_DEFAULT = 7;
+       const RESTRICT_DEFAULT = 39;
 
        /**
         * Disallow any root access. Any setuid binaries
@@ -92,6 +93,13 @@ class Shell {
         */
        const NO_EXECVE = 16;
 
+       /**
+        * Deny access to LocalSettings.php (MW_CONFIG_FILE)
+        *
+        * @since 1.31
+        */
+       const NO_LOCALSETTINGS = 32;
+
        /**
         * Returns a new instance of Command class
         *