[lxc-devel] [lxd/master] Fix bad check for recursive mounts

stgraber on Github lxc-bot at linuxcontainers.org
Thu Oct 25 16:48:17 UTC 2018


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/20181025/3cfdbc6a/attachment.bin>
-------------- next part --------------
From 3f5e382d7e068d8b165230199c720c295dcea87c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 25 Oct 2018 10:47:45 -0600
Subject: [PATCH] Fix bad check for recursive mounts
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>
---
 lxd/container.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/container.go b/lxd/container.go
index ba8ac1edbc..4eba3930c8 100644
--- a/lxd/container.go
+++ b/lxd/container.go
@@ -398,7 +398,7 @@ func containerValidDevices(db *db.Cluster, devices types.Devices, profile bool,
 				return fmt.Errorf("Only the root disk may have a size quota")
 			}
 
-			if (m["path"] == "/" || !shared.IsDir(m["source"])) && m["recursive"] != "" {
+			if (m["path"] == "/" || !shared.IsDir(shared.HostPath(m["source"]))) && m["recursive"] != "" {
 				return fmt.Errorf("The recursive option is only supported for additional bind-mounted paths")
 			}
 


More information about the lxc-devel mailing list