From: Karel Zak Date: Thu, 27 Feb 2020 13:04:55 +0000 (+0100) Subject: hwclock: fix audit exit status X-Git-Tag: v2.36-rc1~208 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=189edf1fe501ea39b35911337eab1740888fae7a;p=thirdparty%2Futil-linux.git 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 --- diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 1191a85715..89d8a1fd93 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