Skip to content
Commit 7424ccaa authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov
Browse files

lsm: get host lsm type from the host mntns



We check files in /sys, so we must do this from host mount namespaces.

The write_img_inventory() is called after kerndat_init() and it's only
called on dump. The bug is triggered on restore, because the mount
namespace of the restored process doesn't have
/sys/kernel/security/apparmor/

I think it's better to initialize the host lsm in a one place for dump
and restore.

Currently we initialize the host lsm when we try to use it at a first
time. It works fine for the dump operation. On restore it doesn't work
because criu checks files in a restored mount namespace and it does this
for each process, what isn't optimal.

Signed-off-by: default avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
Acked-by: default avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent a6e13e1a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment