OPENPAM_DEBUG (--enable-debug) has a double action: it enables the

debugging macros, and sets the initial value of openpam_debug to 1.
This effectively gives the user a choice between no debugging at all,
or drowning in debugging messages from every part of the system.

Assuming that the primary use case for debugging is to allow admins to
troubleshoot their policies by adding the debug option to selected
pam.conf entries, remove the initialization of openpam_debug to 1.
This allows integrators to ship OpenPAM with OPENPAM_DEBUG defined
without spamming /var/log.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@684 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
Dag-Erling Smørgrav 2013-04-14 15:44:32 +00:00
parent a43b9256fc
commit 3ab09a4f26
3 changed files with 3 additions and 6 deletions

View File

@ -17,6 +17,7 @@ export CONFIG_SHELL=/bin/sh
--with-pamtest \
--with-su \
--with-modules-dir=/usr/lib \
--enable-debug \
--enable-developer-warnings \
--enable-werror \
"$@"

View File

@ -31,8 +31,8 @@ AC_DEFINE_UNQUOTED(LIB_MAJ, $LIB_MAJ, [OpenPAM library major number])
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug],
[turn debugging on by default]),
AC_DEFINE(OPENPAM_DEBUG, 1, [Turn debugging on by default]))
[turn debugging macros on]),
AC_DEFINE(OPENPAM_DEBUG, 1, [Turn debugging macros on]))
AC_ARG_ENABLE([unversioned-modules],
AC_HELP_STRING([--disable-unversioned-modules],

View File

@ -50,11 +50,7 @@
#include "openpam_impl.h"
#include "openpam_asprintf.h"
#ifdef OPENPAM_DEBUG
int openpam_debug = 1;
#else
int openpam_debug = 0;
#endif
#if !defined(openpam_log)