The function is marked with `warn_unused_result` so handle the return
value. Failures of `audit_open()` are also silently ignored so do the
same for `audit_log_acct_message()` itself.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
if (!pwd && cxt->username)
pwd = getpwnam(cxt->username);
- audit_log_acct_message(audit_fd,
- AUDIT_USER_LOGIN,
- NULL,
- "login",
- cxt->username ? cxt->username : "(unknown)",
- pwd ? pwd->pw_uid : (unsigned int)-1,
- cxt->hostname,
- NULL,
- cxt->tty_name,
- status);
+ ignore_result( audit_log_acct_message(audit_fd,
+ AUDIT_USER_LOGIN,
+ NULL,
+ "login",
+ cxt->username ? cxt->username : "(unknown)",
+ pwd ? pwd->pw_uid : (unsigned int)-1,
+ cxt->hostname,
+ NULL,
+ cxt->tty_name,
+ status) );
close(audit_fd);
}