mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-05 18:27:06 +00:00
confile: add clearer for lxc.init_uid
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
8e90af3ecb
commit
ec76dcfb4b
@ -234,6 +234,7 @@ static int clr_config_init_cmd(const char *, struct lxc_conf *);
|
||||
|
||||
static int set_config_init_uid(const char *, const char *, struct lxc_conf *);
|
||||
static int get_config_init_uid(const char *, char *, int, struct lxc_conf *);
|
||||
static int clr_config_init_uid(const char *, struct lxc_conf *);
|
||||
|
||||
static int set_config_init_gid(const char *, const char *, struct lxc_conf *);
|
||||
static int get_config_init_gid(const char *, char *, int, struct lxc_conf *);
|
||||
@ -317,7 +318,7 @@ static struct lxc_config_t config[] = {
|
||||
{ "lxc.group", set_config_group, get_config_group, clr_config_group, },
|
||||
{ "lxc.environment", set_config_environment, get_config_environment, clr_config_environment, },
|
||||
{ "lxc.init_cmd", set_config_init_cmd, get_config_init_cmd, clr_config_init_cmd, },
|
||||
{ "lxc.init_uid", set_config_init_uid, get_config_init_uid, NULL },
|
||||
{ "lxc.init_uid", set_config_init_uid, get_config_init_uid, clr_config_init_uid, },
|
||||
{ "lxc.init_gid", set_config_init_gid, get_config_init_gid, NULL },
|
||||
{ "lxc.ephemeral", set_config_ephemeral, get_config_ephemeral, NULL },
|
||||
{ "lxc.syslog", set_config_syslog, get_config_syslog, clr_config_syslog, },
|
||||
@ -2772,9 +2773,6 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key)
|
||||
if (strncmp(key, "lxc.limit", 9) == 0) {
|
||||
ret = lxc_clear_limits(c, key);
|
||||
|
||||
} else if (strcmp(key, "lxc.init_uid") == 0) {
|
||||
c->init_uid = 0;
|
||||
|
||||
} else if (strcmp(key, "lxc.init_gid") == 0) {
|
||||
c->init_gid = 0;
|
||||
|
||||
@ -4229,3 +4227,9 @@ static inline int clr_config_init_cmd(const char *key, struct lxc_conf *c)
|
||||
c->init_cmd = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int clr_config_init_uid(const char *key, struct lxc_conf *c)
|
||||
{
|
||||
c->init_uid = 0;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user