]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Use correct config parser for MountAPIVFS (#18501)
authorAntonius Frie <antonius.frie@ruhr-uni-bochum.de>
Mon, 8 Feb 2021 08:15:15 +0000 (09:15 +0100)
committerGitHub <noreply@github.com>
Mon, 8 Feb 2021 08:15:15 +0000 (09:15 +0100)
As far as I can see, at some point the parser function for MountAPIVFS
was changed from the generic bool parser to a custom implementation, to
allow the context to keep track of whether MountAPIVFS had been set
explicitly. If not, exec_context_get_effective_mount_apivfs would fall
back to a default value. However, the corresponding entry in the big
parser table wasn't updated, meaning that the old bool parser was still
used, meaning that context->mount_apivfs_set remained at its default
value of false, meaning that the default value was always used and the
config option was effectively ignored.

Fix for 5e98086d1629f5c5b73645ba2568de4b09b7d958.

src/core/load-fragment-gperf.gperf.m4

index 81f4561a572221d001542cc67bd8472c04b5269d..be07c7604cc7d2d2e53cbc04f4d687615679ff1b 100644 (file)
@@ -139,7 +139,7 @@ $1.PrivateMounts,                        config_parse_bool,
 $1.ProtectSystem,                        config_parse_protect_system,                 0,                                  offsetof($1, exec_context.protect_system)
 $1.ProtectHome,                          config_parse_protect_home,                   0,                                  offsetof($1, exec_context.protect_home)
 $1.MountFlags,                           config_parse_exec_mount_flags,               0,                                  offsetof($1, exec_context.mount_flags)
-$1.MountAPIVFS,                          config_parse_bool,                           0,                                  offsetof($1, exec_context.mount_apivfs)
+$1.MountAPIVFS,                          config_parse_exec_mount_apivfs,              0,                                  offsetof($1, exec_context)
 $1.Personality,                          config_parse_personality,                    0,                                  offsetof($1, exec_context.personality)
 $1.RuntimeDirectoryPreserve,             config_parse_runtime_preserve_mode,          0,                                  offsetof($1, exec_context.runtime_directory_preserve_mode)
 $1.RuntimeDirectoryMode,                 config_parse_mode,                           0,                                  offsetof($1, exec_context.directories[EXEC_DIRECTORY_RUNTIME].mode)