[PATCH 0/3] Fix userspace audit compiler warnings

Tyler Hicks tyhicks at canonical.com
Sat Feb 9 03:12:32 UTC 2013


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




More information about the Linux-audit mailing list