]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Allow lxc_clear_config_item to clear idmaps.
authorCasey Marshall <cmars@cmarstech.com>
Fri, 28 Nov 2014 07:11:06 +0000 (01:11 -0600)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 1 Dec 2014 20:15:32 +0000 (15:15 -0500)
Ran into this when trying to automate stgraber's "GUI in containers"
post.

Signed-off-by: Casey Marshall <casey.marshall@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/confile.c

index 83dab05cad5d24a11a6b153785498a6691204f78..7202ad788b50a3808099143c6455b38fb5343748 100644 (file)
@@ -2370,9 +2370,12 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key)
                lxc_seccomp_free(c);
                return 0;
        }
-       else if (strncmp(key, "lxc.environment", 15) == 0)
+       else if (strncmp(key, "lxc.environment", 15) == 0) {
                return lxc_clear_environment(c);
-
+       }
+       else if (strncmp(key, "lxc.id_map", 10) == 0) {
+               return lxc_clear_idmaps(c);
+       }
        return -1;
 }