mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-04 07:48:36 +00:00
machine: make sure to call unlockpt() even for local host pty connections
This fixes breakage for local host pty handling, introduced in
395745ba53.
Fixes #1139
This commit is contained in:
+12
-2
@@ -547,8 +547,18 @@ int machine_openpt(Machine *m, int flags) {
|
||||
|
||||
switch (m->class) {
|
||||
|
||||
case MACHINE_HOST:
|
||||
return posix_openpt(flags);
|
||||
case MACHINE_HOST: {
|
||||
int fd;
|
||||
|
||||
fd = posix_openpt(flags);
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
if (unlockpt(fd) < 0)
|
||||
return -errno;
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
case MACHINE_CONTAINER:
|
||||
if (m->leader <= 0)
|
||||
|
||||
Reference in New Issue
Block a user