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 04D03C43441 for ; Mon, 12 Nov 2018 08:47:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB66221527 for ; Mon, 12 Nov 2018 08:47:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB66221527 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 S1727036AbeKLSjv (ORCPT ); Mon, 12 Nov 2018 13:39:51 -0500 Received: from mx2.suse.de ([195.135.220.15]:53030 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726207AbeKLSjv (ORCPT ); Mon, 12 Nov 2018 13:39:51 -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 B1A04B02D; Mon, 12 Nov 2018 08:47:38 +0000 (UTC) From: Petr Vorel To: selinux-refpolicy@vger.kernel.org Cc: Petr Vorel , Chris PeBenito , Dan Walsh Subject: [PATCH v3 2/2] dnsmasq: Add support for lxc-net, lxd-bridge, NetworkManager Date: Mon, 12 Nov 2018 09:47:31 +0100 Message-Id: <20181112084731.27185-2-pvorel@suse.cz> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112084731.27185-1-pvorel@suse.cz> References: <20181112084731.27185-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 + sort /var/lib/ lines. Signed-off-by: Petr Vorel --- Changes v2->v3: * more sorting Changes v1->v2 * fix sorting (requested by Chris PeBenito) * fix missing dot escapes (requested by Chris PeBenito) * change some stars to plus --- policy/modules/services/dnsmasq.fc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/policy/modules/services/dnsmasq.fc b/policy/modules/services/dnsmasq.fc index 91c18d46..7df6e973 100644 --- a/policy/modules/services/dnsmasq.fc +++ b/policy/modules/services/dnsmasq.fc @@ -5,6 +5,11 @@ /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) +/run/NetworkManager/dnsmasq\.conf 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/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) /usr/bin/dnsmasq -- gen_context(system_u:object_r:dnsmasq_exec_t,s0) @@ -13,7 +18,11 @@ /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/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/lxd/networks/\.+/dnsmasq\.pid -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0) +/var/lib/misc/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) -- 2.19.1