confile: add clearer for lxc.cgroup

parent 31fc3494
...@@ -97,6 +97,7 @@ static int clr_config_lsm_se_context(const char *, struct lxc_conf *); ...@@ -97,6 +97,7 @@ static int clr_config_lsm_se_context(const char *, struct lxc_conf *);
static int set_config_cgroup(const char *, const char *, struct lxc_conf *); static int set_config_cgroup(const char *, const char *, struct lxc_conf *);
static int get_config_cgroup(const char *, char *, int, struct lxc_conf *); static int get_config_cgroup(const char *, char *, int, struct lxc_conf *);
static int clr_config_cgroup(const char *, struct lxc_conf *);
static int set_config_idmaps(const char *, const char *, struct lxc_conf *); static int set_config_idmaps(const char *, const char *, struct lxc_conf *);
static int get_config_idmaps(const char *, char *, int, struct lxc_conf *); static int get_config_idmaps(const char *, char *, int, struct lxc_conf *);
...@@ -229,7 +230,7 @@ static struct lxc_config_t config[] = { ...@@ -229,7 +230,7 @@ static struct lxc_config_t config[] = {
{ "lxc.aa_profile", set_config_lsm_aa_profile, get_config_lsm_aa_profile, clr_config_lsm_aa_profile, }, { "lxc.aa_profile", set_config_lsm_aa_profile, get_config_lsm_aa_profile, clr_config_lsm_aa_profile, },
{ "lxc.aa_allow_incomplete", set_config_lsm_aa_incomplete, get_config_lsm_aa_incomplete, clr_config_lsm_aa_incomplete, }, { "lxc.aa_allow_incomplete", set_config_lsm_aa_incomplete, get_config_lsm_aa_incomplete, clr_config_lsm_aa_incomplete, },
{ "lxc.se_context", set_config_lsm_se_context, get_config_lsm_se_context, clr_config_lsm_se_context, }, { "lxc.se_context", set_config_lsm_se_context, get_config_lsm_se_context, clr_config_lsm_se_context, },
{ "lxc.cgroup", set_config_cgroup, get_config_cgroup, NULL }, { "lxc.cgroup", set_config_cgroup, get_config_cgroup, clr_config_cgroup, },
{ "lxc.id_map", set_config_idmaps, get_config_idmaps, NULL }, { "lxc.id_map", set_config_idmaps, get_config_idmaps, NULL },
{ "lxc.loglevel", set_config_loglevel, get_config_loglevel, NULL }, { "lxc.loglevel", set_config_loglevel, get_config_loglevel, NULL },
{ "lxc.logfile", set_config_logfile, get_config_logfile, NULL }, { "lxc.logfile", set_config_logfile, get_config_logfile, NULL },
...@@ -2750,9 +2751,6 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key) ...@@ -2750,9 +2751,6 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key)
} else if (strcmp(key, "lxc.cap.keep") == 0) { } else if (strcmp(key, "lxc.cap.keep") == 0) {
ret = lxc_clear_config_keepcaps(c); ret = lxc_clear_config_keepcaps(c);
} else if (strncmp(key, "lxc.cgroup", 10) == 0) {
ret = lxc_clear_cgroups(c, key);
} else if (strcmp(key, "lxc.mount.entry") == 0) { } else if (strcmp(key, "lxc.mount.entry") == 0) {
ret = lxc_clear_mount_entries(c); ret = lxc_clear_mount_entries(c);
...@@ -4113,3 +4111,8 @@ static inline int clr_config_lsm_se_context(const char *key, struct lxc_conf *c) ...@@ -4113,3 +4111,8 @@ static inline int clr_config_lsm_se_context(const char *key, struct lxc_conf *c)
c->lsm_se_context = NULL; c->lsm_se_context = NULL;
return 0; return 0;
} }
static inline int clr_config_cgroup(const char *key, struct lxc_conf *c)
{
return lxc_clear_cgroups(c, key);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment