[lxc-devel] [lxd/master] Convert mode from string to octal (not to decimal)

simos on Github lxc-bot at linuxcontainers.org
Wed Jul 4 16:07:51 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 527 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180704/afd960d8/attachment.bin>
-------------- next part --------------
From e0a587e02186ad1712ed11a0a3ed7cd9014585de Mon Sep 17 00:00:00 2001
From: Simos Xenitellis <simos.lists at googlemail.com>
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
 				}


More information about the lxc-devel mailing list