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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user