summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-10-31 01:25:44 +0100
committerLennart Poettering <lennart@poettering.net>2013-10-31 01:43:38 +0100
commit04d39279245834494baccfdb9349db8bf80abd13 (patch)
tree2e6b213bfd273af6e157e77bf0d03ff68bf144cc /src/libsystemd-bus
parentf85fc8454137a5cfba99b3a24aaa6dc38f6e2768 (diff)
machinectl: add new command to spawn a getty inside a container
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r--src/libsystemd-bus/bus-container.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsystemd-bus/bus-container.c b/src/libsystemd-bus/bus-container.c
index 31bb624b34..25ea471a08 100644
--- a/src/libsystemd-bus/bus-container.c
+++ b/src/libsystemd-bus/bus-container.c
@@ -72,7 +72,7 @@ int bus_container_connect(sd_bus *b) {
if (r < 0)
return -ENOMEM;
- rootfd = open(root, O_RDONLY|O_NOCTTY|O_CLOEXEC);
+ rootfd = open(root, O_RDONLY|O_NOCTTY|O_CLOEXEC|O_DIRECTORY);
if (rootfd < 0)
return -errno;
@@ -101,7 +101,6 @@ int bus_container_connect(sd_bus *b) {
if (chroot(".") < 0)
_exit(255);
-
r = connect(b->input_fd, &b->sockaddr.sa, b->sockaddr_size);
if (r < 0) {
if (errno == EINPROGRESS)