summaryrefslogtreecommitdiffstats
path: root/contrib/openpam/lib/openpam_log.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-05-02 15:08:06 +0000
committerdes <des@FreeBSD.org>2003-05-02 15:08:06 +0000
commit69e4c91a9aeb151a806e8ba3c53ab38f37f5e8dc (patch)
treeb955e81987ebbd36890b09fa581ab99357d954bc /contrib/openpam/lib/openpam_log.c
parent5a81fa192a3c014aa2d5841433693479b4641619 (diff)
parent1b2b5956a02e1d56168e372dc96807d70b3ca363 (diff)
downloadFreeBSD-src-69e4c91a9aeb151a806e8ba3c53ab38f37f5e8dc.zip
FreeBSD-src-69e4c91a9aeb151a806e8ba3c53ab38f37f5e8dc.tar.gz
This commit was generated by cvs2svn to compensate for changes in r114536,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/openpam/lib/openpam_log.c')
-rw-r--r--contrib/openpam/lib/openpam_log.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/contrib/openpam/lib/openpam_log.c b/contrib/openpam/lib/openpam_log.c
index 23a51d5..0758580 100644
--- a/contrib/openpam/lib/openpam_log.c
+++ b/contrib/openpam/lib/openpam_log.c
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/openpam/lib/openpam_log.c#17 $
+ * $P4: //depot/projects/openpam/lib/openpam_log.c#18 $
*/
#include <ctype.h>
@@ -45,6 +45,8 @@
#include "openpam_impl.h"
+int _openpam_debug = 0;
+
#if defined(openpam_log)
/*
@@ -62,12 +64,10 @@ _openpam_log(int level, const char *func, const char *fmt, ...)
switch (level) {
case PAM_LOG_DEBUG:
-#ifndef DEBUG
- return;
-#else
+ if (!_openpam_debug)
+ return;
priority = LOG_DEBUG;
break;
-#endif
case PAM_LOG_VERBOSE:
priority = LOG_INFO;
break;
@@ -108,12 +108,10 @@ openpam_log(int level, const char *fmt, ...)
switch (level) {
case PAM_LOG_DEBUG:
-#ifndef DEBUG
- return;
-#else
+ if (!_openpam_debug)
+ return;
priority = LOG_DEBUG;
break;
-#endif
case PAM_LOG_VERBOSE:
priority = LOG_INFO;
break;
OpenPOWER on IntegriCloud