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.
This commit is contained in:
Lennart Poettering
2015-09-01 20:40:24 +02:00
parent fc94c32605
commit 395745ba53
3 changed files with 6 additions and 9 deletions
+3
View File
@@ -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;