]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: prevent values smaller 0
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 20 Oct 2018 09:39:28 +0000 (11:39 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 22 Oct 2018 14:47:44 +0000 (16:47 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index ab035507e6a132dacb903ddfb4df42eba77cdccd..55c2e0e99cf7d391f21ab02bf68127d0ca4fc7cf 100644 (file)
@@ -1467,10 +1467,10 @@ int resolve_clone_flags(struct lxc_handler *handler)
        struct lxc_conf *conf = handler->conf;
 
        for (i = 0; i < LXC_NS_MAX; i++) {
-               if (conf->ns_keep != 0) {
+               if (conf->ns_keep > 0) {
                        if ((conf->ns_keep & ns_info[i].clone_flag) == 0)
                                handler->ns_clone_flags |= ns_info[i].clone_flag;
-               } else if (conf->ns_clone != 0) {
+               } else if (conf->ns_clone > 0) {
                        if ((conf->ns_clone & ns_info[i].clone_flag) > 0)
                                handler->ns_clone_flags |= ns_info[i].clone_flag;
                } else {