{
int i;
+ if (sigsetjmp(error_jmp, 1)) {
+ /* called via error(), errorx() or log_error() */
+ return;
+ }
+
for (i = 0; i < IOFD_MAX; i++) {
if (io_fds[i].v == NULL)
continue;
static int
sudoers_io_version(int verbose)
{
+ if (sigsetjmp(error_jmp, 1)) {
+ /* called via error(), errorx() or log_error() */
+ return -1;
+ }
+
sudo_printf(SUDO_CONV_INFO_MSG, "Sudoers I/O plugin version %s\n",
PACKAGE_VERSION);
gettimeofday(&now, NULL);
+ if (sigsetjmp(error_jmp, 1)) {
+ /* called via error(), errorx() or log_error() */
+ return -1;
+ }
+
#ifdef HAVE_ZLIB_H
if (def_compress_io)
gzwrite(io_fds[idx].g, buf, len);
static void
sudoers_policy_close(int exit_status, int error_code)
{
+ if (sigsetjmp(error_jmp, 1)) {
+ /* called via error(), errorx() or log_error() */
+ return;
+ }
+
/* We do not currently log the exit status. */
if (error_code)
warningx("unable to execute %s: %s", safe_cmnd, strerror(error_code));
static int
sudoers_policy_init_session(struct passwd *pwd)
{
+ if (sigsetjmp(error_jmp, 1)) {
+ /* called via error(), errorx() or log_error() */
+ return -1;
+ }
+
return auth_begin_session(pwd);
}
volatile int info_len = 0;
volatile int rval = FALSE;
+ if (sigsetjmp(error_jmp, 1)) {
+ /* error recovery via error(), errorx() or log_error() */
+ rewind_perms();
+ return -1;
+ }
+
/* Is root even allowed to run sudo? */
if (user_uid == 0 && !def_root_sudo) {
warningx("sudoers specifies that root is not allowed to sudo");
def_closefrom = user_closefrom;
}
- if (sigsetjmp(error_jmp, 1)) {
- /* error recovery via error(), errorx() or log_error() */
- rewind_perms();
- return -1;
- }
-
set_perms(PERM_INITIAL);
/* Environment variables specified on the command line. */
static int
sudoers_policy_version(int verbose)
{
+ if (sigsetjmp(error_jmp, 1)) {
+ /* error recovery via error(), errorx() or log_error() */
+ return -1;
+ }
+
sudo_printf(SUDO_CONV_INFO_MSG, "Sudoers policy plugin version %s\n",
PACKAGE_VERSION);