2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Add plugin_setjmp() wrapper for siglongjmp(error_jmp, 1) so we don't

need error_jmp to be extern.  Also add plugin_clearjmp() that clears
a flag so error()/errorx() knows when to call exit() vs. longjmp().
This commit is contained in:
Todd C. Miller
2012-11-25 09:34:26 -05:00
parent d658d12195
commit 5496ffe1e8
6 changed files with 49 additions and 24 deletions

View File

@@ -74,8 +74,6 @@ static int should_mail(int);
static void mysyslog(int, const char *, ...);
static char *new_logline(const char *, int);
extern sigjmp_buf error_jmp;
extern char **NewArgv; /* XXX - for auditing */
#define MAXSYSLOGTRIES 16 /* num of retries for broken syslogs */
@@ -529,7 +527,7 @@ log_fatal(int flags, const char *fmt, ...)
/* Exit the plugin. */
sudoers_cleanup(0);
sudo_debug_exit(__func__, __FILE__, __LINE__, sudo_debug_subsys);
siglongjmp(error_jmp, 1);
plugin_longjmp(1);
}
#define MAX_MAILFLAGS 63