Skip to content

Commit

Permalink
Merge pull request #3764 from brauner/2021-04-02/fixes
Browse files Browse the repository at this point in the history
confile: fix lxc.namespace.share.[identifier]
  • Loading branch information
stgraber committed Apr 2, 2021
2 parents 8aa6025 + 057d2ca commit 6fde9fb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/lxc/confile.c
Expand Up @@ -226,7 +226,7 @@ static struct lxc_config_t config_jump_table[] = {
{ "lxc.mount.fstab", true, set_config_mount_fstab, get_config_mount_fstab, clr_config_mount_fstab, },
{ "lxc.namespace.clone", true, set_config_namespace_clone, get_config_namespace_clone, clr_config_namespace_clone, },
{ "lxc.namespace.keep", true, set_config_namespace_keep, get_config_namespace_keep, clr_config_namespace_keep, },
{ "lxc.namespace.share", true, set_config_namespace_share, get_config_namespace_share, clr_config_namespace_share, },
{ "lxc.namespace.share.", false, set_config_namespace_share, get_config_namespace_share, clr_config_namespace_share, },
{ "lxc.time.offset.boot", true, set_config_time_offset_boot, get_config_time_offset_boot, clr_config_time_offset_boot, },
{ "lxc.time.offset.monotonic", true, set_config_time_offset_monotonic, get_config_time_offset_monotonic, clr_config_time_offset_monotonic, },
{ "lxc.net.", false, set_config_jump_table_net, get_config_jump_table_net, clr_config_jump_table_net, },
Expand Down Expand Up @@ -2915,6 +2915,9 @@ static int set_config_namespace_share(const char *key, const char *value,
return clr_config_namespace_share(key, lxc_conf, data);

namespace = key + STRLITERALLEN("lxc.namespace.share.");
if (is_empty_string(namespace))
return ret_errno(EINVAL);

ns_idx = lxc_namespace_2_ns_idx(namespace);
if (ns_idx < 0)
return ns_idx;
Expand Down Expand Up @@ -4663,6 +4666,9 @@ static int get_config_namespace_share(const char *key, char *retv, int inlen,
memset(retv, 0, inlen);

namespace = key + STRLITERALLEN("lxc.namespace.share.");
if (is_empty_string(namespace))
return ret_errno(EINVAL);

ns_idx = lxc_namespace_2_ns_idx(namespace);
if (ns_idx < 0)
return ns_idx;
Expand Down Expand Up @@ -5200,6 +5206,9 @@ static int clr_config_namespace_share(const char *key,
const char *namespace;

namespace = key + STRLITERALLEN("lxc.namespace.share.");
if (is_empty_string(namespace))
return ret_errno(EINVAL);

ns_idx = lxc_namespace_2_ns_idx(namespace);
if (ns_idx < 0)
return ns_idx;
Expand Down

0 comments on commit 6fde9fb

Please sign in to comment.