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 <gorcu...@virtuozzo.com>
---
 criu/tty.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/criu/tty.c b/criu/tty.c
index 1eb239b81..4cc99690f 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -2311,20 +2311,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.14.3

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to