mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-11-28 05:50:30 +00:00
open_init_pty: Do not make stdin and stdout non-blocking
It is unclear why this was being done in the first place, and it has caused multiple bugs with run_init/open_init_pty usage. Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863187 Fixes: https://bugs.gentoo.org/show_bug.cgi?id=621062 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This commit is contained in:
parent
83fbc0979d
commit
fb081eb64b
@ -276,10 +276,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Non blocking mode for all file descriptors. */
|
/* Non blocking mode for the pty master. */
|
||||||
setfd_nonblock(pty_master);
|
setfd_nonblock(pty_master);
|
||||||
setfd_nonblock(STDIN_FILENO);
|
|
||||||
setfd_nonblock(STDOUT_FILENO);
|
|
||||||
|
|
||||||
if (isatty(STDIN_FILENO)) {
|
if (isatty(STDIN_FILENO)) {
|
||||||
if (tty_semi_raw(STDIN_FILENO) < 0) {
|
if (tty_semi_raw(STDIN_FILENO) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user