apparmor: fix apparmor mediating locking non-fs unix sockets
[ Upstream commit 1cf26c3d2c4c2098e39a9905174d7842b531e693 ]
the v8 and earlier policy does not encode the locking permission for
no-fs unix sockets. However the kernel is enforcing mediation.
Add the AA_MAY_LOCK perm to v8 and earlier computed perm mask which will
grant permission for all current abi profiles, but still allow specifying
auditing of the operation if needed.
Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052130
Link: http://bugs.launchpad.net/bugs/1780227
Fixes: 56974a6fcfef ("apparmor: add base infastructure for socket mediation")
Signed-off-by: John Johansen <john.johansen@canonical.com>
[ jj: backport to v6.1 by replacing aa_state_t with unsigned int
as commit 33fc95d8293c is not present. ]
Tested-by: Mathias Gibbens <gibmat@debian.org>
Signed-off-by: John Johansen <john.johansen@canonical.com>
1 file changed