-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reap children before entering main event loop
In the event we have thousands of audit trails to expuire, we go through and expire each one, executing the audit_warn script. We do not reap these children until we enter the main event loop. This change adds a reap check right after the fork/exec operations, if we have over 100 child processes that are waiting to be reaped, do it. This hopefully fixes a denial of service condition when starting up with many audit trail files. In collaboration with: asomers Issue: #35
- Loading branch information
Showing
4 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,6 +65,7 @@ auditwarnlog(char *args[]) | |
| /* | ||
| * Parent. | ||
| */ | ||
| auditd_check_and_reap(); | ||
| return (0); | ||
| } | ||
|
|
||
|
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters