Comment 3 for bug 1298539

Dimitri John Ledkov (xnox) wrote :

we could move just run profile loading earlier, ahead of remote filesystems, as an upstart job:

description "Pre-cache and load apparmor profiles"
start on local-filesystems and not-container
 . ./lib/apparmor/functions
 [ -w "$AA_SFS"/.load ] || { stop; exit 0; }
end script

Also desktop is a bit too quick to observe the ordering here. But e.g. it looks like on ubuntu-touch network-manager is started ahead of loading all apparmor profiles, the network-manager job does not load profiles for binaries that it uses and it can spawn e.g. dhclient see:

dhclient did not execute ahead of apparmor_profile launched by xargs, but it think it could be on a cold boot when profiles are regenerated for all .clicks.