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.7 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 2E4F3C43441 for ; Sun, 18 Nov 2018 00:03:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ECF7620815 for ; Sun, 18 Nov 2018 00:03:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="Pl7ItxJx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECF7620815 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ieee.org 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 S1726923AbeKRKVe (ORCPT ); Sun, 18 Nov 2018 05:21:34 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:42245 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbeKRKVe (ORCPT ); Sun, 18 Nov 2018 05:21:34 -0500 Received: by mail-qk1-f196.google.com with SMTP id m5so43443872qka.9 for ; Sat, 17 Nov 2018 16:03:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=IrnfwvgG0L7ewjZhf2Vni+YTTOvKPd7IgbwAaWOYUbA=; b=Pl7ItxJxua3jxusHSijYBanKlrYklv0nMz4BbdGc3xXVvMpggCOmmGvOfYZCoA3ivz jBgA0QRGKALI9pQRsIajZFBCnkEk3s54AkwKacYCIEuyXcsGjr8kaBAUBhhGi39hVCEy BfHZ4uujPChHNwZWDiN3d+cLIetpc4mGjhDhE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IrnfwvgG0L7ewjZhf2Vni+YTTOvKPd7IgbwAaWOYUbA=; b=Lz+hv0zyFyeUJ2+BOJmZAnydmSb9O9SWIIeaRzHqTRbS8sOewSFuOSDuG09UOcBUep SWb4BE/dC7fbKkXj4mNYvc3acPOF1mkClI7DyYZoFrO6986jD+EzTbo/ekiFyqMbM6ke SCrEF/bLhns2mJjbI41pNeKZfn0VSwGiAdpLBunglSX83lkrQJIl4FHx0GNWrfEvOvJc SsQlbiScE3AkCNC9d4QgAPLJ2Ui33CZKR44qFDWkwHoZk2QhDKvGXfoZPb26kwoXq4gQ 4SEqtjRoBO+yk1oDVGpGf7AWll/48I4ai4Y5zXuHGmdDsAWnQoPgYljIpLvTHQtmKtJ1 gPMQ== X-Gm-Message-State: AGRZ1gISwu+yqIfQwAZAX+0EWLpmt23BMangsOOv1shKWuqdFf7qMfv+ UX4nHP7JDrgAw3Lw8kUN5E8ebjp0xt4= X-Google-Smtp-Source: AJdET5c1tMaFk723AACQiR06QnSrzsJuoKvfQRVT0DHb7uqzmvJoc4MnFP6pHW9tNLwtfVzJ5W0+uA== X-Received: by 2002:aed:3bb8:: with SMTP id r53mr15549489qte.77.1542499387589; Sat, 17 Nov 2018 16:03:07 -0800 (PST) Received: from [192.168.1.190] (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id l73sm19108988qkl.16.2018.11.17.16.03.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Nov 2018 16:03:07 -0800 (PST) Subject: Re: [PATCH 2/2] interface to enable/disable systemd_networkd service To: David Sugar , "selinux-refpolicy@vger.kernel.org" References: <20181117042305.23949-1-dsugar@tresys.com> <20181117042305.23949-2-dsugar@tresys.com> From: Chris PeBenito Message-ID: Date: Sat, 17 Nov 2018 18:54:11 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181117042305.23949-2-dsugar@tresys.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 11/16/18 11:23 PM, David Sugar wrote: > Signed-off-by: Dave Sugar > --- > policy/modules/system/systemd.if | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if > index 9247924b..74f0b215 100644 > --- a/policy/modules/system/systemd.if > +++ b/policy/modules/system/systemd.if > @@ -467,6 +467,25 @@ interface(`systemd_manage_networkd_units',` > manage_files_pattern($1, systemd_networkd_unit_t, systemd_networkd_unit_t) > ') > > +######################################## > +## > +## Allow specified domain to enable systemd-networkd units > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`systemd_enabledisable_networkd',` > + gen_require(` > + type systemd_networkd_unit_t; > + class service { enable disable }; > + ') > + > + allow $1 systemd_networkd_unit_t:service { enable disable }; > +') > + > ######################################## > ## > ## Allow specified domain to start systemd-networkd units Merged. -- Chris PeBenito