From 1939859a2e4f7fbf2bff9b68be44764aae89c783 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 19 Nov 2008 17:01:20 +0000 Subject: [PATCH] malloc debugging --- testsudoers.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/testsudoers.c b/testsudoers.c index b0d7be476..c5bcb184b 100644 --- a/testsudoers.c +++ b/testsudoers.c @@ -100,6 +100,13 @@ struct passwd *(*my_getpwuid) __P((uid_t)) = getpwuid; extern char *optarg; extern int optind; +#if defined(SUDO_DEVEL) && defined(__OpenBSD__) +extern char *malloc_options; +#endif +#ifdef YYDEBUG +extern int yydebug; +#endif + int print_alias __P((void *, void *)); void dump_sudoers __P((void)); void print_defaults __P((void)); @@ -133,8 +140,11 @@ main(argc, argv) char *p, *grfile, *pwfile, *runas_group, *runas_user; char hbuf[MAXHOSTNAMELEN + 1]; int ch, dflag, rval, matched; -#ifdef YYDEBUG - extern int yydebug; + +#if defined(SUDO_DEVEL) && defined(__OpenBSD__) + malloc_options = "AFGJPR"; +#endif +#ifdef YYDEBUG yydebug = 1; #endif -- 2.40.0