Skip to content

Commit

Permalink
confile: config_lsm_aa_incomplete()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner authored and stgraber committed Jul 1, 2017
1 parent f3e0099 commit 666f0f4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/lxc/confile.c
Expand Up @@ -1359,16 +1359,21 @@ static int config_lsm_aa_profile(const char *key, const char *value,
}

static int config_lsm_aa_incomplete(const char *key, const char *value,
struct lxc_conf *lxc_conf)
struct lxc_conf *lxc_conf)
{
if (config_value_empty(value))
/* Set config value to default. */
if (config_value_empty(value)) {
lxc_conf->lsm_aa_allow_incomplete = 0;
return 0;
}

/* Parse new config value. */
if (lxc_safe_uint(value, &lxc_conf->lsm_aa_allow_incomplete) < 0)
return -1;

if (lxc_conf->lsm_aa_allow_incomplete > 1) {
ERROR("Wrong value for lxc.lsm_aa_allow_incomplete. Can only be set to 0 or 1");
ERROR("Wrong value for lxc.lsm_aa_allow_incomplete. Can only "
"be set to 0 or 1");
return -1;
}

Expand Down

0 comments on commit 666f0f4

Please sign in to comment.