summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpam/Makefile2
-rw-r--r--libpam/pam_malloc.c3
-rw-r--r--modules/pam_filter/upperLOWER/upperLOWER.c4
-rw-r--r--modules/pam_pwdb/pwdb_chkpwd.c6
-rw-r--r--modules/pam_tally/pam_tally.c4
-rw-r--r--modules/pam_unix/unix_chkpwd.c6
6 files changed, 23 insertions, 2 deletions
diff --git a/libpam/Makefile b/libpam/Makefile
index 61958527..cf49f627 100644
--- a/libpam/Makefile
+++ b/libpam/Makefile
@@ -44,7 +44,7 @@ else
MODULES =
endif
-ifdef WITH_MEMORY_DEBUG
+ifeq ($(WITH_MEMORY_DEBUG),yes)
EXTRAS += pam_malloc.o
endif
diff --git a/libpam/pam_malloc.c b/libpam/pam_malloc.c
index 540dceef..75a1045d 100644
--- a/libpam/pam_malloc.c
+++ b/libpam/pam_malloc.c
@@ -23,7 +23,6 @@
#ifndef DEBUG
#define DEBUG
#endif
-
#include "pam_private.h"
#include <security/pam_malloc.h>
@@ -385,6 +384,8 @@ void *pam_alloca(size_t size
void pam_exit(int i
, const char *file, const char *fn, const int line)
{
+ D(("time to exit"));
+
_fn("exit");
if (on(0)) err(("passed (%d)", i));
diff --git a/modules/pam_filter/upperLOWER/upperLOWER.c b/modules/pam_filter/upperLOWER/upperLOWER.c
index c5f9366c..e750e877 100644
--- a/modules/pam_filter/upperLOWER/upperLOWER.c
+++ b/modules/pam_filter/upperLOWER/upperLOWER.c
@@ -9,6 +9,10 @@
#include <security/_pam_aconf.h>
+#ifdef MEMORY_DEBUG
+# undef exit
+#endif /* MEMORY_DEBUG */
+
#include <stdio.h>
#include <stdlib.h>
#include <syslog.h>
diff --git a/modules/pam_pwdb/pwdb_chkpwd.c b/modules/pam_pwdb/pwdb_chkpwd.c
index 36cf0984..e4fe38f8 100644
--- a/modules/pam_pwdb/pwdb_chkpwd.c
+++ b/modules/pam_pwdb/pwdb_chkpwd.c
@@ -15,6 +15,12 @@
#include <security/_pam_aconf.h>
+#ifdef MEMORY_DEBUG
+# undef exit
+# undef strdup
+# undef free
+#endif /* MEMORY_DEBUG */
+
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/modules/pam_tally/pam_tally.c b/modules/pam_tally/pam_tally.c
index e0b60dec..3da37f40 100644
--- a/modules/pam_tally/pam_tally.c
+++ b/modules/pam_tally/pam_tally.c
@@ -13,6 +13,10 @@
#include <security/_pam_aconf.h>
+#if defined(MAIN) && defined(MEMORY_DEBUG)
+# undef exit
+#endif /* defined(MAIN) && defined(MEMORY_DEBUG) */
+
#include <stdio.h>
#include <string.h>
#include <unistd.h>
diff --git a/modules/pam_unix/unix_chkpwd.c b/modules/pam_unix/unix_chkpwd.c
index 0a965190..9581d046 100644
--- a/modules/pam_unix/unix_chkpwd.c
+++ b/modules/pam_unix/unix_chkpwd.c
@@ -15,6 +15,12 @@
#include <security/_pam_aconf.h>
+#ifdef MEMORY_DEBUG
+# undef exit
+# undef strdup
+# undef free
+#endif /* MEMORY_DEBUG */
+
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>