summaryrefslogtreecommitdiff
path: root/libpam
diff options
context:
space:
mode:
Diffstat (limited to 'libpam')
-rw-r--r--libpam/pam_account.c2
-rw-r--r--libpam/pam_audit.c2
-rw-r--r--libpam/pam_auth.c4
-rw-r--r--libpam/pam_password.c2
-rw-r--r--libpam/pam_private.h4
-rw-r--r--libpam/pam_session.c4
-rw-r--r--libpam/pam_start.c2
-rw-r--r--libpam/pam_static.c6
8 files changed, 15 insertions, 11 deletions
diff --git a/libpam/pam_account.c b/libpam/pam_account.c
index 3e579f11..572acc47 100644
--- a/libpam/pam_account.c
+++ b/libpam/pam_account.c
@@ -19,7 +19,7 @@ int pam_acct_mgmt(pam_handle_t *pamh, int flags)
retval = _pam_dispatch(pamh, flags, PAM_ACCOUNT);
-#if HAVE_LIBAUDIT
+#ifdef HAVE_LIBAUDIT
retval = _pam_auditlog(pamh, PAM_ACCOUNT, retval, flags);
#endif
diff --git a/libpam/pam_audit.c b/libpam/pam_audit.c
index acf7da8b..4399e5c6 100644
--- a/libpam/pam_audit.c
+++ b/libpam/pam_audit.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <syslog.h>
-#if HAVE_LIBAUDIT
+#ifdef HAVE_LIBAUDIT
#include <libaudit.h>
#include <pwd.h>
#include <netdb.h>
diff --git a/libpam/pam_auth.c b/libpam/pam_auth.c
index 772e5edf..5984fa59 100644
--- a/libpam/pam_auth.c
+++ b/libpam/pam_auth.c
@@ -45,7 +45,7 @@ int pam_authenticate(pam_handle_t *pamh, int flags)
prelude_send_alert(pamh, retval);
#endif
-#if HAVE_LIBAUDIT
+#ifdef HAVE_LIBAUDIT
retval = _pam_auditlog(pamh, PAM_AUTHENTICATE, retval, flags);
#endif
@@ -71,7 +71,7 @@ int pam_setcred(pam_handle_t *pamh, int flags)
retval = _pam_dispatch(pamh, flags, PAM_SETCRED);
-#if HAVE_LIBAUDIT
+#ifdef HAVE_LIBAUDIT
retval = _pam_auditlog(pamh, PAM_SETCRED, retval, flags);
#endif
diff --git a/libpam/pam_password.c b/libpam/pam_password.c
index 6d566061..7100979f 100644
--- a/libpam/pam_password.c
+++ b/libpam/pam_password.c
@@ -52,7 +52,7 @@ int pam_chauthtok(pam_handle_t *pamh, int flags)
D(("will resume when ready", retval));
}
-#if HAVE_LIBAUDIT
+#ifdef HAVE_LIBAUDIT
retval = _pam_auditlog(pamh, PAM_CHAUTHTOK, retval, flags);
#endif
diff --git a/libpam/pam_private.h b/libpam/pam_private.h
index 8b2cf92c..8b7d9146 100644
--- a/libpam/pam_private.h
+++ b/libpam/pam_private.h
@@ -149,7 +149,7 @@ struct pam_handle {
const char *mod_name; /* Name of the module currently executed */
int choice; /* Which function we call from the module */
-#if HAVE_LIBAUDIT
+#ifdef HAVE_LIBAUDIT
int audit_state; /* keep track of reported audit messages */
#endif
};
@@ -293,7 +293,7 @@ if ((pamh) == NULL) { \
#define __PAM_TO_APP(pamh) \
do { (pamh)->caller_is = _PAM_CALLED_FROM_APP; } while (0)
-#if HAVE_LIBAUDIT
+#ifdef HAVE_LIBAUDIT
extern int _pam_auditlog(pam_handle_t *pamh, int action, int retval, int flags);
extern int _pam_audit_end(pam_handle_t *pamh, int pam_status);
#endif
diff --git a/libpam/pam_session.c b/libpam/pam_session.c
index a0f2d8d7..34532bce 100644
--- a/libpam/pam_session.c
+++ b/libpam/pam_session.c
@@ -22,7 +22,7 @@ int pam_open_session(pam_handle_t *pamh, int flags)
}
retval = _pam_dispatch(pamh, flags, PAM_OPEN_SESSION);
-#if HAVE_LIBAUDIT
+#ifdef HAVE_LIBAUDIT
retval = _pam_auditlog(pamh, PAM_OPEN_SESSION, retval, flags);
#endif
return retval;
@@ -43,7 +43,7 @@ int pam_close_session(pam_handle_t *pamh, int flags)
retval = _pam_dispatch(pamh, flags, PAM_CLOSE_SESSION);
-#if HAVE_LIBAUDIT
+#ifdef HAVE_LIBAUDIT
retval = _pam_auditlog(pamh, PAM_CLOSE_SESSION, retval, flags);
#endif
diff --git a/libpam/pam_start.c b/libpam/pam_start.c
index e1d30034..6f6df6b1 100644
--- a/libpam/pam_start.c
+++ b/libpam/pam_start.c
@@ -88,7 +88,7 @@ int pam_start (
(*pamh)->oldauthtok = NULL;
(*pamh)->fail_delay.delay_fn_ptr = NULL;
(*pamh)->former.choice = PAM_NOT_STACKED;
-#if HAVE_LIBAUDIT
+#ifdef HAVE_LIBAUDIT
(*pamh)->audit_state = 0;
#endif
diff --git a/libpam/pam_static.c b/libpam/pam_static.c
index 75f13414..511026d4 100644
--- a/libpam/pam_static.c
+++ b/libpam/pam_static.c
@@ -84,7 +84,11 @@ voidfunc *_pam_get_static_sym(struct pam_module *mod, const char *symname) {
return ((voidfunc *)NULL);
}
-#endif /* PAM_STATIC */
+#else /* ! PAM_STATIC */
+
+typedef int blarg;
+
+#endif /* ! PAM_STATIC */
/*
* Copyright (C) 1995 by Red Hat Software, Michael K. Johnson