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=-7.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED 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 5F025C43381 for ; Wed, 20 Feb 2019 03:31:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2B5822146F for ; Wed, 20 Feb 2019 03:31:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="MnGNlS6e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726986AbfBTDbw (ORCPT ); Tue, 19 Feb 2019 22:31:52 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:35086 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726312AbfBTDbv (ORCPT ); Tue, 19 Feb 2019 22:31:51 -0500 Received: by mail-pl1-f195.google.com with SMTP id p19so249146plo.2 for ; Tue, 19 Feb 2019 19:31:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=xsHEUjMlmwFHXRoN0ED4HC3dDYLpwv74IoABKLY8oMU=; b=MnGNlS6ekFQ2of70Yze38u36O7rxFMDEwsg6pCj8tIW3yWbTMYjXhBPyHoXrzQ/HyC zqJ4ncSUInBpw9E3D6rkSb7qKwIj9Q585OO1dfVV/Ci7HTgJjL4e0VoqMmXgwvRijvRQ UboDSml0UNm5hWlunO5SOKp1wAVWai6hFYMKU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=xsHEUjMlmwFHXRoN0ED4HC3dDYLpwv74IoABKLY8oMU=; b=U1P9CLERXApDCe9TcDdkNEu/hC+gk2bgnlkHbi4aycj/1tT+5LyLOQWtwUAwpzvyrB WNIEwqtbJRLeY/GcKVy8B1+h51pCqp6vQBqkgYcdFrp0BQqY9mUqDah0MIjo1RYk3tu1 pblQra25CFWJUT0ZfKtox3SlVQ+RqL7D5N5UZqokHejzgS1Y1MKx7Z+nQ9NoOOgwO4dq dz5yYz5u5DyaurOxqta+1wcgJD5w+6SaUDx5QRxN9mG0X2XgecfapKqZ0wjRqGK6R0n7 VJkzUjAR7bOdjkCreR0HjlBgfnpZ3YYh+yLKFh6976NUpgTP64YJJShJHxA10j4l0TsS 03wg== X-Gm-Message-State: AHQUAuZN7zEeeKz+ZMGK8m9Fsy5P/DK4cN5UZ1wUUvjwID/rXM3g5ZLL b0V5I5JZ6OueqbJXhUFCDLDn7Q== X-Google-Smtp-Source: AHgI3IZsBzDH3Im8QpWsFvIITyDe3wUWOtuhBx/k264Chu4TidxjsJUzaUWwsJ+7L1+FA/gCnjizYw== X-Received: by 2002:a17:902:820f:: with SMTP id x15mr33404207pln.224.1550633511023; Tue, 19 Feb 2019 19:31:51 -0800 (PST) Received: from lenovo.pebenito.net ([173.239.195.26]) by smtp.gmail.com with ESMTPSA id 10sm31808333pfq.146.2019.02.19.19.31.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 19:31:50 -0800 (PST) Message-ID: Subject: Re: [PATCH] Allow init_t to read net_conf_t From: Chris PeBenito To: "Sugar, David" , "selinux-refpolicy@vger.kernel.org" Date: Tue, 19 Feb 2019 19:31:50 -0800 In-Reply-To: <20190218151450.13208-1-dsugar@tresys.com> References: <20190218151450.13208-1-dsugar@tresys.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On Mon, 2019-02-18 at 15:15 +0000, Sugar, David wrote: > init (systemd) needs to read /etc/hostname during boot > to retreive the hostname to apply to the system. > > Feb 06 18:37:06 localhost.localdomain kernel: type=1400 > audit(1549478223.842:3): avc: denied { read } for pid=1 > comm="systemd" name="hostname" dev="dm-1" ino=1262975 > scontext=system_u:system_r:init_t:s0 > tcontext=system_u:object_r:net_conf_t:s0 tclass=file permissive=0 > > Signed-off-by: Dave Sugar > --- > policy/modules/system/init.te | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/policy/modules/system/init.te > b/policy/modules/system/init.te > index eabba1ed..735a3b81 100644 > --- a/policy/modules/system/init.te > +++ b/policy/modules/system/init.te > @@ -409,6 +409,8 @@ ifdef(`init_systemd',` > # lvm2-activation-generator checks file labels > seutil_read_file_contexts(init_t) > > + sysnet_read_config(init_t) > + > systemd_getattr_updated_runtime(init_t) > systemd_manage_passwd_runtime_symlinks(init_t) > systemd_use_passwd_agent(init_t) Merged. -- Chris PeBenito