mirror of
git://github.com/lxc/lxc
synced 2025-09-05 07:09:32 +00:00
Merge pull request #3764 from brauner/2021-04-02/fixes
confile: fix lxc.namespace.share.[identifier]
This commit is contained in:
@@ -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, },
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
|
Reference in New Issue
Block a user