flags.
"--msgid-bugs-address=http://www.sudo.ws/bugs" \
--package-name=@PACKAGE_NAME@ --package-version=$(VERSION) \
--flag warning:1:c-format --flag warningx:1:c-format \
- --flag error:2:c-format --flag errorx:2:c-format \
+ --flag fatal:2:c-format --flag fatalx:2:c-format \
--flag easprintf:3:c-format --flag lbuf_append:2:c-format \
--flag lbuf_append_quoted:3:c-format --foreign-user
memset(&details, 0, sizeof(details));
if (fatal_setjmp() != 0) {
- /* called via error(), errorx() or log_fatal() */
+ /* called via fatal(), fatalx() or log_fatal() */
rval = -1;
goto done;
}
debug_decl(sudoers_io_close, SUDO_DEBUG_PLUGIN)
if (fatal_setjmp() != 0) {
- /* called via error(), errorx() or log_fatal() */
+ /* called via fatal(), fatalx() or log_fatal() */
fatal_disable_setjmp();
debug_return;
}
debug_decl(sudoers_io_version, SUDO_DEBUG_PLUGIN)
if (fatal_setjmp() != 0) {
- /* called via error(), errorx() or log_fatal() */
+ /* called via fatal(), fatalx() or log_fatal() */
fatal_disable_setjmp();
debug_return_bool(-1);
}
gettimeofday(&now, NULL);
if (fatal_setjmp() != 0) {
- /* called via error(), errorx() or log_fatal() */
+ /* called via fatal(), fatalx() or log_fatal() */
fatal_disable_setjmp();
debug_return_bool(-1);
}
args = NULL;
if (fatal_setjmp() != 0) {
- /* called via error(), errorx() or log_fatal() */
+ /* called via fatal(), fatalx() or log_fatal() */
rewind_perms();
fatal_disable_setjmp();
debug_return_bool(-1);
debug_decl(sudoers_policy_close, SUDO_DEBUG_PLUGIN)
if (fatal_setjmp() != 0) {
- /* called via error(), errorx() or log_fatal() */
+ /* called via fatal(), fatalx() or log_fatal() */
fatal_disable_setjmp();
debug_return;
}
user_env = NULL;
if (fatal_setjmp() != 0) {
- /* called via error(), errorx() or log_fatal() */
+ /* called via fatal(), fatalx() or log_fatal() */
fatal_disable_setjmp();
debug_return_bool(-1);
}
debug_decl(sudoers_policy_version, SUDO_DEBUG_PLUGIN)
if (fatal_setjmp() != 0) {
- /* error recovery via error(), errorx() or log_fatal() */
+ /* error recovery via fatal(), fatalx() or log_fatal() */
fatal_disable_setjmp();
debug_return_bool(-1);
}
sudo_setpwent();
sudo_setgrent();
- /* Register error/errorx callback. */
+ /* Register fatal/fatalx callback. */
fatal_callback_register(sudoers_cleanup);
/* Initialize environment functions (including replacements). */
/* XXX - would like to move this to policy.c but need the cleanup. */
if (fatal_setjmp() != 0) {
- /* error recovery via error(), errorx() or log_fatal() */
+ /* error recovery via fatal(), fatalx() or log_fatal() */
rval = -1;
goto done;
}
}
/*
- * Cleanup hook for error()/errorx()
+ * Cleanup hook for fatal()/fatalx()
*/
void
sudoers_cleanup(void)
bindtextdomain("sudoers", LOCALEDIR); /* XXX - should have sudoreplay domain */
textdomain("sudoers");
- /* Register error/errorx callback. */
+ /* Register fatal/fatalx callback. */
fatal_callback_register(sudoreplay_cleanup);
/* Read sudo.conf. */
return strcmp(s1, s2);
}
-/* XXX - always returns 0, calls error() on failure */
+/* XXX - always returns 0, calls fatal() on failure */
static int
find_sessions(const char *dir, REGEX_T *re, const char *user, const char *tty)
{
debug_return_int(0);
}
-/* XXX - always returns 0, calls error() on failure */
+/* XXX - always returns 0, calls fatal() on failure */
static int
list_sessions(int argc, char **argv, const char *pattern, const char *user,
const char *tty)
}
/*
- * Cleanup hook for error()/errorx()
+ * Cleanup hook for fatal()/fatalx()
*/
static void
sudoreplay_cleanup(void)
if (argc < 1)
usage(1);
- /* Register error/errorx callback. */
+ /* Register fatal/fatalx callback. */
fatal_callback_register(visudo_cleanup);
/* Read sudo.conf. */
static void check_foreground(void);
/*
- * Cleanup hook for error()/errorx()
+ * Cleanup hook for fatal()/fatalx()
*/
static void
pty_cleanup(void)
struct timeval;
-/* For error() and errorx() (XXX - needed?) */
+/* For fatal() and fatalx() (XXX - needed?) */
void cleanup(int);
/* tgetpass.c */