The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/2056
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: huqiang <huqiang.al...@foxmail.com>
From 43d221f302fcba021b2549aea3c584bc2878800d Mon Sep 17 00:00:00 2001 From: huqiang <huqiang.al...@foxmail.com> Date: Fri, 22 Dec 2017 18:17:31 +0800 Subject: [PATCH] attach.c small fix,more logical Signed-off-by: huqiang <huqiang.al...@foxmail.com> --- src/lxc/attach.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 5ef0802a2..b31450016 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -305,9 +305,10 @@ static int in_same_namespace(pid_t pid1, pid_t pid2, const char *ns) goto out; /* processes are in the same namespace */ - ret = -EINVAL; - if ((ns_st1.st_dev == ns_st2.st_dev ) && (ns_st1.st_ino == ns_st2.st_ino)) + if ((ns_st1.st_dev == ns_st2.st_dev ) && (ns_st1.st_ino == ns_st2.st_ino)) { + ret = -EINVAL; goto out; + } /* processes are in different namespaces */ ret = ns_fd2;
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel