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=-11.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 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 9D377C43387 for ; Sat, 12 Jan 2019 20:04:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 707BB20836 for ; Sat, 12 Jan 2019 20:04:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="LGkUvd+n" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726537AbfALUEu (ORCPT ); Sat, 12 Jan 2019 15:04:50 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:44843 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbfALUEu (ORCPT ); Sat, 12 Jan 2019 15:04:50 -0500 Received: by mail-qt1-f193.google.com with SMTP id n32so22543550qte.11 for ; Sat, 12 Jan 2019 12:04:49 -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=410srmRRgn0w4hsiQbebdFPUGnoBcgd86wHBNNbOZOM=; b=LGkUvd+nOJWeYIQ3nF4SA6jiF060+3q3MeNFEkMzo3uUY5MCr2DRrvFVaaqplDRGUV FcS9FasuYOaM4QuXa1rPwPXTxgZgXdWUdqECzGjAoMguElm0JnBMhwrjULI/A+JZu6UZ sRD2qhgzboa9tzaoB1SHd0aookDSg6d40e5v4= 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=410srmRRgn0w4hsiQbebdFPUGnoBcgd86wHBNNbOZOM=; b=fOCNjIbD3/wdLYeajsUZEumyJAKiHVjMffLrRsWrvZxN/z6fEEkWCfkdgxDHttyqxP oB1Q2PqdRUC33ZgBW7F+/w3g+b22EIhwXUS1KX5QlsotRuPPZlVA7URfYfr2keMBqBvp BkV8X6cYeWIuOeyJO4hkjvo5fbZ8taByzIAi8WTXmfcsNGg9jsYwemmuJsJOXXG7fUO0 ez4zyeQutwNMhv3jez9NGJhOEbsFyPkgZKuHAUsnsCE2fJyTMLSzDWd8sYZlzLASWBhj xzjtkK4J/q2cYwJzTVTV28Slyg0HLDHLR0CC/krNcodLUU2Kn1nwSrT9SmJz1HBLOSKw a5KA== X-Gm-Message-State: AJcUukeAP0Y0Q54DJwnpbcrK0FOlwc1V1mv0tGcVcCxoKJTNasoqW31/ bgPbBm7jHY4pMuhT0x4xHHthQbmKhaw= X-Google-Smtp-Source: ALg8bN6U1oYL9aC5WU9Mf1+FjwrsIRbwUEa0kUy2E6SdgO/p756ALppZI9h+KRZeuu0jw2SFGTqw9g== X-Received: by 2002:ac8:4405:: with SMTP id j5mr18125242qtn.295.1547323489115; Sat, 12 Jan 2019 12:04:49 -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 x14sm8549513qki.30.2019.01.12.12.04.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 12:04:48 -0800 (PST) Subject: Re: [PATCH] Add interface to start/stop iptables service To: "Sugar, David" , "selinux-refpolicy@vger.kernel.org" References: <20190111153011.27275-1-dsugar@tresys.com> <20190111153011.27275-2-dsugar@tresys.com> From: Chris PeBenito Message-ID: <0852885c-f886-6451-11a6-d91f3b49755b@ieee.org> Date: Sat, 12 Jan 2019 14:32:10 -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: <20190111153011.27275-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 1/11/19 10:30 AM, Sugar, David wrote: > Signed-off-by: Dave Sugar > --- > policy/modules/system/iptables.if | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/policy/modules/system/iptables.if b/policy/modules/system/iptables.if > index 725a6a3d..a36277a6 100644 > --- a/policy/modules/system/iptables.if > +++ b/policy/modules/system/iptables.if > @@ -183,6 +183,25 @@ interface(`iptables_dontaudit_read_pids',` > dontaudit $1 iptables_runtime_t:file read; > ') > > +######################################## > +## > +## Allow specified domain to start and stop iptables service > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`iptables_startstop',` > + gen_require(` > + type iptables_unit_t; > + class service { start stop }; > + ') > + > + allow $1 iptables_unit_t:service { start stop }; > +') > + > ######################################## > ## > ## Allow specified domain to get status of iptables service Merged. -- Chris PeBenito