Public bug reported:

LXD containers on an artful or bionic host with aa namespaces, should be
able to load the lxc policies. However /lib/apparmor/profile-load skips
that part when running in a container.

aa-status shows 0 policies

/lib/apparmor/profile-load is failing due to
is_container_with_internal_policy() failing

due to

/sys/kernel/security/apparmor/.ns_name being empty which causes

        if [ "${ns_name#lxd-*}" = "$ns_name" ] && \
           [ "${ns_name#lxc-*}" = "$ns_name" ]; then
                return 1
        fi

to fail

** Affects: apparmor (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: apparmor (Ubuntu Artful)
     Importance: Undecided
         Status: New

** Affects: apparmor (Ubuntu Bionic)
     Importance: Undecided
         Status: New

** Also affects: apparmor (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Also affects: apparmor (Ubuntu Artful)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apparmor in Ubuntu.
https://bugs.launchpad.net/bugs/1746463

Title:
  apparmor profile load in stacked policy container fails

Status in apparmor package in Ubuntu:
  New
Status in apparmor source package in Artful:
  New
Status in apparmor source package in Bionic:
  New

Bug description:
  LXD containers on an artful or bionic host with aa namespaces, should
  be able to load the lxc policies. However /lib/apparmor/profile-load
  skips that part when running in a container.

  aa-status shows 0 policies

  /lib/apparmor/profile-load is failing due to
  is_container_with_internal_policy() failing

  due to

  /sys/kernel/security/apparmor/.ns_name being empty which causes

        if [ "${ns_name#lxd-*}" = "$ns_name" ] && \
           [ "${ns_name#lxc-*}" = "$ns_name" ]; then
                return 1
        fi

  to fail

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1746463/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to