Skip to content

Commit 072be22

Browse files
committed
jailkit: fix bash test (closes #6042)
1 parent 1edf68e commit 072be22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/lib/classes/cron.d/600-jailkit_maintenance.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ public function onRunJob() {
114114
if (is_file( $rec['document_root']."/bin/bash" )) {
115115
# test that /bin/bash functions in the jail
116116
print "chroot --userspec ".$rec['system_user'].":".$rec['system_group']." ".$rec['document_root']." /bin/bash -c true 2>/dev/null\n";
117-
if (! $app->system->exec_safe("chroot --userspec ?:? ? /bin/bash -c true 2>/dev/null", $rec['system_user'], $rec['system_group'], $rec['document_root'])) {
117+
$app->system->exec_safe("chroot --userspec ?:? ? /bin/bash -c true 2>/dev/null", $rec['system_user'], $rec['system_group'], $rec['document_root']);
118+
if ($app->system->last_exec_retcode()) { # return 0 means success
118119
print "/bin/bash test failed, forcing update\n";
119120
$options[] = 'force';
120121
# bogus hash will not match, triggering an update

0 commit comments

Comments
 (0)