Unverified Commit f57860ac by Christian Brauner Committed by GitHub

Merge pull request #2833 from brauner/2019-02-09/bugfixes

bugfixes
parents 884b37d0 6425271d
...@@ -2193,7 +2193,7 @@ static int convert_devpath(const char *invalue, char *dest) ...@@ -2193,7 +2193,7 @@ static int convert_devpath(const char *invalue, char *dest)
* A ' # comment' would be legal. Technically other text is not * A ' # comment' would be legal. Technically other text is not
* legal, we could check for that if we cared to. * legal, we could check for that if we cared to.
*/ */
for (n_parts = 1, p = path; *p && n_parts < 3; p++) { for (n_parts = 1, p = path; *p; p++) {
if (*p != ' ') if (*p != ' ')
continue; continue;
*p = '\0'; *p = '\0';
......
...@@ -432,6 +432,7 @@ int main(int argc, char *argv[]) ...@@ -432,6 +432,7 @@ int main(int argc, char *argv[])
if (my_args.quiet) if (my_args.quiet)
fprintf(stderr, "Failed to wait on child %d\n", pid); fprintf(stderr, "Failed to wait on child %d\n", pid);
ret = -1;
goto out; goto out;
} }
......
...@@ -317,7 +317,7 @@ static int lxc_cmd(const char *name, struct lxc_cmd_rr *cmd, int *stopped, ...@@ -317,7 +317,7 @@ static int lxc_cmd(const char *name, struct lxc_cmd_rr *cmd, int *stopped,
return ret; return ret;
} }
if (stay_connected && ret > 0) if (stay_connected)
cmd->rsp.ret = client_fd; cmd->rsp.ret = client_fd;
return ret; return ret;
......
...@@ -1507,11 +1507,11 @@ int resolve_clone_flags(struct lxc_handler *handler) ...@@ -1507,11 +1507,11 @@ int resolve_clone_flags(struct lxc_handler *handler)
struct lxc_conf *conf = handler->conf; struct lxc_conf *conf = handler->conf;
for (i = 0; i < LXC_NS_MAX; i++) { for (i = 0; i < LXC_NS_MAX; i++) {
if (conf->ns_keep > 0) { if (conf->ns_keep) {
if ((conf->ns_keep & ns_info[i].clone_flag) == 0) if (!(conf->ns_keep & ns_info[i].clone_flag))
handler->ns_clone_flags |= ns_info[i].clone_flag; handler->ns_clone_flags |= ns_info[i].clone_flag;
} else if (conf->ns_clone > 0) { } else if (conf->ns_clone) {
if ((conf->ns_clone & ns_info[i].clone_flag) > 0) if ((conf->ns_clone & ns_info[i].clone_flag))
handler->ns_clone_flags |= ns_info[i].clone_flag; handler->ns_clone_flags |= ns_info[i].clone_flag;
} else { } else {
if (i == LXC_NS_USER && lxc_list_empty(&handler->conf->id_map)) if (i == LXC_NS_USER && lxc_list_empty(&handler->conf->id_map))
......
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