From: Maximilian Blenk Date: Wed, 5 Feb 2020 18:25:53 +0000 (+0100) Subject: container.conf: Document that order is important in config_jump_table X-Git-Tag: lxc-4.0.0~54^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20c3318a80956d23fff8e4a756e730e0a2aed2cf;p=thirdparty%2Flxc.git 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 --- 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, },