From: Aryeh Gregor Date: Wed, 18 Aug 2010 23:20:56 +0000 (+0000) Subject: Run ulimit4.sh using /bin/bash to avoid noexec X-Git-Tag: 1.31.0-rc.0~35446 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=9064ec1bd38dedbacab157d3d4841e3315b5e5d9;p=lhc%2Fweb%2Fwiklou.git Run ulimit4.sh using /bin/bash to avoid noexec Panora200 on IRC reported the error "/bin/bash: bad interpreter: Permission denied", which we tracked down to the fact that /var/www (or whatever) was mounted noexec. Prepending '/bin/bash ' to the command line should fix it. Not heavily tested -- I only checked that wfShellExec() seemed to work from eval.php for trivial uses. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2e72a5cbcb..08bfc52373 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -294,6 +294,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN longer pollutes the parser cache. * (bug 17031) Correct which characters the parser allows in tag attributes. * Save 200 useless queries on each category page view +* Shell commands will now work on Linux in filesystems mounted noexec === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 6a2139c1d8..08b8c609a5 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2454,7 +2454,7 @@ function wfShellExec( $cmd, &$retval = null ) { if ( $time > 0 && $mem > 0 ) { $script = "$IP/bin/ulimit4.sh"; if ( is_executable( $script ) ) { - $cmd = escapeshellarg( $script ) . " $time $mem $filesize " . escapeshellarg( $cmd ); + $cmd = '/bin/bash ' . escapeshellarg( $script ) . " $time $mem $filesize " . escapeshellarg( $cmd ); } } } elseif ( php_uname( 's' ) == 'Windows NT' && @@ -3472,4 +3472,4 @@ function wfGetRepository() { } return $wgRepository; -} \ No newline at end of file +}