aboutsummaryrefslogtreecommitdiffstats
path: root/linux/SELinuxMeter.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/SELinuxMeter.c')
-rw-r--r--linux/SELinuxMeter.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/linux/SELinuxMeter.c b/linux/SELinuxMeter.c
index 892f1e8..e3b076d 100644
--- a/linux/SELinuxMeter.c
+++ b/linux/SELinuxMeter.c
@@ -5,18 +5,17 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
-#include "SELinuxMeter.h"
+#include "linux/SELinuxMeter.h"
#include "CRT.h"
#include <stdbool.h>
+#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
-#include <linux/magic.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
-#include "Macros.h"
#include "Object.h"
#include "XUtils.h"
@@ -35,7 +34,7 @@ static bool hasSELinuxMount(void) {
return false;
}
- if ((uint32_t)sfbuf.f_type != (uint32_t)SELINUX_MAGIC) {
+ if ((uint32_t)sfbuf.f_type != /* SELINUX_MAGIC */ 0xf97cff8cU) {
return false;
}
@@ -70,11 +69,11 @@ static bool isSelinuxEnforcing(void) {
return !!enforce;
}
-static void SELinuxMeter_updateValues(ATTR_UNUSED Meter* this, char* buffer, size_t len) {
+static void SELinuxMeter_updateValues(Meter* this) {
enabled = isSelinuxEnabled();
enforcing = isSelinuxEnforcing();
- xSnprintf(buffer, len, "%s%s", enabled ? "enabled" : "disabled", enabled ? (enforcing ? "; mode: enforcing" : "; mode: permissive") : "");
+ xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%s%s", enabled ? "enabled" : "disabled", enabled ? (enforcing ? "; mode: enforcing" : "; mode: permissive") : "");
}
const MeterClass SELinuxMeter_class = {

© 2014-2024 Faster IT GmbH | imprint | privacy policy