[lxc-devel] [distrobuilder/master] generators/utils: Fix condition

monstermunchkin on Github lxc-bot at linuxcontainers.org
Mon May 11 18:31:43 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 310 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200511/0e27c4e4/attachment.bin>
-------------- next part --------------
From 07cc0ab394aa874a49c514ebbe609ca7e34c99b2 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Mon, 11 May 2020 20:26:10 +0200
Subject: [PATCH] generators/utils: Fix condition

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 generators/utils.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/generators/utils.go b/generators/utils.go
index 79c3d92..853b6c1 100644
--- a/generators/utils.go
+++ b/generators/utils.go
@@ -37,7 +37,7 @@ func updateFileAccess(file *os.File, defFile shared.DefinitionFile) error {
 	}
 
 	// Change uid if needed
-	if defFile.Mode != "" {
+	if defFile.UID != "" {
 		uid, err := strconv.Atoi(defFile.UID)
 		if err != nil {
 			return errors.Wrap(err, "Failed to parse UID")


More information about the lxc-devel mailing list