Skip to content

Commit

Permalink
Add check for Apache running as SYSTEm on Windows and provide warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Dec 12, 2023
1 parent 7b460c2 commit 0ea8337
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Models/DiscoveriesModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,11 @@ public function permissions()
log_message('error', "Cannot find Nmap.");
}
}
if (php_uname('s') === 'Windows NT') {
if (strtolower(get_current_user()) === 'system') {
$warning = 'The Apache service is running as SYSTEM. Discoveries will not function. Please see this wiki page and make the configuration change. <a href="https://community.opmantek.com/display/OA/Running+Open-AudIT+Apache+Service+under+Windows" target="_blank">Running Open-AudIT Apache Service under Windows</a>.';
}
}
if (!empty($warning)) {
\Config\Services::session()->setFlashdata('warning', $warning);
}
Expand Down

0 comments on commit 0ea8337

Please sign in to comment.