-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. We no longer ship open_init_pty in Fedora, RHEL6 since it was causing more problems then it was worth. This fix makes it optional to use the open_init_pty. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/JD+wACgkQrlYvE4MpobOgOgCaAmLQgyNp/xgVzz9lHoQ/So/b XlYAoLZC6Tw7Sj+Fe2WV0nktvWW0MvGv =FVpM -----END PGP SIGNATURE-----
>From fd0a8bc081fa929b7c81b570252a795ac470e19a Mon Sep 17 00:00:00 2001 From: Eric Paris <eparis@xxxxxxxxxx> Date: Wed, 20 Jul 2011 12:19:48 -0400 Subject: [PATCH 04/90] policycoreutils: run_init: FIXME If open_init_pty is not available then just use exec Sometimes using open_init_pty isn't possible. So just call exec() if that is the case. *I need to double check the call ordering and its logic* Not-Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- policycoreutils/run_init/run_init.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/policycoreutils/run_init/run_init.c b/policycoreutils/run_init/run_init.c index 9db766c..92034be 100644 --- a/policycoreutils/run_init/run_init.c +++ b/policycoreutils/run_init/run_init.c @@ -406,6 +406,13 @@ int main(int argc, char *argv[]) new_context); exit(-1); } + if (! access("/usr/sbin/open_init_pty", X_OK)) { + if (execvp(argv[1], argv + 1)) { + perror("execvp"); + exit(-1); + } + return 0; + } /* * Do not execvp the command directly from run_init; since it would run * under with a pty under sysadm_devpts_t. Instead, we call open_init_tty, -- 1.7.10.2