]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/dbus-execute: respect write flags for empty assignments too 40126/head
authorMike Yuan <me@yhndnzj.com>
Mon, 15 Dec 2025 20:02:15 +0000 (21:02 +0100)
committerMike Yuan <me@yhndnzj.com>
Wed, 17 Dec 2025 23:39:59 +0000 (00:39 +0100)
src/core/dbus-execute.c

index b7d8b4b5ff8d52f1b326d6f9e0ef5ca9dc3c1666..bf36a928b187b7dfefaa0cc34b4c39a5f8b43319 100644 (file)
@@ -3914,7 +3914,7 @@ int bus_exec_context_set_transient_property(
                 if (r < 0)
                         return r;
 
-                if (empty) {
+                if (!UNIT_WRITE_FLAGS_NOOP(flags) && empty) {
                         bind_mount_free_many(c->bind_mounts, c->n_bind_mounts);
                         c->bind_mounts = NULL;
                         c->n_bind_mounts = 0;
@@ -3959,7 +3959,7 @@ int bus_exec_context_set_transient_property(
                 if (r < 0)
                         return r;
 
-                if (empty) {
+                if (!UNIT_WRITE_FLAGS_NOOP(flags) && empty) {
                         temporary_filesystem_free_many(c->temporary_filesystems, c->n_temporary_filesystems);
                         c->temporary_filesystems = NULL;
                         c->n_temporary_filesystems = 0;