diff --git a/plugins/sudoers/iolog.c b/plugins/sudoers/iolog.c index 212f7e6cc..b44e1134a 100644 --- a/plugins/sudoers/iolog.c +++ b/plugins/sudoers/iolog.c @@ -583,7 +583,7 @@ sudoers_io_open(unsigned int version, sudo_conv_t conversation, memset(&details, 0, sizeof(details)); if (fatal_setjmp() != 0) { - /* called via fatal(), fatalx() or log_fatal() */ + /* called via fatal() or fatalx() */ rval = -1; goto done; } @@ -680,7 +680,7 @@ sudoers_io_close(int exit_status, int error) debug_decl(sudoers_io_close, SUDO_DEBUG_PLUGIN) if (fatal_setjmp() != 0) { - /* called via fatal(), fatalx() or log_fatal() */ + /* called via fatal() or fatalx() */ fatal_disable_setjmp(); debug_return; } @@ -704,7 +704,7 @@ sudoers_io_version(int verbose) debug_decl(sudoers_io_version, SUDO_DEBUG_PLUGIN) if (fatal_setjmp() != 0) { - /* called via fatal(), fatalx() or log_fatal() */ + /* called via fatal() or fatalx() */ fatal_disable_setjmp(); debug_return_bool(-1); } @@ -727,7 +727,7 @@ sudoers_io_log(const char *buf, unsigned int len, int idx) gettimeofday(&now, NULL); if (fatal_setjmp() != 0) { - /* called via fatal(), fatalx() or log_fatal() */ + /* called via fatal() or fatalx() */ fatal_disable_setjmp(); debug_return_bool(-1); } diff --git a/plugins/sudoers/logging.c b/plugins/sudoers/logging.c index bc5acae25..c8df6d25c 100644 --- a/plugins/sudoers/logging.c +++ b/plugins/sudoers/logging.c @@ -424,7 +424,7 @@ log_allowed(int status) } /* - * Perform logging for log_warning()/log_fatal() + * Perform logging for log_warning(). */ static void vlog_warning(int flags, const char *fmt, va_list ap) @@ -529,23 +529,6 @@ log_warning(int flags, const char *fmt, ...) debug_return; } -void -log_fatal(int flags, const char *fmt, ...) -{ - va_list ap; - debug_decl(log_error, SUDO_DEBUG_LOGGING) - - /* Log the error. */ - va_start(ap, fmt); - vlog_warning(flags, fmt, ap); - va_end(ap); - - /* Exit the plugin. */ - sudoers_cleanup(); - sudo_debug_exit(__func__, __FILE__, __LINE__, sudo_debug_subsys); - fatal_longjmp(1); -} - #define MAX_MAILFLAGS 63 /* diff --git a/plugins/sudoers/logging.h b/plugins/sudoers/logging.h index aedb245e9..2f77436d8 100644 --- a/plugins/sudoers/logging.h +++ b/plugins/sudoers/logging.h @@ -36,7 +36,7 @@ #define SUDOERS_LOCALE_USER 0 #define SUDOERS_LOCALE_SUDOERS 1 -/* Flags for log_warning()/log_fatal() */ +/* Flags for log_warning() */ #define MSG_ONLY 0x01 #define USE_ERRNO 0x02 #define NO_MAIL 0x04 @@ -67,7 +67,6 @@ void log_auth_failure(int status, unsigned int tries); void log_denial(int status, bool inform_user); void log_failure(int status, int flags); void log_warning(int flags, const char *fmt, ...) __printflike(2, 3); -void log_fatal(int flags, const char *fmt, ...) __printflike(2, 3) __attribute__((__noreturn__)); void sudoers_initlocale(const char *ulocale, const char *slocale); void writeln_wrap(FILE *fp, char *line, size_t len, size_t maxlen); diff --git a/plugins/sudoers/policy.c b/plugins/sudoers/policy.c index 257c5eea6..e9a801d0e 100644 --- a/plugins/sudoers/policy.c +++ b/plugins/sudoers/policy.c @@ -542,7 +542,7 @@ sudoers_policy_open(unsigned int version, sudo_conv_t conversation, args = NULL; if (fatal_setjmp() != 0) { - /* called via fatal(), fatalx() or log_fatal() */ + /* called via fatal() or fatalx() */ (void) rewind_perms(); fatal_disable_setjmp(); debug_return_bool(-1); @@ -561,7 +561,7 @@ sudoers_policy_close(int exit_status, int error_code) debug_decl(sudoers_policy_close, SUDO_DEBUG_PLUGIN) if (fatal_setjmp() != 0) { - /* called via fatal(), fatalx() or log_fatal() */ + /* called via fatal() or fatalx() */ fatal_disable_setjmp(); debug_return; } @@ -611,7 +611,7 @@ sudoers_policy_init_session(struct passwd *pwd, char **user_env[]) user_env = NULL; if (fatal_setjmp() != 0) { - /* called via fatal(), fatalx() or log_fatal() */ + /* called via fatal() or fatalx() */ fatal_disable_setjmp(); debug_return_bool(-1); } @@ -706,7 +706,7 @@ sudoers_policy_version(int verbose) debug_decl(sudoers_policy_version, SUDO_DEBUG_PLUGIN) if (fatal_setjmp() != 0) { - /* error recovery via fatal(), fatalx() or log_fatal() */ + /* error recovery via fatal() or fatalx() */ fatal_disable_setjmp(); debug_return_bool(-1); } diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index 2796d58df..3dd9901c6 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -225,7 +225,7 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[], /* XXX - would like to move this to policy.c but need the cleanup. */ if (fatal_setjmp() != 0) { - /* error recovery via fatal(), fatalx() or log_fatal() */ + /* error recovery via fatal() or fatalx() */ rval = -1; goto done; }