aboutsummaryrefslogtreecommitdiff
path: root/libpam_internal
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@stoeckmann.org>2024-01-22 21:17:35 +0100
committerTobias Stoeckmann <tobias@stoeckmann.org>2024-01-24 18:19:29 +0100
commit54a0aee65b3d8129a55ece62ab8540f1cac3e929 (patch)
tree63e926ebaed3cb371d0cfdc6c9f742e54a05f7bf /libpam_internal
parent8f9d8239344354c5c80d85a326b1a6c6661ea9b6 (diff)
downloadpam-54a0aee65b3d8129a55ece62ab8540f1cac3e929.tar.gz
pam-54a0aee65b3d8129a55ece62ab8540f1cac3e929.tar.bz2
pam-54a0aee65b3d8129a55ece62ab8540f1cac3e929.zip
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 <tobias@stoeckmann.org>
Diffstat (limited to 'libpam_internal')
-rw-r--r--libpam_internal/Makefile.am6
-rw-r--r--libpam_internal/pam_debug.c21
2 files changed, 27 insertions, 0 deletions
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 <gafton@redhat.com>
+ */
+
+#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 */