#include "stdio-util.h"
#include "string-util.h"
-#if HAVE_PAM
static void *libpam_dl = NULL;
DLSYM_PROTOTYPE(pam_acct_mgmt) = NULL;
DLSYM_ARG(pam_syslog),
DLSYM_ARG(pam_vsyslog));
}
-#endif
void pam_log_setup(void) {
/* Make sure we don't leak the syslog fd we open by opening/closing the fd each time. */
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include <syslog.h>
-
#include "forward.h"
#if HAVE_PAM
#include <security/pam_appl.h>
#include <security/pam_ext.h>
#include <security/pam_modules.h> /* IWYU pragma: export */
+#include <syslog.h>
#include "dlfcn-util.h"
extern DLSYM_PROTOTYPE(pam_vsyslog);
int dlopen_libpam(void);
-#endif
void pam_log_setup(void);
#define pam_get_data_many(handle, ...) pam_get_data_many_internal(handle, __VA_ARGS__, NULL)
int pam_prompt_graceful(pam_handle_t *handle, int style, char **ret_response, const char *fmt, ...) _printf_(4,5);
+
+#else
+
+static inline int dlopen_libpam(void) {
+ return -EOPNOTSUPP;
+}
+
+#endif