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.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,T_DKIMWL_WL_HIGH,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 CFAE4C43387 for ; Sat, 22 Dec 2018 19:28:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F5D621939 for ; Sat, 22 Dec 2018 19:28:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="eHz4jJMt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732130AbeLVT2h (ORCPT ); Sat, 22 Dec 2018 14:28:37 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:45739 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730700AbeLVT2h (ORCPT ); Sat, 22 Dec 2018 14:28:37 -0500 Received: by mail-qt1-f193.google.com with SMTP id e5so9562042qtr.12 for ; Sat, 22 Dec 2018 11:28:36 -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=jAbjy/cGHiIDX7jPb5x1BPJENWLiuYdrbRjD6YEwQIk=; b=eHz4jJMtwpygbyhadu4QAUDUA+uk2RrSBrBLCYaURS8fWyXlhMiK4aJy/2JSrl5TRy 1I4BC/ydHR8sNT670IluMyM7XgacPa3feY5fIWclR4SzAtBvasg70XyTQo6lYSBKAW3r lUnQh5Y97SOOprIaB+HgWkv1Zs+q/FaEqiFbY= 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=jAbjy/cGHiIDX7jPb5x1BPJENWLiuYdrbRjD6YEwQIk=; b=s9pVE9UdFLjOHs+/xWL/vw7+j3VPF94hilCVg0doGBuem/7x3CstJ6Ue0uggprxCiU fSrrNypuQFGXcX1Zp1zD6q2uBzRnXGntrBUhFcxPpzVZV4LSrapbgDyt0IboFE1VhSXL PLxxxh1fwvhaUFIz+BqURuNzPFOIr/twkehBacYpqWnd0QfLtc0QqVRKLypXlk+URu9s biAyPovmzg39WOJKcrMRa6K0Vf7fA6avMWzTLZ97MqTrGNqcYzVaxDBy5U/l1fweQ+LJ Z7LIl2Dl9iRfuCVWydAa7HqqiD5F+Ejilx42m09HVE0VTXtTEWK/prz5Eh2aquS6+gW8 0Yfw== X-Gm-Message-State: AJcUukftclwkt9DrsWNh+XKwECKnONap6B2RUglvZ94sCkXseaLJDVrC ywrwpl45Djmcqcqa9xZyLn63J/6GmEc= X-Google-Smtp-Source: ALg8bN7FbuZGptS+KfEydMt544gUpU5ayFaMNAihgeywaRSK6PUVHhMFZyQWyZwq3UtX3l0TyJcWew== X-Received: by 2002:ad4:5004:: with SMTP id s4mr6990600qvo.109.1545506915766; Sat, 22 Dec 2018 11:28:35 -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 5sm7832521qkv.93.2018.12.22.11.28.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Dec 2018 11:28:35 -0800 (PST) Subject: Re: [PATCH 1/2] Allow greeter to start dbus and transition To: David Sugar , "selinux-refpolicy@vger.kernel.org" References: <20181221014026.2867-1-dsugar@tresys.com> From: Chris PeBenito Message-ID: Date: Sat, 22 Dec 2018 14:28:15 -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: <20181221014026.2867-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 12/20/18 8:41 PM, David Sugar wrote: > The display manager lightdm (and I think gdm) start a dbus binary. > This allows that to happen in a special dbus domain. > > type=AVC msg=audit(1544626796.378:201): avc: denied { execute } for pid=9973 comm="dbus-launch" name="dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1 > type=AVC msg=audit(1544626796.378:201): avc: denied { read open } for pid=9973 comm="dbus-launch" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1 > type=AVC msg=audit(1544626796.378:201): avc: denied { execute_no_trans } for pid=9973 comm="dbus-launch" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1 > type=AVC msg=audit(1544626796.378:201): avc: denied { map } for pid=9973 comm="dbus-daemon" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1 > type=AVC msg=audit(1544628523.635:3208): avc: denied { execute } for pid=16376 comm="at-spi-bus-laun" name="dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1 > type=AVC msg=audit(1544628523.635:3208): avc: denied { read open } for pid=16376 comm="at-spi-bus-laun" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1 > type=AVC msg=audit(1544628523.635:3208): avc: denied { execute_no_trans } for pid=16376 comm="at-spi-bus-laun" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1 > type=AVC msg=audit(1544628523.635:3208): avc: denied { map } for pid=16376 comm="dbus-daemon" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1 > > Signed-off-by: Dave Sugar > --- > policy/modules/services/xserver.te | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/policy/modules/services/xserver.te b/policy/modules/services/xserver.te > index fa7ce88e..12ad3a87 100644 > --- a/policy/modules/services/xserver.te > +++ b/policy/modules/services/xserver.te > @@ -568,6 +568,7 @@ optional_policy(` > optional_policy(` > dbus_system_bus_client(xdm_t) > dbus_connect_system_bus(xdm_t) > + dbus_role_template(xdm, system_r, xdm_t) > > optional_policy(` > accountsd_dbus_chat(xdm_t) This doesn't sit well with me. XDM isn't a user, or is system_r a user role, so it shouldn't be using this template. On my system, at-spi-bus-launcher is running as part of my user session, not as part of XDM. It seems like this may be a transition problem. -- Chris PeBenito