X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=blobdiff_plain;f=src%2Fcore%2Fdbus-execute.c;h=78b177e1075bb8af9c35804cff75f7a9d08199c7;hp=23c1b4457315d2f987c12611b15e69f6436c7b81;hb=835552511ef5edec94b567441251ada2a37ea333;hpb=9ef4e1e5a2d0a9cc50406f1cae05f3918d6f0c2a diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index 23c1b445731..78b177e1075 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -34,6 +34,7 @@ #include "fileio.h" #include "ioprio.h" #include "missing.h" +#include "mount-util.h" #include "namespace.h" #include "parse-util.h" #include "path-util.h" @@ -1613,8 +1614,23 @@ int bus_exec_context_set_transient_property( } return 1; - } + } else if (streq(name, "MountFlags")) { + uint64_t flags; + + r = sd_bus_message_read(message, "t", &flags); + if (r < 0) + return r; + if (!IN_SET(flags, 0, MS_SHARED, MS_PRIVATE, MS_SLAVE)) + return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unknown mount propagation flags"); + if (mode != UNIT_CHECK) { + c->mount_flags = flags; + + unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, strempty(mount_propagation_flags_to_string(flags))); + } + + return 1; + } ri = rlimit_from_string(name); if (ri < 0) { soft = endswith(name, "Soft");