mcst-linux-kernel/patches-2024.06.26/lxd-3.0.0/0025-lxc-config-Fix-adding-...

29 lines
889 B
Diff

From d7112725bcd8ba8075b48a9168620b1ece62d31f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@ubuntu.com>
Date: Fri, 6 Apr 2018 11:50:27 -0400
Subject: lxc/config: Fix adding trust cert on snap
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Closes #4418
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
---
lxc/config_trust.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lxc/config_trust.go b/lxc/config_trust.go
index 912d3da9..54b634b8 100644
--- a/lxc/config_trust.go
+++ b/lxc/config_trust.go
@@ -86,7 +86,7 @@ func (c *cmdConfigTrustAdd) Run(cmd *cobra.Command, args []string) error {
// Add trust relationship
fname := args[len(args)-1]
- x509Cert, err := shared.ReadCert(fname)
+ x509Cert, err := shared.ReadCert(shared.HostPath(fname))
if err != nil {
return err
}