aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2024-07-28 08:00:00 +0000
committerDmitry V. Levin <ldv@strace.io>2024-07-28 08:00:00 +0000
commitc8dbebd410d7643b3577ce786e6634635106f877 (patch)
treeffa56a0f95f44f9fddd8a3f891fe1b55c5ac0e25 /modules
parentfa3295e079dbbc241906f29bde5fb71bc4172771 (diff)
downloadpam-c8dbebd410d7643b3577ce786e6634635106f877.tar.gz
pam-c8dbebd410d7643b3577ce786e6634635106f877.tar.bz2
pam-c8dbebd410d7643b3577ce786e6634635106f877.zip
pam_faillock: silence compilation warning
Since audit_log_acct_message() was decorated with warn_unused_result attribute, compilation of faillock helper produces the following diagnostics: main.c: In function 'do_user': main.c:250:25: warning: ignoring return value of 'audit_log_acct_message' declared with attribute 'warn_unused_result' [-Wunused-result] Given that this helper has never been picky about audit, e.g. audit_open() errors do not affect its exit status, just silence this new warning. * modules/pam_faillock/main.c [HAVE_LIBAUDIT] (do_user): Silence compilation warning.
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_faillock/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/pam_faillock/main.c b/modules/pam_faillock/main.c
index 136be834..57989ba6 100644
--- a/modules/pam_faillock/main.c
+++ b/modules/pam_faillock/main.c
@@ -247,7 +247,8 @@ do_user(struct options *opts, const char *user)
#ifdef HAVE_LIBAUDIT
}
if ((audit_fd=audit_open()) >= 0) {
- audit_log_acct_message(audit_fd, AUDIT_USER_MGMT, NULL,
+ (void) !audit_log_acct_message(audit_fd,
+ AUDIT_USER_MGMT, NULL,
"faillock-reset", user,
pwd != NULL ? pwd->pw_uid : AUDIT_NO_ID,
NULL, NULL, NULL, rv == 0);