Fix userspace audit compiler warnings
Status from this message: Applied. I think there are a couple places where it will obviously segfault in
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | Don't ignore the return value of asprintf()audisp/ audisp/ auparse/ +4 more | +232 | 1 reply | |
| 2/3 | Fix Wunused-return warningsaudisp/ src/ src/ +1 more | +79 | 2 replies | |
| 3/3 | Fix discards 'const' qualifier from pointer target type warningssrc/ src/ src/ +1 more | +10 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] Fix userspace audit compiler warnings
These patches fix the majority of compiler warnings seen when building audit on Ubuntu.
The audit codebase rarely checked the return value of asprintf(), which can cause problems if memory allocation fails. Most of the missing checks are in libauparse, which is probably fine but who knows what will use it in the future. Also, all of these warnings clutter up the build output and make it more difficult to see more serious warnings.
The second patch contains some other ignored return value warnings fixes, as well. These show up on Ubuntu when the -D_FORTIFY_SOURCE=2 and -Wunused-return flags are in use. They don't seem to show up on Fedora in the same situation, but I believe that they should, despite casting the function's return value to (void). Despite that, they looked to be areas in the code that should at least log a message or even prevent auditd from running in some situations.
The last patch cleans up two const warnings.
There are still a number of warnings in the zos-remote audispd plugin that I didn't get to and a few that look ok to me in the embedded libev code.
Tyler