Conversation
|
Pinging @elastic/secops |
There was a problem hiding this comment.
Yes, it's not, but I cannot just add a defer because I cannot call the functions from it, it panics. It's currently a singleton so it exists only once per process. Putting it in the Metricset structure would be possible, but requires a bigger refactoring of the whole module. Let me know if you think it's worth doing it anyway.
There was a problem hiding this comment.
That should be find then. I guess I missed the if cFun == nil check surrounding its usage.
+ test that the exec and the programmatic method give the same results.
Tested the resulting RPM on Centos.
18606ec to
4579eb4
Compare
andrewkroh
left a comment
There was a problem hiding this comment.
It should be good to merge after adding that platform filter to the magefile.go.
There was a problem hiding this comment.
That should be find then. I guess I missed the if cFun == nil check surrounding its usage.
| "linux/ppc64le": installLinuxPPC64LE, | ||
| "linux/s390x": installLinuxS390X, | ||
|
|
||
| //"linux/ppc64": installLinuxPpc64, |
There was a problem hiding this comment.
A few lines up in init() add a filter to prevent mage package from attempting to build these targets.
mage.Platforms = mage.Platforms.Filter("!linux/ppc64 !linux/mips64")
This is similar to what journalbeat has but with the linux selector.
Lines 35 to 38 in 1411852
|
Superseded by #10429 |
This adds support for programmatically reading the list of RPM packages. The previous version was using exec (called the rpm binary), but we'd like to keep Auditbeat exec free, because execs are currently blocked by seccomp, as a security feature.
Using the model from Journalbeat, the new code uses
dlopenget the relevant C functions and calls them using CGo. This means thatlibrpmis not a hard dependency, but only for when this functionality is needed.Ready for reviews, but there's a couple of things left to do:
mage package(we need librpm-devel).rpmcommmand, but that test is skipped on on non-Redhat systems. Currently, we run all tests in a Debian based docker image.Part of #8725.