From 20c3318a80956d23fff8e4a756e730e0a2aed2cf Mon Sep 17 00:00:00 2001 From: Maximilian Blenk Date: Wed, 5 Feb 2020 19:25:53 +0100 Subject: [PATCH] container.conf: Document that order is important in config_jump_table Add a comment that documents that more specific options of a namespace have to be added above more generic options in config_jump_table. Signed-off-by: Maximilian Blenk --- src/lxc/confile.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 58a6c82fa..804663868 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -148,6 +148,17 @@ lxc_config_define(uts_name); lxc_config_define(sysctl); lxc_config_define(proc); +/* + * Important Note: + * If a new config option is added to this table, be aware that + * the order in which the options are places into the table matters. + * That means that more specific options of a namespace have to be + * placed above more generic ones. + * + * For instance: If lxc.ab is placed before lxc.ab.c, the config option + * lxc.ab.c will always be matched to lxc.ab. That is, the lxc.ab.c option + * has to be placed above lxc.ab. + */ static struct lxc_config_t config_jump_table[] = { { "lxc.arch", set_config_personality, get_config_personality, clr_config_personality, }, { "lxc.apparmor.profile", set_config_apparmor_profile, get_config_apparmor_profile, clr_config_apparmor_profile, }, -- 2.47.2