[lxc-devel] [lxd/master] shared/util: Never look into the snap

stgraber on Github lxc-bot at linuxcontainers.org
Wed Apr 15 18:29:02 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200415/083a7497/attachment.bin>
-------------- next part --------------
From 8447da505e42763c1fb56e2ab905aa8146b29030 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 15 Apr 2020 14:28:39 -0400
Subject: [PATCH] shared/util: Never look into the snap
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 shared/util.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/shared/util.go b/shared/util.go
index 4813aa62f4..3a7c55cfd5 100644
--- a/shared/util.go
+++ b/shared/util.go
@@ -143,6 +143,7 @@ func HostPathFollow(path string) string {
 	}
 
 	// Rely on "readlink -m" to do the right thing.
+	path = HostPath(path)
 	for {
 		target, err := RunCommand("readlink", "-m", path)
 		if err != nil {


More information about the lxc-devel mailing list