]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: config_lsm_aa_incomplete()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 30 May 2017 02:41:17 +0000 (04:41 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 30 May 2017 16:43:05 +0000 (18:43 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index 894327dd8f517b04a9067d8980314631d4318aea..a688875c7045d541af4b73de2cff6277a2642a58 100644 (file)
@@ -1443,16 +1443,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;
        }