From: Frantisek Sumsal Date: Tue, 16 May 2023 09:40:33 +0000 (+0200) Subject: nspawn: make sure the device type survives when setting device mode X-Git-Tag: v254-rc1~464^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd70372b934bded2249f26c72d4b6ab9bdf50a13;p=thirdparty%2Fsystemd.git nspawn: make sure the device type survives when setting device mode --- diff --git a/src/nspawn/nspawn-oci.c b/src/nspawn/nspawn-oci.c index c79f9c62d70..5e21538597e 100644 --- a/src/nspawn/nspawn-oci.c +++ b/src/nspawn/nspawn-oci.c @@ -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; }