confile: add getter for lxc.aa_profile

parent de1ede69
...@@ -80,6 +80,8 @@ static int set_config_kmsg(const char *, const char *, struct lxc_conf *); ...@@ -80,6 +80,8 @@ static int set_config_kmsg(const char *, const char *, struct lxc_conf *);
static int get_config_kmsg(struct lxc_container *, const char *, char *, int); static int get_config_kmsg(struct lxc_container *, const char *, char *, int);
static int set_config_lsm_aa_profile(const char *, const char *, struct lxc_conf *); static int set_config_lsm_aa_profile(const char *, const char *, struct lxc_conf *);
static int get_config_lsm_aa_profile(struct lxc_container *, const char *, char *, int);
static int set_config_lsm_aa_incomplete(const char *, const char *, struct lxc_conf *); static int set_config_lsm_aa_incomplete(const char *, const char *, struct lxc_conf *);
static int set_config_lsm_se_context(const char *, const char *, struct lxc_conf *); static int set_config_lsm_se_context(const char *, 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 *);
...@@ -136,12 +138,12 @@ static int set_config_no_new_privs(const char *, const char *, struct lxc_conf * ...@@ -136,12 +138,12 @@ static int set_config_no_new_privs(const char *, const char *, struct lxc_conf *
static int set_config_limit(const char *, const char *, struct lxc_conf *); static int set_config_limit(const char *, const char *, struct lxc_conf *);
static struct lxc_config_t config[] = { static struct lxc_config_t config[] = {
{ "lxc.arch", set_config_personality, get_config_personality, NULL}, { "lxc.arch", set_config_personality, get_config_personality, NULL},
{ "lxc.pts", set_config_pts, get_config_pts, NULL}, { "lxc.pts", set_config_pts, get_config_pts, NULL},
{ "lxc.tty", set_config_tty, get_config_tty, NULL}, { "lxc.tty", set_config_tty, get_config_tty, NULL},
{ "lxc.devttydir", set_config_ttydir, get_config_ttydir, NULL}, { "lxc.devttydir", set_config_ttydir, get_config_ttydir, NULL},
{ "lxc.kmsg", set_config_kmsg, get_config_kmsg, NULL}, { "lxc.kmsg", set_config_kmsg, get_config_kmsg, NULL},
{ "lxc.aa_profile", set_config_lsm_aa_profile, NULL, NULL}, { "lxc.aa_profile", set_config_lsm_aa_profile, get_config_lsm_aa_profile, NULL},
{ "lxc.aa_allow_incomplete", set_config_lsm_aa_incomplete, NULL, NULL}, { "lxc.aa_allow_incomplete", set_config_lsm_aa_incomplete, NULL, NULL},
{ "lxc.se_context", set_config_lsm_se_context, NULL, NULL}, { "lxc.se_context", set_config_lsm_se_context, NULL, NULL},
{ "lxc.cgroup", set_config_cgroup, NULL, NULL}, { "lxc.cgroup", set_config_cgroup, NULL, NULL},
...@@ -3014,8 +3016,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv, ...@@ -3014,8 +3016,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
return lxc_get_auto_mounts(c, retv, inlen); return lxc_get_auto_mounts(c, retv, inlen);
else if (strcmp(key, "lxc.mount") == 0) else if (strcmp(key, "lxc.mount") == 0)
v = c->fstab; v = c->fstab;
else if (strcmp(key, "lxc.aa_profile") == 0)
v = c->lsm_aa_profile;
else if (strcmp(key, "lxc.aa_allow_incomplete") == 0) else if (strcmp(key, "lxc.aa_allow_incomplete") == 0)
return lxc_get_conf_int(c, retv, inlen, c->lsm_aa_allow_incomplete); return lxc_get_conf_int(c, retv, inlen, c->lsm_aa_allow_incomplete);
else if (strcmp(key, "lxc.se_context") == 0) else if (strcmp(key, "lxc.se_context") == 0)
...@@ -3730,3 +3730,9 @@ static int get_config_kmsg(struct lxc_container *c, const char *key, char *retv, ...@@ -3730,3 +3730,9 @@ static int get_config_kmsg(struct lxc_container *c, const char *key, char *retv,
{ {
return lxc_get_conf_int(c->lxc_conf, retv, inlen, c->lxc_conf->kmsg); return lxc_get_conf_int(c->lxc_conf, retv, inlen, c->lxc_conf->kmsg);
} }
static int get_config_lsm_aa_profile(struct lxc_container *c, const char *key,
char *retv, int inlen)
{
return lxc_get_conf_str(retv, inlen, c->lxc_conf->lsm_aa_profile);
}
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