summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schubert <schubi@suse.de>2022-01-13 14:48:39 +0100
committerDmitry V. Levin <ldv@altlinux.org>2022-01-13 13:48:39 +0000
commit3366e250e5f336303f095518726a9cb2de7c2f46 (patch)
treeaf746609880cba3810707cdeba034739237d5216
parent14ea1011c64648462bb795c6c5ceb66dae5787b7 (diff)
downloadlinux-pam-git-3366e250e5f336303f095518726a9cb2de7c2f46.tar.gz
pam_rootok: fix compilation warning when HAVE_LIBAUDIT is not defined
* modules/pam_rootok/pam_rootok.c (log_callback): Move audit_fd definition under HAVE_LIBAUDIT guard.
-rw-r--r--modules/pam_rootok/pam_rootok.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/pam_rootok/pam_rootok.c b/modules/pam_rootok/pam_rootok.c
index dd374c53..9bc15abf 100644
--- a/modules/pam_rootok/pam_rootok.c
+++ b/modules/pam_rootok/pam_rootok.c
@@ -53,11 +53,10 @@ static int
PAM_FORMAT((printf, 2, 3))
log_callback (int type UNUSED, const char *fmt, ...)
{
- int audit_fd;
va_list ap;
#ifdef HAVE_LIBAUDIT
- audit_fd = audit_open();
+ int audit_fd = audit_open();
if (audit_fd >= 0) {
char *buf;