Commit 174a26ea authored by John Johansen's avatar John Johansen Committed by Shrirang Bagul
Browse files

apparmor: fix dangling symlinks to policy rawdata after replacement

BugLink: http://bugs.launchpad.net/bugs/1763427

When policy replacement occurs the symlinks in the profile directory
need to be updated to point to the new rawdata, otherwise once the
old rawdata is removed the symlink becomes broken.

Fix this by dynamically generating the symlink everytime it is read.
These links are used enough that their value needs to be cached and
this way we can avoid needing locking to read and update the link
value.

Fixes: a481f4d9 ("apparmor: add custom apparmorfs that will be used by policy namespace files")
BugLink: http://bugs.launchpad.net/bugs/1755563


Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
(cherry picked from commit 1180b4c7
 git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor

)
Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
(cherry picked from commit 29e1dd6b)
Signed-off-by: default avatarShrirang Bagul <shrirang.bagul@canonical.com>
parent 4f56b485
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment