[CRIU] [PATCH 08/15] tty: Don't check for group inheritance
Cyrill Gorcunov
gorcunov at gmail.com
Fri Sep 7 19:18:29 MSK 2018
The group may vary so we only need to check
if sid is reachable, othrewise it might trigger
false positive.
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
criu/tty.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/criu/tty.c b/criu/tty.c
index a5b5a98e115b..d120e352d6a9 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -2378,20 +2378,19 @@ static int tty_verify_ctty(void)
list_for_each_entry(p, &all_ttys, list) {
if (!is_pty(p->driver) ||
- p->sid != d->sid ||
- p->pgrp != d->sid)
+ p->sid != d->sid)
continue;
n = p;
break;
}
if (!n) {
- pr_err("ctty inheritance detected sid/pgrp %d, "
- "no PTY peer with sid/pgrp needed\n",
+ pr_err("ctty inheritance detected sid %d, "
+ "no PTY peer with sid needed\n",
d->sid);
return -ENOENT;
} else if (n->pid_real != d->pid_real) {
- pr_err("ctty inheritance detected sid/pgrp %d "
+ pr_err("ctty inheritance detected sid %d "
"(ctty pid_real %d pty pid_real %d)\n",
d->sid, d->pid_real, n->pid_real);
return -ENOENT;
--
2.17.1
More information about the CRIU
mailing list