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.1 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 3BBE5C43381 for ; Sun, 24 Mar 2019 18:43:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E68792147C for ; Sun, 24 Mar 2019 18:43:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="BS5EVPNH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726317AbfCXSn5 (ORCPT ); Sun, 24 Mar 2019 14:43:57 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:34854 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbfCXSn5 (ORCPT ); Sun, 24 Mar 2019 14:43:57 -0400 Received: by mail-qk1-f193.google.com with SMTP id z13so4085355qki.2 for ; Sun, 24 Mar 2019 11:43:56 -0700 (PDT) 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=qDaMEzSpxNrO3ch1fPee0YC9fhd6TM9yR46UfTm0y4w=; b=BS5EVPNHJjriW6PBfmsJaTS3hKzc1bRhjR4cDKMe9F2yeB+7WFlJ4wBS1Dquy9HEbB shIjoFKu8y6ujZ1eJ4eONUIPIxFxlxz81tvizV5ySBDrmgUa4fz3egx9pP/q/m5TK/hF YEtcywWVOQRVw2MfxWZAE9tl5fN4wSBAGdObo= 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=qDaMEzSpxNrO3ch1fPee0YC9fhd6TM9yR46UfTm0y4w=; b=uNpyAD9rf1h+6JsFHi4mMstn7weorkDRkQ4zff/qPSZAnG8JUsbSVvfNIODY30F3/A O0IJSpdk32Cbuu5gQvQUdZ/ofmCuU3cLnKJdiFVubE+xtXcmtoTBNYTkh+LdxYWW4jtZ 146VsZp1gCJR46qYLAyFynSFlhZm0PBxsHMt4ZMTI6kGOP/EWHEyl9luM8Q7FS+zm2oo E4rYMH/h7BiVqfIYQJUZN+r054Qh+sTrFGYyOJNT5CqmK+0iN6KZDFTyIvxX0VMKA/6k NOyQ1dA3Gv6Pih2Bmza5nU9t4JIYIwNfDN+YGI2iswUVek5HRC1eq2dgXF3J4TyMufSj t2nA== X-Gm-Message-State: APjAAAWM9qffMLpW/j1Jv6agwrBK3TSaIzCyhDl0E70GqNUu2Jou4A3F 3fsW/vjGDvNQypShEa6tTBbFPJX3nIA= X-Google-Smtp-Source: APXvYqxKT13Ctb4V1HZeI9fsG5rTwx1c15JtUji+Aeiv6w783mp9NXR7/JVwdgGXtZIEOaLm/bhq9g== X-Received: by 2002:a37:654e:: with SMTP id z75mr16542910qkb.314.1553453035795; Sun, 24 Mar 2019 11:43:55 -0700 (PDT) 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 n201sm7619742qka.10.2019.03.24.11.43.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Mar 2019 11:43:55 -0700 (PDT) Subject: Re: [PATCH 1/4] Add interface ntp_dbus_chat To: "Sugar, David" , "selinux-refpolicy@vger.kernel.org" References: <20190320002012.21220-1-dsugar@tresys.com> <20190320002012.21220-2-dsugar@tresys.com> From: Chris PeBenito Message-ID: Date: Sun, 24 Mar 2019 14:36:11 -0400 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: <20190320002012.21220-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 3/19/19 8:20 PM, Sugar, David wrote: > type=USER_AVC msg=audit(1553013821.622:9900): pid=7377 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc: denied { send_msg } for msgtype=method_call interface=org.freedesktop.timedate1 member=SetTimezone dest=org.freedesktop.timedate1 spid=16280 tpid=16281 scontext=sysadm_u:sysadm_r:settings_t:s0-s0:c0.c1023 tcontext=system_u:system_r:ntpd_t:s0 tclass=dbus exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?' > type=USER_AVC msg=audit(1553013821.625:9911): pid=7377 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc: denied { send_msg } for msgtype=method_return dest=:1.258 spid=16281 tpid=16280 scontext=system_u:system_r:ntpd_t:s0 tcontext=sysadm_u:sysadm_r:settings_t:s0-s0:c0.c1023 tclass=dbus exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?' > > Signed-off-by: Dave Sugar > --- > policy/modules/services/ntp.if | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/policy/modules/services/ntp.if b/policy/modules/services/ntp.if > index f1a90c55..7fa20c8d 100644 > --- a/policy/modules/services/ntp.if > +++ b/policy/modules/services/ntp.if > @@ -79,6 +79,27 @@ interface(`ntp_run',` > roleattribute $2 ntpd_roles; > ') > > +######################################## > +## > +## Send and receive messages from > +## ntpd over dbus. > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`ntp_dbus_chat',` > + gen_require(` > + type ntpd_t; > + class dbus send_msg; > + ') > + > + allow $1 ntpd_t:dbus send_msg; > + allow ntpd_t $1:dbus send_msg; > +') > + > ######################################## > ## > ## Execute ntpdate server in the ntpd domain. Merged. -- Chris PeBenito