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=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 A5D8CC43387 for ; Sun, 23 Dec 2018 16:45:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5AF08217D9 for ; Sun, 23 Dec 2018 16:45:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OlKymLul" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725845AbeLWQpS (ORCPT ); Sun, 23 Dec 2018 11:45:18 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:46235 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbeLWQpS (ORCPT ); Sun, 23 Dec 2018 11:45:18 -0500 Received: by mail-ed1-f65.google.com with SMTP id o10so8564274edt.13 for ; Sun, 23 Dec 2018 08:45:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Dxr+udGajEvPExRQoaWTGhGziRmyPeaZMdhqMgzRP2E=; b=OlKymLulRl1dK7u/1avtDQzN5kzXWpTwQQY+ecIDEN/VGPubPAeGGvsDOrEiQb8ozp DgdsroGwjCdxpVD77ZFWdZH5SC2nvm36yRkSNDWVWg2GpjMbNM/b9wdZwJ3dpOIDnfXy iR3PkOu5/8bqL88GJXCMMW21ul7qKl5Uqw/Suz3/Ir5geQRS+HYkazQYugRrEDexOj+K A06wjtb1Ex5slSJbxP8SPzlswnoiWWAB4N7zHkWlsLHCuSXEvvRhZ2OmyIiSmyO0iLtO QCSvzvXejVFsqf1a0XAt1xoA+7eU+bM2iTHtMlhuh2NXiIRX/pYR+qW1p2cWySVBS0YN TaTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Dxr+udGajEvPExRQoaWTGhGziRmyPeaZMdhqMgzRP2E=; b=J6Y3o5JWwKqRiAkPbfal6r7PbVWaq4oF9mrZBXAHp7hzpohuAAW+vwhI5Me10whdmm 4EFUacvdccQgw82ymreu1tuqR2GBCzFxCnW4xf95GsCNK9rTkyRYTzej1uVqHJMC8WUP 44xXCJk/9UhNg7LReAZ8sN4YYUoH0xBHW12rXJob93EViKoJdBdL/mtc5uUEedS4aTTA m9vfjhckDO83LOt/ZaZg2etmHgGOX17Fjdf3vloB6GQLGpqtxxLFk/7iw0y6szRhPiU1 wXJCi1UqOrrKHdzCdLX814CGAZj67y2cpOH5n+0nMZbt5ukpNXKdLvL6UhGgpE3+E2QQ Z3Lw== X-Gm-Message-State: AA+aEWZQfsu0jijYDzklGefQKNzOi/a/AHBNA6D3NuRcSKkXAs2h6lI8 1O70s7IVL+7aSYIhjTCbJoCELGvs X-Google-Smtp-Source: AFSGD/Vj+M5H6S+ZbCnAgZ/qNets+Rg6XN8CI/O+PFShpUwytwaz6M3XB0KZdMr5xXFE5iLopTHjFA== X-Received: by 2002:a17:906:b243:: with SMTP id ce3-v6mr6872256ejb.87.1545583514663; Sun, 23 Dec 2018 08:45:14 -0800 (PST) Received: from brutus.lan ([2001:985:d55d::438]) by smtp.gmail.com with ESMTPSA id k24-v6sm4331192eja.60.2018.12.23.08.45.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Dec 2018 08:45:14 -0800 (PST) Date: Sun, 23 Dec 2018 17:45:12 +0100 From: Dominick Grift To: Chris PeBenito , David Sugar , "selinux-refpolicy@vger.kernel.org" Subject: Re: [PATCH 1/2] Allow greeter to start dbus and transition Message-ID: <20181223164512.GG20992@brutus.lan> Mail-Followup-To: Chris PeBenito , David Sugar , "selinux-refpolicy@vger.kernel.org" References: <20181221014026.2867-1-dsugar@tresys.com> <20181223163359.GF20992@brutus.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VACxsDaSTfeluoxK" Content-Disposition: inline In-Reply-To: <20181223163359.GF20992@brutus.lan> User-Agent: Every email client sucks, this one just sucks less. X-PGP-Key: https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org --VACxsDaSTfeluoxK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 23, 2018 at 05:33:59PM +0100, Dominick Grift wrote: > On Sat, Dec 22, 2018 at 02:28:15PM -0500, Chris PeBenito wrote: > > 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. > > >=20 > > > type=3DAVC msg=3Daudit(1544626796.378:201): avc: denied { execute }= for pid=3D9973 comm=3D"dbus-launch" name=3D"dbus-daemon" dev=3D"dm-1" ino= =3D6695040 scontext=3Dsystem_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=3Dsys= tem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive=3D1 > > > type=3DAVC msg=3Daudit(1544626796.378:201): avc: denied { read open= } for pid=3D9973 comm=3D"dbus-launch" path=3D"/usr/bin/dbus-daemon" dev= =3D"dm-1" ino=3D6695040 scontext=3Dsystem_u:system_r:xdm_t:s0-s0:c0.c1023 t= context=3Dsystem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive=3D1 > > > type=3DAVC msg=3Daudit(1544626796.378:201): avc: denied { execute_n= o_trans } for pid=3D9973 comm=3D"dbus-launch" path=3D"/usr/bin/dbus-daemon= " dev=3D"dm-1" ino=3D6695040 scontext=3Dsystem_u:system_r:xdm_t:s0-s0:c0.c1= 023 tcontext=3Dsystem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive= =3D1 > > > type=3DAVC msg=3Daudit(1544626796.378:201): avc: denied { map } for= pid=3D9973 comm=3D"dbus-daemon" path=3D"/usr/bin/dbus-daemon" dev=3D"dm-1= " ino=3D6695040 scontext=3Dsystem_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext= =3Dsystem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive=3D1 > > > type=3DAVC msg=3Daudit(1544628523.635:3208): avc: denied { execute = } for pid=3D16376 comm=3D"at-spi-bus-laun" name=3D"dbus-daemon" dev=3D"dm-= 1" ino=3D6695040 scontext=3Dsystem_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext= =3Dsystem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive=3D1 > > > type=3DAVC msg=3Daudit(1544628523.635:3208): avc: denied { read ope= n } for pid=3D16376 comm=3D"at-spi-bus-laun" path=3D"/usr/bin/dbus-daemon"= dev=3D"dm-1" ino=3D6695040 scontext=3Dsystem_u:system_r:xdm_t:s0-s0:c0.c10= 23 tcontext=3Dsystem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive=3D1 > > > type=3DAVC msg=3Daudit(1544628523.635:3208): avc: denied { execute_= no_trans } for pid=3D16376 comm=3D"at-spi-bus-laun" path=3D"/usr/bin/dbus-= daemon" dev=3D"dm-1" ino=3D6695040 scontext=3Dsystem_u:system_r:xdm_t:s0-s0= :c0.c1023 tcontext=3Dsystem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permis= sive=3D1 > > > type=3DAVC msg=3Daudit(1544628523.635:3208): avc: denied { map } fo= r pid=3D16376 comm=3D"dbus-daemon" path=3D"/usr/bin/dbus-daemon" dev=3D"dm= -1" ino=3D6695040 scontext=3Dsystem_u:system_r:xdm_t:s0-s0:c0.c1023 tcontex= t=3Dsystem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive=3D1 > > >=20 > > > Signed-off-by: Dave Sugar > > > --- > > > policy/modules/services/xserver.te | 1 + > > > 1 file changed, 1 insertion(+) > > >=20 > > > diff --git a/policy/modules/services/xserver.te b/policy/modules/serv= ices/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) > >=20 > > 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. >=20 > It does not sit well with me either but gdm is actually a "user" in way's= =2E and it has a session. >=20 > the gdm DM policy should never have been merged with XDM DM policy as XDM= is much cleaner. >=20 > GDM is nasty In dssp2 i actually have a seuser for gdm: # seinfo -xugdm.id Users: 1 user gdm.id roles sys.role level s0 range s0; And believe me, I did not do that for fun. In distributions with systemd --= user this is just needed because systemd will spawn a --user instance for gdm and this user instance spawns = all kinds of processes on gdm's behalf for example dbus instance, the last thing you want is to have a gdm dbus in= stance running with system_dbusd_t >=20 > >=20 > > --=20 > > Chris PeBenito >=20 > --=20 > Key fingerprint =3D 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 > https://sks-keyservers.net/pks/lookup?op=3Dget&search=3D0x3B6C5F1D2C7B6B02 > Dominick Grift --=20 Key fingerprint =3D 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=3Dget&search=3D0x3B6C5F1D2C7B6B02 Dominick Grift --VACxsDaSTfeluoxK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCAAdFiEEujmXliIBLFTc2Y4AJXSOVTf5R2kFAlwfu5QACgkQJXSOVTf5 R2m9GQv/YZCSdZ21/GZ9H79o1m0JcOW4ruGbeP7pW1QavxgLaSYz9z1GNU7WSRFQ 43uZwLGIB6PRz+Xmjgkg42MMeT1SuJzdPz6cDPGh0WG+7lyr2wFJO9R7KVjQLC9F sK30tJ2H8HIRwYwJ3eHvNIL30v61P6EL/SqYmJzqUBW4gx+RLyehpjEMhVra9i+H QKgwTh3NrUhlw0qiOur3HGXQfbBMB9HJZzlZaO5QoiNBplOWpD7g3k0EQcX4/e0L bggFLrN0XJ4h53tmWmxHNtzMJ/rbYwxjJRjXKAR54kgUeFViFk5CopLtpJgqKY9b wvQq/q7WmOoh66qBCTeZVATGR8usq95ySg6q0asF6Tsktm1cfixCoeIadSFMxFRk VcaOKwKWsTRCg6NZCx5/b62MUbhNfG25OtBpwNKoHHzx54aCzyRKBxZA4XyHLu0X m/WCGAlBtKrjgEFcd6W74w1kriBAGli8J5fCGi/P6ENUMrF6ScowVxNc+O1wSe6d y5ttSi4b =VJtb -----END PGP SIGNATURE----- --VACxsDaSTfeluoxK--