]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/nspawn/nspawn-oci.c
nspawn: make sure the device type survives when setting device mode
[thirdparty/systemd.git] / src / nspawn / nspawn-oci.c
index c79f9c62d70055118f57cc70a5ce04a53463367d..5e21538597e27bff190f218d091e01c085f9433f 100644 (file)
@@ -819,7 +819,7 @@ static int oci_device_file_mode(const char *name, JsonVariant *v, JsonDispatchFl
                 return json_log(v, flags, SYNTHETIC_ERRNO(ERANGE),
                                 "fileMode out of range, refusing.");
 
-        *mode = m;
+        *mode = (*mode & ~07777) | m;
         return 0;
 }