The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8139
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === It appears that on some kernel at least, the connect operation is evaluated against the non-dereference path when dealing with a symlink. Signed-off-by: Stéphane Graber <[email protected]>
From c6d7f2a92bafa217593f482611fd98e941e2ce30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <[email protected]> Date: Tue, 10 Nov 2020 18:05:39 -0500 Subject: [PATCH] lxd/apparmor: Workaround socket handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It appears that on some kernel at least, the connect operation is evaluated against the non-dereference path when dealing with a symlink. Signed-off-by: Stéphane Graber <[email protected]> --- lxd/apparmor/instance_forkproxy.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lxd/apparmor/instance_forkproxy.go b/lxd/apparmor/instance_forkproxy.go index 7b320f0056..5518e53b2d 100644 --- a/lxd/apparmor/instance_forkproxy.go +++ b/lxd/apparmor/instance_forkproxy.go @@ -77,7 +77,7 @@ profile "{{ .name }}" flags=(attach_disconnected,mediate_deleted) { /snap/lxd/*/lib/**.so* mr, {{- end }} -{{if .libraryPath -}} +{{if .libraryPath }} # Entries from LD_LIBRARY_PATH {{range $index, $element := .libraryPath}} {{$element}}/** mr, @@ -138,7 +138,9 @@ func forkproxyProfile(state *state.State, inst instance, dev device) (string, er return "", err } - sockets[k] = v + if !shared.StringInSlice(v, sockets) { + sockets = append(sockets, v) + } } // Render the profile.
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
