summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-07-29 16:59:40 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-07-29 21:39:52 +0200
commiteb665bf3c8cad7672ec5608d1e86f86a633df595 (patch)
treef27d0efd2e7de347b9c2c088bc756adb9cc808da /settings
parent64094c5384d1731eaf819937ed412b9d7511a130 (diff)
downloadnextcloud-server-eb665bf3c8cad7672ec5608d1e86f86a633df595.tar.gz
nextcloud-server-eb665bf3c8cad7672ec5608d1e86f86a633df595.zip
only call exec() if allowed to
Diffstat (limited to 'settings')
-rwxr-xr-xsettings/admin.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/settings/admin.php b/settings/admin.php
index 704f4519ff6..dd5f969fa1a 100755
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -101,9 +101,11 @@ $tmpl->printPage();
* @return null|string
*/
function findBinaryPath($program) {
- exec('command -v ' . escapeshellarg($program) . ' 2> /dev/null', $output, $returnCode);
- if ($returnCode === 0 && count($output) > 0) {
- return escapeshellcmd($output[0]);
+ if (OC_Helper::is_function_enabled('exec')) {
+ exec('command -v ' . escapeshellarg($program) . ' 2> /dev/null', $output, $returnCode);
+ if ($returnCode === 0 && count($output) > 0) {
+ return escapeshellcmd($output[0]);
+ }
}
return null;
}