From cb7734d4080f3673a34594ee4c6e7b02dcd89f33 Mon Sep 17 00:00:00 2001 From: "Andrew G. Morgan" Date: Sun, 9 Dec 2001 21:44:58 +0000 Subject: Relevant BUGIDs: 485454 Purpose of commit: cleanup Commit summary: --------------- The malloc debugging stuff appears to have had a few residual issues that I've fixed (trying to resolve another checkin!). --- libpam/Makefile | 2 +- libpam/pam_malloc.c | 3 ++- modules/pam_filter/upperLOWER/upperLOWER.c | 4 ++++ modules/pam_pwdb/pwdb_chkpwd.c | 6 ++++++ modules/pam_tally/pam_tally.c | 4 ++++ modules/pam_unix/unix_chkpwd.c | 6 ++++++ 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 @@ -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 +#ifdef MEMORY_DEBUG +# undef exit +#endif /* MEMORY_DEBUG */ + #include #include #include 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 +#ifdef MEMORY_DEBUG +# undef exit +# undef strdup +# undef free +#endif /* MEMORY_DEBUG */ + #include #include #include 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 +#if defined(MAIN) && defined(MEMORY_DEBUG) +# undef exit +#endif /* defined(MAIN) && defined(MEMORY_DEBUG) */ + #include #include #include 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 +#ifdef MEMORY_DEBUG +# undef exit +# undef strdup +# undef free +#endif /* MEMORY_DEBUG */ + #include #include #include -- cgit v1.2.3