]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount-util: do not pass 'x-*' options to mount syscall
authorLuca Boccassi <bluca@debian.org>
Tue, 11 Oct 2022 17:28:10 +0000 (18:28 +0100)
committerLuca Boccassi <bluca@debian.org>
Wed, 12 Oct 2022 08:47:39 +0000 (09:47 +0100)
They will not be recognized. libmount filters them manually.

src/shared/mount-util.c

index c504ce8feef737224191a9cbaffc4121b64435d9..6742b7c755bbe331cdf10394cdcb6cf1f16e50e3 100644 (file)
@@ -765,7 +765,9 @@ int mount_option_mangle(
                 }
 
                 /* If 'word' is not a mount flag, then store it in '*ret_remaining_options'. */
-                if (!ent->name && !strextend_with_separator(&ret, ",", word))
+                if (!ent->name &&
+                    !startswith_no_case(word, "x-") &&
+                    !strextend_with_separator(&ret, ",", word))
                         return -ENOMEM;
         }