From 54a0aee65b3d8129a55ece62ab8540f1cac3e929 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Mon, 22 Jan 2024 21:17:35 +0100 Subject: libpam_internal: supply debug functionality Move function bodies from headers into dedicated object files stored in libpam_internal. This library won't be installed. Keep the debug function body in header, even though disabled when building Linux-PAM, to stay API compatible with previous versions. Signed-off-by: Tobias Stoeckmann --- libpam_internal/Makefile.am | 6 ++++++ libpam_internal/pam_debug.c | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 libpam_internal/Makefile.am create mode 100644 libpam_internal/pam_debug.c (limited to 'libpam_internal') diff --git a/libpam_internal/Makefile.am b/libpam_internal/Makefile.am new file mode 100644 index 00000000..354b63aa --- /dev/null +++ b/libpam_internal/Makefile.am @@ -0,0 +1,6 @@ +noinst_LTLIBRARIES = libpam_internal.la + +AM_CFLAGS = -I$(top_srcdir)/libpam/include $(WARN_CFLAGS) + +libpam_internal_la_SOURCES = \ + pam_debug.c diff --git a/libpam_internal/pam_debug.c b/libpam_internal/pam_debug.c new file mode 100644 index 00000000..e4608f4d --- /dev/null +++ b/libpam_internal/pam_debug.c @@ -0,0 +1,21 @@ +/* + * This provides the necessary functions to do debugging in PAM. + * Cristian Gafton + */ + +#include "config.h" + +#ifdef PAM_DEBUG + +#include "security/_pam_macros.h" + +#undef PAM_MACROS_H +#undef PAM_NO_HEADER_FUNCTIONS +#define PAM_DEBUG_C 1 +#include "security/_pam_macros.h" + +#else + +extern int ISO_C_forbids_an_empty_translation_unit; + +#endif /* PAM_DEBUG */ -- cgit v1.2.3