Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 628918 - sec-policy/apparmor-profiles - dnsmasq profile blocks access to /usr/libexec/libvirt_leaseshelper
Summary: sec-policy/apparmor-profiles - dnsmasq profile blocks access to /usr/libexec/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Michael Palimaka (kensington)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-25 14:22 UTC by vm666
Modified: 2020-10-10 09:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vm666 2017-08-25 14:22:28 UTC
I got this error message. I'm not sure it can be easily fixed though, and I don't think this is blocking.

[   29.359034] audit: type=1400 audit(1503670039.772:50): apparmor="DENIED" operation="exec" profile="/usr/sbin/dnsmasq" name="/usr/libexec/libvirt_leaseshelper" pid=4768 comm="sh" requested_mask="x" denied_mask="x" fsuid=0 ouid=0
[   29.359037] audit: type=1400 audit(1503670039.772:51): apparmor="DENIED" operation="open" profile="/usr/sbin/dnsmasq" name="/usr/libexec/libvirt_leaseshelper" pid=4768 comm="sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

I'm running apparmor 2.11.0 on kernel 4.12.5-gentoo

[I] sec-policy/apparmor-profiles
     Available versions:  (~)2.11.0^t {minimal}
     Installed versions:  2.11.0^t(19:46:06 18/04/17)(-minimal)

[I] sys-apps/apparmor
     Available versions:  (~)2.11.0 {doc}
     Installed versions:  2.11.0(13:30:29 27/03/17)(doc)
Comment 1 Michael Palimaka (kensington) gentoo-dev 2017-08-26 08:19:12 UTC
I'm afraid that apparmor-profiles are as shipped by upstream and are completely untested on Gentoo.
Comment 2 Oleg Hoefling 2019-11-21 15:18:33 UTC
It's sufficient to add the lines

/usr/libexec/libvirt_leaseshelper Cx -> libvirt_leaseshelper,
/usr/libexec/libvirt_leaseshelper m,

to /etc/apparmor.d/local/usr.sbin.dnsmasq and restart the services via e.g.

systemctl restart apparmor libvirtd
Comment 3 Sebastian Hamann 2020-03-22 07:23:39 UTC
As an alternative to creating the local file, the existing /etc/apparmor.d/usr.sbin.dnsmasq profile can be modified. Simply replacing /usr/lib{,64}/libvirt/libvirt_leaseshelper with /usr/libexec/libvirt_leaseshelper is sufficient to make it work on Gentoo. I think, the ebuild should apply this patch.
Comment 4 Vladimir Shapranov 2020-03-28 13:57:43 UTC
Created a bug in apparmor-profiles: https://gitlab.com/apparmor/apparmor/-/issues/87
Comment 5 Michael Palimaka (kensington) gentoo-dev 2020-10-10 09:48:25 UTC
(In reply to Vladimir Shapranov from comment #4)
> Created a bug in apparmor-profiles:
> https://gitlab.com/apparmor/apparmor/-/issues/87

This looks like it's fixed in 3.0.0.