mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-30 22:50:30 +00:00
confile: add clearer for lxc.cap.keep
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
244cb55bbc
commit
c74cc4901b
@ -179,6 +179,7 @@ static int clr_config_cap_drop(const char *, struct lxc_conf *);
|
||||
|
||||
static int set_config_cap_keep(const char *, const char *, struct lxc_conf *);
|
||||
static int get_config_cap_keep(const char *, char *, int, struct lxc_conf *);
|
||||
static int clr_config_cap_keep(const char *, struct lxc_conf *);
|
||||
|
||||
static int set_config_console(const char *, const char *, struct lxc_conf *);
|
||||
static int get_config_console(const char *, char *, int, struct lxc_conf *);
|
||||
@ -287,7 +288,7 @@ static struct lxc_config_t config[] = {
|
||||
{ "lxc.network.", set_config_network_nic, get_config_network_item, clr_config_network_item, },
|
||||
{ "lxc.network", set_config_network, get_config_network, clr_config_network, },
|
||||
{ "lxc.cap.drop", set_config_cap_drop, get_config_cap_drop, clr_config_cap_drop, },
|
||||
{ "lxc.cap.keep", set_config_cap_keep, get_config_cap_keep, NULL },
|
||||
{ "lxc.cap.keep", set_config_cap_keep, get_config_cap_keep, clr_config_cap_keep, },
|
||||
{ "lxc.console.logfile", set_config_console_logfile, get_config_console_logfile, NULL },
|
||||
{ "lxc.console", set_config_console, get_config_console, NULL },
|
||||
{ "lxc.seccomp", set_config_seccomp, get_config_seccomp, NULL },
|
||||
@ -2755,10 +2756,7 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (strcmp(key, "lxc.cap.keep") == 0) {
|
||||
ret = lxc_clear_config_keepcaps(c);
|
||||
|
||||
} else if (strncmp(key, "lxc.group", 9) == 0) {
|
||||
if (strncmp(key, "lxc.group", 9) == 0) {
|
||||
ret = lxc_clear_groups(c);
|
||||
|
||||
} else if (strncmp(key, "lxc.environment", 15) == 0) {
|
||||
@ -4175,3 +4173,8 @@ static inline int clr_config_cap_drop(const char *key, struct lxc_conf *c)
|
||||
{
|
||||
return lxc_clear_config_caps(c);
|
||||
}
|
||||
|
||||
static inline int clr_config_cap_keep(const char *key, struct lxc_conf *c)
|
||||
{
|
||||
return lxc_clear_config_keepcaps(c);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user