From 3e108ea4d84c3ba0173c292e77ef1ab18102650d Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Thu, 19 Jun 2014 22:13:48 -0300 Subject: [PATCH] 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 --- includes/GlobalFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'] ); -- 2.20.1