[Rpm-maint] [PATCH 5/5] Include system.h in ima and syslog plugins
Gleb Fotengauer-Malinovskiy
glebfm at altlinux.org
Thu Mar 23 18:23:08 UTC 2017
Currently, there is no harm if config.h is not included in these files
because they are not sensitive to macros defined in config.h, but any
code added later or any plugin created using these plugins as examples
might be affected by these macros and therefore has to include config.h.
An example of bug when this header is not included properly can be seen
in the previous commit.
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm at altlinux.org>
---
plugins/ima.c | 2 ++
plugins/syslog.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/plugins/ima.c b/plugins/ima.c
index 55a4b27..fe6d3ad 100644
--- a/plugins/ima.c
+++ b/plugins/ima.c
@@ -1,3 +1,5 @@
+#include "system.h"
+
#include <errno.h>
#include <sys/xattr.h>
diff --git a/plugins/syslog.c b/plugins/syslog.c
index caae016..5f22f98 100644
--- a/plugins/syslog.c
+++ b/plugins/syslog.c
@@ -1,3 +1,5 @@
+#include "system.h"
+
#include <syslog.h>
#include <rpm/rpmts.h>
--
glebfm
More information about the Rpm-maint
mailing list