The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6047
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) === The documentation states that the default listen file mode is 0755 if not supplied. However the mode argument was currently being passed to forkproxy as empty string if not supplied. There was also no mention of 755 or umask in forkproxy itself, leading me to think the default as documented was not implemented. Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From aa1013b11e131b9ada63f0bb7d5e846d8fa72486 Mon Sep 17 00:00:00 2001 From: Thomas Parrott <thomas.parr...@canonical.com> Date: Wed, 7 Aug 2019 17:41:48 +0100 Subject: [PATCH] device/proxy: Implements default listen file mode of 0755 The documentation states that the default listen file mode is 0755 if not supplied. However the mode argument was currently being passed to forkproxy as empty string if not supplied. There was also no mention of 755 or umask in forkproxy itself, leading me to think the default as documented was not implemented. Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com> --- lxd/device/proxy.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lxd/device/proxy.go b/lxd/device/proxy.go index c9e9d5a789..9d87e31801 100644 --- a/lxd/device/proxy.go +++ b/lxd/device/proxy.go @@ -410,6 +410,11 @@ func (d *proxy) setupProxyProcInfo() (*proxyProcInfo, error) { return nil, fmt.Errorf("Invalid binding side given. Must be \"host\" or \"guest\"") } + listenAddrMode := "0755" + if d.config["mode"] != "" { + listenAddrMode = d.config["mode"] + } + p := &proxyProcInfo{ listenPid: listenPid, connectPid: connectPid, @@ -417,7 +422,7 @@ func (d *proxy) setupProxyProcInfo() (*proxyProcInfo, error) { listenAddr: listenAddr, listenAddrGID: d.config["gid"], listenAddrUID: d.config["uid"], - listenAddrMode: d.config["mode"], + listenAddrMode: listenAddrMode, securityGID: d.config["security.gid"], securityUID: d.config["security.uid"], proxyProtocol: d.config["proxy_protocol"],
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel