From: Brian Wolff Date: Fri, 20 Jun 2014 01:13:48 +0000 (-0300) Subject: Only use limit.sh if /bin/bash executable, instead of if linux. X-Git-Tag: 1.31.0-rc.0~15248^2 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=3e108ea4d84c3ba0173c292e77ef1ab18102650d;p=lhc%2Fweb%2Fwiklou.git Only use limit.sh if /bin/bash executable, instead of if linux. gute on irc just mentioned how his BusyBox server identifies as linux but doesn't have bash installed. Additionally I see no reason to limit limit.sh to linux, if for example somebody has installed bash on a different *nix. Change-Id: I51677295ab6bbc58fc5152106cf2c4c32bd1b0ea --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index c95c380541..eb40e34325 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2891,7 +2891,7 @@ function wfShellExec( $cmd, &$retval = null, $environ = array(), $cmd = $envcmd . $cmd; $useLogPipe = false; - if ( php_uname( 's' ) == 'Linux' ) { + if ( is_executable( '/bin/bash' ) ) { $time = intval ( isset( $limits['time'] ) ? $limits['time'] : $wgMaxShellTime ); if ( isset( $limits['walltime'] ) ) { $wallTime = intval( $limits['walltime'] );