* [apparmor] [PATCH profile 1/1] dnsmasq: Add permission to open log files
@ 2018-10-08 14:44 Petr Vorel
2018-10-09 15:45 ` Jamie Strandboge
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Petr Vorel @ 2018-10-08 14:44 UTC (permalink / raw)
To: apparmor; +Cc: Petr Vorel
--log-facility option needs to have permission to open files.
Use '*' to allow using more files (for using more dnsmasq instances).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
profiles/apparmor.d/usr.sbin.dnsmasq | 2 ++
1 file changed, 2 insertions(+)
diff --git a/profiles/apparmor.d/usr.sbin.dnsmasq b/profiles/apparmor.d/usr.sbin.dnsmasq
index 2b4b1bfc..f2e6847d 100644
--- a/profiles/apparmor.d/usr.sbin.dnsmasq
+++ b/profiles/apparmor.d/usr.sbin.dnsmasq
@@ -45,6 +45,8 @@ profile dnsmasq /usr/{bin,sbin}/dnsmasq flags=(attach_disconnected) {
/usr/{bin,sbin}/dnsmasq mr,
+ /var/log/*dnsmasq.log w,
+
/usr/share/dnsmasq/ r,
/usr/share/dnsmasq/* r,
--
2.19.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [apparmor] [PATCH profile 1/1] dnsmasq: Add permission to open log files
2018-10-08 14:44 [apparmor] [PATCH profile 1/1] dnsmasq: Add permission to open log files Petr Vorel
@ 2018-10-09 15:45 ` Jamie Strandboge
2018-10-09 16:18 ` Petr Vorel
2018-10-09 16:18 ` Steve Beattie
2 siblings, 0 replies; 5+ messages in thread
From: Jamie Strandboge @ 2018-10-09 15:45 UTC (permalink / raw)
To: apparmor
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
On Mon, 08 Oct 2018, Petr Vorel wrote:
> --log-facility option needs to have permission to open files.
> Use '*' to allow using more files (for using more dnsmasq instances).
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> profiles/apparmor.d/usr.sbin.dnsmasq | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/profiles/apparmor.d/usr.sbin.dnsmasq b/profiles/apparmor.d/usr.sbin.dnsmasq
> index 2b4b1bfc..f2e6847d 100644
> --- a/profiles/apparmor.d/usr.sbin.dnsmasq
> +++ b/profiles/apparmor.d/usr.sbin.dnsmasq
> @@ -45,6 +45,8 @@ profile dnsmasq /usr/{bin,sbin}/dnsmasq flags=(attach_disconnected) {
>
> /usr/{bin,sbin}/dnsmasq mr,
>
> + /var/log/*dnsmasq.log w,
> +
+1
--
Jamie Strandboge | http://www.canonical.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [apparmor] [PATCH profile 1/1] dnsmasq: Add permission to open log files
2018-10-08 14:44 [apparmor] [PATCH profile 1/1] dnsmasq: Add permission to open log files Petr Vorel
2018-10-09 15:45 ` Jamie Strandboge
@ 2018-10-09 16:18 ` Petr Vorel
2018-10-09 16:18 ` Steve Beattie
2 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2018-10-09 16:18 UTC (permalink / raw)
To: apparmor; +Cc: Jamie Strandboge
Hi,
...
> +++ b/profiles/apparmor.d/usr.sbin.dnsmasq
> @@ -45,6 +45,8 @@ profile dnsmasq /usr/{bin,sbin}/dnsmasq flags=(attach_disconnected) {
> /usr/{bin,sbin}/dnsmasq mr,
> + /var/log/*dnsmasq.log w,
> +
I see other wildcards in usr.sbin.dnsmasq (for lxc and NetworkManager) are in
patter of suffices. So if you don't like the previous pattern, it could be also:
/var/log/dnsmasq.log w,
/var/log/dnsmasq.*.log w,
Kind regards,
Petr
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [apparmor] [PATCH profile 1/1] dnsmasq: Add permission to open log files
2018-10-08 14:44 [apparmor] [PATCH profile 1/1] dnsmasq: Add permission to open log files Petr Vorel
2018-10-09 15:45 ` Jamie Strandboge
2018-10-09 16:18 ` Petr Vorel
@ 2018-10-09 16:18 ` Steve Beattie
2018-10-09 16:53 ` Petr Vorel
2 siblings, 1 reply; 5+ messages in thread
From: Steve Beattie @ 2018-10-09 16:18 UTC (permalink / raw)
To: apparmor
[-- Attachment #1: Type: text/plain, Size: 527 bytes --]
Hi Petr,
On Mon, Oct 08, 2018 at 04:44:01PM +0200, Petr Vorel wrote:
> --log-facility option needs to have permission to open files.
> Use '*' to allow using more files (for using more dnsmasq instances).
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
LGTM as well, I've applied to trunk[1] and cherry-picked back to the
older stable releases. Thanks!
[1] https://gitlab.com/apparmor/apparmor/commit/025c7dc6a131da24c31e41ad32753015a0ec0f76
--
Steve Beattie
<sbeattie@ubuntu.com>
http://NxNW.org/~steve/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [apparmor] [PATCH profile 1/1] dnsmasq: Add permission to open log files
2018-10-09 16:18 ` Steve Beattie
@ 2018-10-09 16:53 ` Petr Vorel
0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2018-10-09 16:53 UTC (permalink / raw)
To: Steve Beattie; +Cc: apparmor
Hi Steve,
> On Mon, Oct 08, 2018 at 04:44:01PM +0200, Petr Vorel wrote:
> > --log-facility option needs to have permission to open files.
> > Use '*' to allow using more files (for using more dnsmasq instances).
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> LGTM as well, I've applied to trunk[1] and cherry-picked back to the
> older stable releases. Thanks!
> [1] https://gitlab.com/apparmor/apparmor/commit/025c7dc6a131da24c31e41ad32753015a0ec0f76
Thanks a lot for including the fix!
Just for a record, it was found by LTP test ltp_net_ipv6.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-09 16:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-08 14:44 [apparmor] [PATCH profile 1/1] dnsmasq: Add permission to open log files Petr Vorel
2018-10-09 15:45 ` Jamie Strandboge
2018-10-09 16:18 ` Petr Vorel
2018-10-09 16:18 ` Steve Beattie
2018-10-09 16:53 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).