audisp-syslog: include <unistd.h> for getppid() - #551
Merged
stevegrubb merged 1 commit intoSep 14, 2026
Merged
Conversation
audisp-syslog.c calls getppid() from its SIGTERM handler but never
includes <unistd.h>. glibc happens to expose the prototype through
another header the plugin already pulls in, so the build stays quiet
there. On musl the leak does not happen, and the compile fails with
audisp-syslog.c: In function 'term_handler':
audisp-syslog.c: error: implicit declaration of function 'getppid'
Every sibling audisp plugin (af_unix, filter, ids, remote, statsd,
zos-remote) already includes <unistd.h> for the same reason. Match
them.
Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
Signed-off-by: Itxaka <itxaka@kairos.io>
|
PR was automated with agent but fix was done manually by me a human, as commented, while adding autdit to hadron I hit this issue. |
Contributor
|
Looks good. Thanks for the patch. |
that was fast, thank you! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
audisp/plugins/syslog/audisp-syslog.ccallsgetppid()from itsSIGTERMhandler but never includes<unistd.h>.On glibc the prototype leaks in via another header the plugin already pulls in, so the build stays quiet. On musl there is no such leak and the compile fails:
Every sibling audisp plugin (
af_unix,filter,ids,remote,statsd,zos-remote) already includes<unistd.h>for the same reason — this just matches them.Downstream context
Hit while building
audit-userspace4.2.1 for Hadron Linux (musl-based minimal distro). Carrying the patch downstream, but the fix belongs upstream so every musl consumer stops hitting it.