Re-enable cleanup functions in sudoers plugin and sudo driver
for error()/errorx().
This commit is contained in:
@@ -1144,11 +1144,6 @@ cleanup(int gotsignal)
|
|||||||
sudo_endpwent();
|
sudo_endpwent();
|
||||||
sudo_endgrent();
|
sudo_endgrent();
|
||||||
}
|
}
|
||||||
#ifdef notyet
|
|
||||||
/* XXX */
|
|
||||||
if (def_transcript)
|
|
||||||
term_restore(STDIN_FILENO, 0);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
10
src/exec.c
10
src/exec.c
@@ -149,6 +149,16 @@ pty_setup(uid_t uid)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Cleanup hook for error()/errorx()
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
cleanup(int gotsignal)
|
||||||
|
{
|
||||||
|
if (!tq_empty(&io_plugins))
|
||||||
|
term_restore(io_fds[SFD_USERTTY], 0);
|
||||||
|
}
|
||||||
|
|
||||||
/* Call I/O plugin tty input log method. */
|
/* Call I/O plugin tty input log method. */
|
||||||
static int
|
static int
|
||||||
log_ttyin(char *buf, unsigned int n)
|
log_ttyin(char *buf, unsigned int n)
|
||||||
|
24
src/sudo.c
24
src/sudo.c
@@ -625,30 +625,6 @@ disable_coredumps(void)
|
|||||||
#endif /* RLIMIT_CORE && !SUDO_DEVEL */
|
#endif /* RLIMIT_CORE && !SUDO_DEVEL */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Cleanup hook for error()/errorx()
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
cleanup(int gotsignal)
|
|
||||||
{
|
|
||||||
#if 0 /* XXX */
|
|
||||||
struct sudo_nss *nss;
|
|
||||||
|
|
||||||
if (!gotsignal) {
|
|
||||||
if (snl != NULL) {
|
|
||||||
tq_foreach_fwd(snl, nss)
|
|
||||||
nss->close(nss);
|
|
||||||
}
|
|
||||||
sudo_endpwent();
|
|
||||||
sudo_endgrent();
|
|
||||||
}
|
|
||||||
#ifdef _PATH_SUDO_TRANSCRIPT
|
|
||||||
if (def_transcript)
|
|
||||||
term_restore(STDIN_FILENO, 0);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup the execution environment immediately prior to the call to execve()
|
* Setup the execution environment immediately prior to the call to execve()
|
||||||
* Returns TRUE on success and FALSE on failure.
|
* Returns TRUE on success and FALSE on failure.
|
||||||
|
Reference in New Issue
Block a user