[08/15] tty: Don't check for group inheritance

Submitted by Cyrill Gorcunov on Sept. 7, 2018, 4:18 p.m.

Details

Message ID 20180907161836.25738-9-gorcunov@gmail.com
State New
Series "tty: Add support for multiple devtps instances"
Headers show

Commit Message

Cyrill Gorcunov Sept. 7, 2018, 4:18 p.m.
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@gmail.com>
---
 criu/tty.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

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;