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=-8.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 C3C59C43441 for ; Sat, 10 Nov 2018 00:43:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B7DA204FD for ; Sat, 10 Nov 2018 00:43:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="b9OyPmcU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B7DA204FD 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 S1728188AbeKJK0F (ORCPT ); Sat, 10 Nov 2018 05:26:05 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:38465 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727730AbeKJK0F (ORCPT ); Sat, 10 Nov 2018 05:26:05 -0500 Received: by mail-qk1-f196.google.com with SMTP id d19so4841122qkg.5 for ; Fri, 09 Nov 2018 16:43:00 -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=9dchG9JMCCv/yaQ2UFJIXWDIYztqRE6JTAIRdRNXzWo=; b=b9OyPmcUrMx/1EUXoREOjRDvCVmnC0/nHRe9o6/+KOj+pV2SYC9HpIrzt5KqRGRoXa iZiE4HWzej1BMRSIw1uZywgVsRLnMTPTzaG/aAsyDwKqEYuZUL1GCror5FtOblg+Vv6x ojR67rMNQh/K2cmr0MHDz1p+VhPCqu09hJEFE= 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=9dchG9JMCCv/yaQ2UFJIXWDIYztqRE6JTAIRdRNXzWo=; b=DosowCK0UOagEIdQzfd7eJayPPybQDXNKLuAe//jSzadhORTgdYvqRyd4WZ/iC1wZe RZ4NQApyZ4iOPuhLte0dUEiliTCRS1UHpQsald+IX4AMcGSY5kpfM26OvXOgniiE87K1 8RP8Y8w56qAbVNO1UT4bwxB7ojxVzLiB41TqUniBfhVaW7wc8Hxz2Jk4vk1iae5tHCRi QHQZspf/wl6AkoFBf38tkgOiwAsqfN0pF3qO/6U2b4NCUv/H07n4jloSGabOg+FLtKjG FKVQg6qhfOEU66hR63Os8iEwe/WmGXyCn6JUPbS6H6+3J3i7pITd1Aq0wzJM7YT2ruzK I1BA== X-Gm-Message-State: AGRZ1gKFABXnVBT5diClrnqqIVWNlLyQZr4DUAXMtwglpdyNZSZKYFqG w57xn3yT8bAYHwW5ylHfNnV22gJLlVWcZD9k X-Google-Smtp-Source: AJdET5f1uvkEIjXjQKfsGXOi5BoawGfzu+DvcYL4QJC52aMN4CJ5OsWzsHOCfghjmj5nYSUxclRawg== X-Received: by 2002:a0c:b24f:: with SMTP id k15mr11150406qve.72.1541810579984; Fri, 09 Nov 2018 16:42:59 -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 h67-v6sm4637332qkf.32.2018.11.09.16.42.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Nov 2018 16:42:59 -0800 (PST) Subject: Re: [PATCH 3/3] Add interfaces to control clamav_unit_t systemd services To: David Sugar , "selinux-refpolicy@vger.kernel.org" References: <20181102004022.22927-1-dsugar@tresys.com> From: Chris PeBenito Message-ID: <689d7a56-72e9-87ac-4f70-8e5949fbfbbc@ieee.org> Date: Fri, 9 Nov 2018 19:06:51 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181102004022.22927-1-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/01/2018 08:40 PM, David Sugar wrote: > Signed-off-by: Dave Sugar > --- > policy/modules/services/clamav.if | 76 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 76 insertions(+) > > diff --git a/policy/modules/services/clamav.if b/policy/modules/services/clamav.if > index d1296fcc..2adb1230 100644 > --- a/policy/modules/services/clamav.if > +++ b/policy/modules/services/clamav.if > @@ -223,6 +223,82 @@ interface(`clamav_scannable_files',` > typeattribute $1 clam_scannable_type; > ') > > +######################################## > +## > +## Allow specified domain to enable clamd units > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`clamav_enabledisable_clamd',` > + gen_require(` > + type clamav_unit_t; > + class service { enable disable }; > + ') > + > + allow $1 clamav_unit_t:service { enable disable }; > +') > + > +######################################## > +## > +## Allow specified domain to start clamd units > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`clamav_startstop_clamd',` > + gen_require(` > + type clamd_unit_t; > + class service { start stop }; > + ') > + > + allow $1 clamd_unit_t:service { start stop }; > +') > + > +######################################## > +## > +## Allow specified domain to get status of clamd > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`clamav_status_clamd',` > + gen_require(` > + type clamd_unit_t; > + class service status; > + ') > + > + allow $1 clamd_unit_t:service status; > +') > + > +######################################## > +## > +## Allow specified domain reload of clamd > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`clamav_reload_clamd',` > + gen_require(` > + type clamd_unit_t; > + class service reload; > + ') > + > + allow $1 clamd_unit_t:service reload; > +') Merged. -- Chris PeBenito