Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEB1DC46465 for ; Wed, 7 Nov 2018 20:57:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8309720827 for ; Wed, 7 Nov 2018 20:57:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8309720827 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726932AbeKHG34 (ORCPT ); Thu, 8 Nov 2018 01:29:56 -0500 Received: from mx2.suse.de ([195.135.220.15]:49136 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726957AbeKHG34 (ORCPT ); Thu, 8 Nov 2018 01:29:56 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A0CC3AF09; Wed, 7 Nov 2018 20:57:47 +0000 (UTC) From: Petr Vorel To: selinux-refpolicy@vger.kernel.org Cc: Petr Vorel , Chris PeBenito , Dan Walsh Subject: [PATCH 2/2] dnsmasq: Add support for lxc-net, lxd-bridge, NetworkManager Date: Wed, 7 Nov 2018 21:57:36 +0100 Message-Id: <20181107205736.21748-2-pvorel@suse.cz> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181107205736.21748-1-pvorel@suse.cz> References: <20181107205736.21748-1-pvorel@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org * lxc-net pid and lease files: /var/run/lxc/dnsmasq.pid /var/lib/misc/dnsmasq.*.leases * lxd-bridge pid and lease files: /var/run/lxd-bridge/dnsmasq.pid /var/lib/lxd-bridge/dnsmasq.*.leases /var/lib/lxd/networks/*/dnsmasq.leases /var/lib/lxd/networks/*/dnsmasq.pid * NetworkManager pid, lease and configuration files: /var/lib/NetworkManager/dnsmasq-*.leases /run/nm-dns-dnsmasq.conf /run/nm-dnsmasq-*.pid /run/sendsigs.omit.d/*dnsmasq.pid /run/NetworkManager/dnsmasq.conf /run/NetworkManager/dnsmasq.pid Signed-off-by: Petr Vorel --- policy/modules/services/dnsmasq.fc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/policy/modules/services/dnsmasq.fc b/policy/modules/services/dnsmasq.fc index 4c34df3c..d1fb367e 100644 --- a/policy/modules/services/dnsmasq.fc +++ b/policy/modules/services/dnsmasq.fc @@ -1,5 +1,7 @@ /etc/dnsmasq\.conf -- gen_context(system_u:object_r:dnsmasq_etc_t,s0) /etc/dnsmasq\.d(/.*)? gen_context(system_u:object_r:dnsmasq_etc_t,s0) +/run/nm-dns-dnsmasq.conf gen_context(system_u:object_r:dnsmasq_etc_t,s0) +/run/NetworkManager/dnsmasq.conf gen_context(system_u:object_r:dnsmasq_etc_t,s0) /etc/rc\.d/init\.d/dnsmasq -- gen_context(system_u:object_r:dnsmasq_initrc_exec_t,s0) @@ -10,10 +12,18 @@ /usr/sbin/dnsmasq -- gen_context(system_u:object_r:dnsmasq_exec_t,s0) -/var/lib/misc/dnsmasq\.leases -- gen_context(system_u:object_r:dnsmasq_lease_t,s0) +/var/lib/misc/dnsmasq(\..+)?\.leases -- gen_context(system_u:object_r:dnsmasq_lease_t,s0) /var/lib/dnsmasq(/.*)? gen_context(system_u:object_r:dnsmasq_lease_t,s0) +/var/lib/lxd-bridge/dnsmasq\..+\.leases -- gen_context(system_u:object_r:dnsmasq_lease_t,s0) +/var/lib/lxd/networks/\.*/dnsmasq\.leases -- gen_context(system_u:object_r:dnsmasq_lease_t,s0) +/var/lib/NetworkManager/dnsmasq-.*\.leases -- gen_context(system_u:object_r:dnsmasq_lease_t,s0) /var/log/dnsmasq(.*)?\.log -- gen_context(system_u:object_r:dnsmasq_var_log_t,s0) /run/dnsmasq.* -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0) /run/libvirt/network(/.*)? gen_context(system_u:object_r:dnsmasq_var_run_t,s0) +/run/(lxc|lxd-bridge|NetworkManager)/dnsmasq.pid -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0) +/var/lib/lxd/networks/\.+/dnsmasq.pid -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0) + +/run/nm-dnsmasq-.+.pid -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0) +/run/sendsigs\.omit\.d/.*dnsmasq.pid -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0) -- 2.19.1