Only use limit.sh if /bin/bash executable, instead of if linux.
authorBrian Wolff <bawolff+wn@gmail.com>
Fri, 20 Jun 2014 01:13:48 +0000 (22:13 -0300)
committerBrian Wolff <bawolff+wn@gmail.com>
Fri, 20 Jun 2014 01:13:48 +0000 (22:13 -0300)
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

includes/GlobalFunctions.php

index c95c380..eb40e34 100644 (file)
@@ -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'] );