From 395745ba533ac91fe118f43ec83f13a752c0b473 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 1 Sep 2015 19:39:14 +0200 Subject: machined: call unlockpt() in container, not host It makes assumptions about the pty path, hence better call it in the container namespace rather than the host. --- src/basic/util.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/basic/util.c') diff --git a/src/basic/util.c b/src/basic/util.c index 737f2a221c..f01f5f237b 100644 --- a/src/basic/util.c +++ b/src/basic/util.c @@ -6095,6 +6095,9 @@ int openpt_in_namespace(pid_t pid, int flags) { if (master < 0) _exit(EXIT_FAILURE); + if (unlockpt(master) < 0) + _exit(EXIT_FAILURE); + cmsg = CMSG_FIRSTHDR(&mh); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; -- cgit v1.2.3-54-g00ecf