summaryrefslogtreecommitdiff
path: root/src/run/run.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-01 19:39:14 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-01 20:40:24 +0200
commit395745ba533ac91fe118f43ec83f13a752c0b473 (patch)
tree55fa10dc719b9d605e82be61bb4448ef17a6365f /src/run/run.c
parentfc94c3260549c12892461be031c4b9dc122ca1ef (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/run/run.c')
-rw-r--r--src/run/run.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/run/run.c b/src/run/run.c
index a69560208c..657c6fcaf1 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -702,6 +702,9 @@ static int start_transient_service(
if (r < 0)
return log_error_errno(r, "Failed to determine tty name: %m");
+ if (unlockpt(master) < 0)
+ return log_error_errno(errno, "Failed to unlock tty: %m");
+
} else if (arg_transport == BUS_TRANSPORT_MACHINE) {
_cleanup_bus_unref_ sd_bus *system_bus = NULL;
const char *s;
@@ -738,9 +741,6 @@ static int start_transient_service(
return log_oom();
} else
assert_not_reached("Can't allocate tty via ssh");
-
- if (unlockpt(master) < 0)
- return log_error_errno(errno, "Failed to unlock tty: %m");
}
if (!arg_no_block) {