mirror of
https://github.com/systemd/systemd
synced 2025-11-22 10:14:45 +01:00
Compare commits
3 Commits
278953167d
...
4f21c3d9b7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f21c3d9b7 | ||
|
|
1fbe44d013 | ||
|
|
f497a3f1c3 |
@ -23,7 +23,7 @@ static DLSYM_PROTOTYPE(audit_open) = NULL;
|
|||||||
|
|
||||||
int dlopen_libaudit(void) {
|
int dlopen_libaudit(void) {
|
||||||
#if HAVE_AUDIT
|
#if HAVE_AUDIT
|
||||||
ELF_NOTE_DLOPEN("libaudit",
|
ELF_NOTE_DLOPEN("audit",
|
||||||
"Support for Audit logging",
|
"Support for Audit logging",
|
||||||
ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
|
ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
|
||||||
"libaudit.so.1");
|
"libaudit.so.1");
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
#include "stdio-util.h"
|
#include "stdio-util.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
|
|
||||||
#if HAVE_PAM
|
|
||||||
static void *libpam_dl = NULL;
|
static void *libpam_dl = NULL;
|
||||||
|
|
||||||
DLSYM_PROTOTYPE(pam_acct_mgmt) = NULL;
|
DLSYM_PROTOTYPE(pam_acct_mgmt) = NULL;
|
||||||
@ -36,7 +35,7 @@ DLSYM_PROTOTYPE(pam_syslog) = NULL;
|
|||||||
DLSYM_PROTOTYPE(pam_vsyslog) = NULL;
|
DLSYM_PROTOTYPE(pam_vsyslog) = NULL;
|
||||||
|
|
||||||
int dlopen_libpam(void) {
|
int dlopen_libpam(void) {
|
||||||
ELF_NOTE_DLOPEN("libpam",
|
ELF_NOTE_DLOPEN("pam",
|
||||||
"Support for LinuxPAM",
|
"Support for LinuxPAM",
|
||||||
ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
|
ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
|
||||||
"libpam.so.0");
|
"libpam.so.0");
|
||||||
@ -61,7 +60,6 @@ int dlopen_libpam(void) {
|
|||||||
DLSYM_ARG(pam_syslog),
|
DLSYM_ARG(pam_syslog),
|
||||||
DLSYM_ARG(pam_vsyslog));
|
DLSYM_ARG(pam_vsyslog));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void pam_log_setup(void) {
|
void pam_log_setup(void) {
|
||||||
/* Make sure we don't leak the syslog fd we open by opening/closing the fd each time. */
|
/* Make sure we don't leak the syslog fd we open by opening/closing the fd each time. */
|
||||||
|
|||||||
@ -1,14 +1,13 @@
|
|||||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <syslog.h>
|
|
||||||
|
|
||||||
#include "forward.h"
|
#include "forward.h"
|
||||||
|
|
||||||
#if HAVE_PAM
|
#if HAVE_PAM
|
||||||
#include <security/pam_appl.h>
|
#include <security/pam_appl.h>
|
||||||
#include <security/pam_ext.h>
|
#include <security/pam_ext.h>
|
||||||
#include <security/pam_modules.h> /* IWYU pragma: export */
|
#include <security/pam_modules.h> /* IWYU pragma: export */
|
||||||
|
#include <syslog.h>
|
||||||
|
|
||||||
#include "dlfcn-util.h"
|
#include "dlfcn-util.h"
|
||||||
|
|
||||||
@ -29,7 +28,6 @@ extern DLSYM_PROTOTYPE(pam_syslog);
|
|||||||
extern DLSYM_PROTOTYPE(pam_vsyslog);
|
extern DLSYM_PROTOTYPE(pam_vsyslog);
|
||||||
|
|
||||||
int dlopen_libpam(void);
|
int dlopen_libpam(void);
|
||||||
#endif
|
|
||||||
|
|
||||||
void pam_log_setup(void);
|
void pam_log_setup(void);
|
||||||
|
|
||||||
@ -77,3 +75,11 @@ int pam_get_data_many_internal(pam_handle_t *handle, ...) _sentinel_;
|
|||||||
#define pam_get_data_many(handle, ...) pam_get_data_many_internal(handle, __VA_ARGS__, NULL)
|
#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);
|
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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user