The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1528

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: Christian Brauner <[email protected]>
From 88431c021b03e68cf83f5a50e8ffadc5f5237684 Mon Sep 17 00:00:00 2001
From: Christian Brauner <[email protected]>
Date: Fri, 28 Apr 2017 13:52:43 +0200
Subject: [PATCH] conf: close fd in lxc_setup_devpts()

Signed-off-by: Christian Brauner <[email protected]>
---
 src/lxc/conf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index fc7fb18..eb92b5c 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -1428,10 +1428,11 @@ static int lxc_setup_devpts(int num_pts)
                SYSERROR("failed to create dummy \"/dev/ptmx\" file as bind 
mount target");
                return -1;
        }
+       close(ret);
        DEBUG("created dummy \"/dev/ptmx\" file as bind mount target");
 
        /* Fallback option: create symlink /dev/ptmx -> /dev/pts/ptmx  */
-       ret = mount("/dev/pts/ptmx", "/dev/ptmx", "none", MS_BIND, 0);
+       ret = mount("/dev/pts/ptmx", "/dev/ptmx", NULL, MS_BIND, NULL);
        if (!ret) {
                DEBUG("bind mounted \"/dev/pts/ptmx\" to \"/dev/ptmx\"");
                return 0;
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to