[lxc-devel] [lxc/master] bugfixes
brauner on Github
lxc-bot at linuxcontainers.org
Sat Feb 9 00:37:29 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190208/08dee947/attachment.bin>
-------------- next part --------------
From 6403a6671cf2b13e54834c8ad3796e16a56447c8 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Sat, 9 Feb 2019 01:28:52 +0100
Subject: [PATCH 1/4] commands: remove unnecessary check
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
src/lxc/commands.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/commands.c b/src/lxc/commands.c
index 5057d5512..b80e39eb4 100644
--- a/src/lxc/commands.c
+++ b/src/lxc/commands.c
@@ -317,7 +317,7 @@ static int lxc_cmd(const char *name, struct lxc_cmd_rr *cmd, int *stopped,
return ret;
}
- if (stay_connected && ret > 0)
+ if (stay_connected)
cmd->rsp.ret = client_fd;
return ret;
From 0dbdb99e3bf6a1cf1ea0ac9db60b6decf97b1f0d Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Sat, 9 Feb 2019 01:31:52 +0100
Subject: [PATCH 2/4] cgfsng: remove unnecessary check
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
src/lxc/cgroups/cgfsng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
index 9ef02c5dc..2049363b3 100644
--- a/src/lxc/cgroups/cgfsng.c
+++ b/src/lxc/cgroups/cgfsng.c
@@ -2193,7 +2193,7 @@ static int convert_devpath(const char *invalue, char *dest)
* A ' # comment' would be legal. Technically other text is not
* 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 != ' ')
continue;
*p = '\0';
From f7a0c6ee2abdb1fa080e063dceb1dec3bda97e98 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Sat, 9 Feb 2019 01:33:18 +0100
Subject: [PATCH 3/4] start: prevent signed-issues
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
src/lxc/start.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/lxc/start.c b/src/lxc/start.c
index b4bb6ef9a..89262c736 100644
--- a/src/lxc/start.c
+++ b/src/lxc/start.c
@@ -1507,11 +1507,11 @@ 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 & ns_info[i].clone_flag) == 0)
+ if (conf->ns_keep) {
+ if (!(conf->ns_keep & ns_info[i].clone_flag))
handler->ns_clone_flags |= ns_info[i].clone_flag;
- } else if (conf->ns_clone > 0) {
- if ((conf->ns_clone & ns_info[i].clone_flag) > 0)
+ } else if (conf->ns_clone) {
+ if ((conf->ns_clone & ns_info[i].clone_flag))
handler->ns_clone_flags |= ns_info[i].clone_flag;
} else {
if (i == LXC_NS_USER && lxc_list_empty(&handler->conf->id_map))
From 6425271d041b36e0f66fb0df19e43953cd836106 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Sat, 9 Feb 2019 01:35:44 +0100
Subject: [PATCH 4/4] lxc-init: exit with error on wait failure
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
src/lxc/cmd/lxc_init.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lxc/cmd/lxc_init.c b/src/lxc/cmd/lxc_init.c
index e7daa7863..b3849545a 100644
--- a/src/lxc/cmd/lxc_init.c
+++ b/src/lxc/cmd/lxc_init.c
@@ -432,6 +432,7 @@ int main(int argc, char *argv[])
if (my_args.quiet)
fprintf(stderr, "Failed to wait on child %d\n", pid);
+ ret = -1;
goto out;
}
More information about the lxc-devel
mailing list