Skip to contentSkip to conversation

open_init_pty: Do not make stdin and stdout non-blocking

PATCH New Stephen Smalley 1 participant 1 message Jul 10, 2017 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 policycoreutils/run_init/open_init_pty.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
policycoreutils/run_init/open_init_pty.c +1 -3
index 6e25ea3..b37ae4d 100644
@@ -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(STDIN_FILENO);
-	setfd_nonblock(STDOUT_FILENO);
 
 	if (isatty(STDIN_FILENO)) {
 		if (tty_semi_raw(STDIN_FILENO) < 0) {
Signature · 1 line
2.9.4