summaryrefslogtreecommitdiff
path: root/src/machine/machine-dbus.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-25 11:13:16 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-25 15:24:46 +0200
commitae20320785da548130929ad2af758be4803931a7 (patch)
tree403f5b1500228b8689cfa112eaf08bcab1e57df9 /src/machine/machine-dbus.h
parent5d1ce25728856956c1fbfe05b491067f83bd2216 (diff)
machined: add new OpenRootDirectory() call to Machine objects
This new call returns a file descriptor for the root directory of a container. This file descriptor may then be used to access the rest of the container's file system, via openat() and similar calls. Since the file descriptor returned is for the file system namespace inside of the container it may be used to access all files of the container exactly the way the container itself would see them. This is particularly useful for containers run directly from loopback media, for example via systemd-nspawn's --image= switch. It also provides access to directories such as /run of a container that are normally not accessible to the outside of a container. This replaces PR #2870. Fixes: #2870
Diffstat (limited to 'src/machine/machine-dbus.h')
-rw-r--r--src/machine/machine-dbus.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/machine/machine-dbus.h b/src/machine/machine-dbus.h
index 3a8162b171..241b23c7ec 100644
--- a/src/machine/machine-dbus.h
+++ b/src/machine/machine-dbus.h
@@ -38,6 +38,7 @@ int bus_machine_method_open_login(sd_bus_message *message, void *userdata, sd_bu
int bus_machine_method_open_shell(sd_bus_message *message, void *userdata, sd_bus_error *error);
int bus_machine_method_bind_mount(sd_bus_message *message, void *userdata, sd_bus_error *error);
int bus_machine_method_copy(sd_bus_message *message, void *userdata, sd_bus_error *error);
+int bus_machine_method_open_root_directory(sd_bus_message *message, void *userdata, sd_bus_error *error);
int machine_send_signal(Machine *m, bool new_machine);
int machine_send_create_reply(Machine *m, sd_bus_error *error);