Add support for adding a utmp entry when allocating a new pty.

Requires the BSD login(3) or SYSV/POSIX getutent()/getutxent().
Currently only creates a new entry if the existing tty has
a utmp entry.
This commit is contained in:
Todd C. Miller
2011-03-08 15:37:40 -05:00
parent 9c9c0223e6
commit 1496bfed6c
6 changed files with 302 additions and 8 deletions

View File

@@ -234,7 +234,7 @@ sudo_execve(struct command_details *details, char *argv[], char *envp[],
log_io = TRUE;
if (!ISSET(details->flags, CD_BACKGROUND)) {
sudo_debug(8, "allocate pty for I/O logging");
pty_setup(details->euid);
pty_setup(details->euid, user_details.tty);
}
}