The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/4733
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) === Currently, the mode (Unix file permissions) is converted from string to decimal using `Atoi()`. The mode is traditionally provided as octal, therefore the conversion should be from string to octal, with `strconv.ParseUint()`.
From e0a587e02186ad1712ed11a0a3ed7cd9014585de Mon Sep 17 00:00:00 2001 From: Simos Xenitellis <[email protected]> Date: Wed, 4 Jul 2018 19:03:52 +0300 Subject: [PATCH] Convert mode from string to octal --- lxd/main_forkproxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxd/main_forkproxy.go b/lxd/main_forkproxy.go index 8a714a88f..cdf942230 100644 --- a/lxd/main_forkproxy.go +++ b/lxd/main_forkproxy.go @@ -497,7 +497,7 @@ func (c *cmdForkproxy) Run(cmd *cobra.Command, args []string) error { var listenAddrMode os.FileMode if args[8] != "" { - tmp, err := strconv.Atoi(args[8]) + tmp, err := strconv.ParseUint(args[8], 8, 0) if err != nil { return err }
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
