From mboxrd@z Thu Jan 1 00:00:00 1970 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.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,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 E932BC34375 for ; Fri, 13 Dec 2019 20:37:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 29B8424715 for ; Fri, 13 Dec 2019 20:37:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=bigon.be header.i=@bigon.be header.b="qkOMuBmx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727370AbfLMNZt (ORCPT ); Fri, 13 Dec 2019 08:25:49 -0500 Received: from ithil.bigon.be ([163.172.57.153]:33700 "EHLO ithil.bigon.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727359AbfLMNZt (ORCPT ); Fri, 13 Dec 2019 08:25:49 -0500 Received: from localhost (localhost [IPv6:::1]) by ithil.bigon.be (Postfix) with ESMTP id 81E411FF82 for ; Fri, 13 Dec 2019 14:20:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bigon.be; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received:received; s=key1; t=1576243224; x=1578057625; bh=lZelOE3Mu9PcDKwE/C3VyNIw+JH020w0TjUHOefEwD4=; b=qkOMuBmxnB3g H2zZZY72t2kvnxBiuTJUmn269f/nnvKjsjTYQbTYujVvSkjkfx45EVH67QGWU/Nd WRJgFfFHny3+iTiaK5EfGCEAHYcf2Xbw+lJnZtVWIE/FS3/XUxzPpUSjMyxSSXyF CRwS2qjWyItO19zhfNFRxvmf5S8Q7TU= Received: from ithil.bigon.be ([IPv6:::1]) by localhost (ithil.bigon.be [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id zwcbi5tT3FDU for ; Fri, 13 Dec 2019 14:20:24 +0100 (CET) Received: from edoras.bigon.be (unknown [193.53.238.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bigon@bigon.be) by ithil.bigon.be (Postfix) with ESMTPSA for ; Fri, 13 Dec 2019 14:20:24 +0100 (CET) Received: from bigon (uid 1000) (envelope-from bigon@bigon.be) id 214a8 by edoras.bigon.be (DragonFly Mail Agent v0.12); Fri, 13 Dec 2019 14:20:23 +0100 From: Laurent Bigonville To: selinux-refpolicy@vger.kernel.org Subject: [RFC 1/3] Add an interface to allow the specified domain to mmap the general network configuration files Date: Fri, 13 Dec 2019 14:20:14 +0100 Message-Id: <20191213132016.308556-2-bigon@debian.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213132016.308556-1-bigon@debian.org> References: <20191213132016.308556-1-bigon@debian.org> 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 From: Laurent Bigonville Signed-off-by: Laurent Bigonville --- policy/modules/system/sysnetwork.if | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/policy/modules/system/sysnetwork.if b/policy/modules/system/sysnetwork.if index 77eab21e..1f785c7c 100644 --- a/policy/modules/system/sysnetwork.if +++ b/policy/modules/system/sysnetwork.if @@ -364,6 +364,31 @@ interface(`sysnet_read_config',` ') ') +####################################### +## +## Map network config files. +## +## +##

+## Allow the specified domain to mmap the +## general network configuration files. +##

+##
+## +## +## Domain allowed access. +## +## +# +interface(`sysnet_map_config',` + gen_require(` + type net_conf_t; + ') + + files_search_etc($1) + allow $1 net_conf_t:file map; +') + ####################################### ## ## Do not audit attempts to read network config files. -- 2.24.0