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;
}
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;
}
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);
}
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);
}
}
/*
- * Perform logging for log_warning()/log_fatal()
+ * Perform logging for log_warning().
*/
static void
vlog_warning(int flags, const char *fmt, va_list ap)
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
/*
#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
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);
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);
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;
}
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);
}
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);
}
/* 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;
}