32 lines
1005 B
Diff
32 lines
1005 B
Diff
From 189edf1fe501ea39b35911337eab1740888fae7a Mon Sep 17 00:00:00 2001
|
|
From: Karel Zak <kzak@redhat.com>
|
|
Date: Thu, 27 Feb 2020 14:04:55 +0100
|
|
Subject: [PATCH 089/389] hwclock: fix audit exit status
|
|
|
|
According to audit_log_user_message(3) result 1 is "success" and 0 is
|
|
"failed", we use standard EXIT_{SUCCESS,FAILURE} macros with reverse
|
|
status.
|
|
|
|
Addresses: https://github.com/karelzak/util-linux/issues/966
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
---
|
|
sys-utils/hwclock.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
|
|
index 1191a85..89d8a1f 100644
|
|
--- a/sys-utils/hwclock.c
|
|
+++ b/sys-utils/hwclock.c
|
|
@@ -1464,7 +1464,7 @@ hwclock_exit(const struct hwclock_control *ctl
|
|
if (ctl->hwaudit_on && !ctl->testing) {
|
|
audit_log_user_message(hwaudit_fd, AUDIT_USYS_CONFIG,
|
|
"op=change-system-time", NULL, NULL, NULL,
|
|
- status);
|
|
+ status == EXIT_SUCCESS ? 1 : 0);
|
|
}
|
|
close(hwaudit_fd);
|
|
#endif
|
|
--
|
|
1.8.3.1
|
|
|