diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-01 19:39:14 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-01 20:40:24 +0200 |
commit | 395745ba533ac91fe118f43ec83f13a752c0b473 (patch) | |
tree | 55fa10dc719b9d605e82be61bb4448ef17a6365f /src/basic | |
parent | fc94c3260549c12892461be031c4b9dc122ca1ef (diff) |
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.
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/util.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |