From 657a6b2497a8984fd0fa1262c8eb3a1f4e086e15 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Wed, 30 May 2018 19:30:29 -0700 Subject: [PATCH] Use PHP7 constant expression instead of a magic number Change-Id: I84e13dc6019c429359df3395f0731d17859be06c --- includes/shell/Shell.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/includes/shell/Shell.php b/includes/shell/Shell.php index 742e1424ad..3f10c11a32 100644 --- a/includes/shell/Shell.php +++ b/includes/shell/Shell.php @@ -43,18 +43,6 @@ use MediaWiki\MediaWikiServices; */ class Shell { - /** - * Apply a default set of restrictions for improved - * security out of the box. - * - * 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 = 39; - /** * Disallow any root access. Any setuid binaries * will be run without elevated access. @@ -101,6 +89,17 @@ class Shell { */ const NO_LOCALSETTINGS = 32; + /** + * Apply a default set of restrictions for improved + * security out of the box. + * + * @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 = self::NO_ROOT | self::SECCOMP | self::PRIVATE_DEV | + self::NO_LOCALSETTINGS; + /** * Don't apply any restrictions * -- 2.20.1