From 395745ba533ac91fe118f43ec83f13a752c0b473 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 1 Sep 2015 19:39:14 +0200 Subject: 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. --- src/machine/machine-dbus.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/machine/machine-dbus.c') diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index af2b8eff06..f27b58b893 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -597,9 +597,6 @@ int bus_machine_method_open_login(sd_bus_message *message, void *userdata, sd_bu if (!p) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "PTS name %s is invalid", pty_name); - if (unlockpt(master) < 0) - return -errno; - r = container_bus_new(m, &allocated_bus); if (r < 0) return r; @@ -701,9 +698,6 @@ int bus_machine_method_open_shell(sd_bus_message *message, void *userdata, sd_bu utmp_id = path_startswith(pty_name, "/dev/"); assert(utmp_id); - if (unlockpt(master) < 0) - return -errno; - r = container_bus_new(m, &allocated_bus); if (r < 0) return r; -- cgit v1.2.3-54-g00ecf