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, 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 BBE39C43387 for ; Fri, 21 Dec 2018 01:42:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 70D8320874 for ; Fri, 21 Dec 2018 01:42:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=tresys.onmicrosoft.com header.i=@tresys.onmicrosoft.com header.b="EbSVf+We" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388019AbeLUBmK (ORCPT ); Thu, 20 Dec 2018 20:42:10 -0500 Received: from mail-eopbgr780125.outbound.protection.outlook.com ([40.107.78.125]:12764 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387967AbeLUBmK (ORCPT ); Thu, 20 Dec 2018 20:42:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tresys.onmicrosoft.com; s=selector1-tresys-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t6P0Gggg/rxh/hz2UPhyNXozt0eewnQyDh/aftD3+CE=; b=EbSVf+WeeIo1jCmu25y3qzIEbvsv9oXlRygjogNiF8dgKPM43s/buvh288qHkReBEIlTfzWEryIghhA321cjG9kRXBZr4hF96y3bMK2Ni+ALEkWrf5b1uUtOgvBMZSO6fD9W3vdu8jnm08+cmjKs+yQJMeSha1Rtx5MFGPBPggE= Received: from BN6PR15MB1507.namprd15.prod.outlook.com (10.172.151.147) by BN6PR15MB1252.namprd15.prod.outlook.com (10.172.206.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1446.19; Fri, 21 Dec 2018 01:41:25 +0000 Received: from BN6PR15MB1507.namprd15.prod.outlook.com ([fe80::9512:b464:7045:df6d]) by BN6PR15MB1507.namprd15.prod.outlook.com ([fe80::9512:b464:7045:df6d%7]) with mapi id 15.20.1425.025; Fri, 21 Dec 2018 01:41:25 +0000 From: David Sugar To: "selinux-refpolicy@vger.kernel.org" Subject: [PATCH 1/2] Allow greeter to start dbus and transition Thread-Topic: [PATCH 1/2] Allow greeter to start dbus and transition Thread-Index: AQHUmM5Ib5djKL/aZEGmfadkiHrlqQ== Date: Fri, 21 Dec 2018 01:41:25 +0000 Message-ID: <20181221014026.2867-1-dsugar@tresys.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [73.180.141.176] x-clientproxiedby: BN6PR10CA0028.namprd10.prod.outlook.com (2603:10b6:404:109::14) To BN6PR15MB1507.namprd15.prod.outlook.com (2603:10b6:404:c6::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=dsugar@tresys.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BN6PR15MB1252;6:7Wee92Zs0LK5JpOgelKWzaD2p687anRaNueX2zOnGlO1skWur3uKcej/Kb8+2FEg2u2bGsvdhbc9c9qVMdR93iR5eqfawdtNloasoES2qNOWNnEDTvWCtDQBiqyxftxKQ1DFiNyQYBM/py+lrBigxD6y8bmVhmZiyeT4i8DrjiknKbF3MzP5eoa9wy2tpDEQ3yjduEjDLuwbq9NPr+hEqJ71+41zGboScfLTyTXnJDCifCMOIEDi0xZ9M0tMtmYzcVo7EGZuQkznWr4QYhba+WaxefGLeBTeMVJQLYkB095fwrgrTH68bXJ7XBwEBj5oxe86yV6Qsd8Y5uMD9fx4io8kCFgCk3kf6YrXCGrexjsVV569LqBB4eBTCOdpl1T0ULCeQX/KNAOrjjUbRDYMlASw77KE5gccmcktNiG8xvKHJybGPE/OHGzzKmJOqGRJAK4ETtTHwhjEwH6HMt/pLA==;5:MQyZ9K5wC32F3Ey/Q9iSODesdU7CZiAsP0/4EQYh6j9ppEuva0q4Z93XoEPrWP5cqBnfGpkVmyfuKPel7Ibse86+ddgZSuDlDOMkqnSnM69CGXED9eIdsE+Pm6eE6sureNdKgStm5K7nOQ6wSa5mowAuZ4F6WM3xTHKi2X1zmA4=;7:nAPoha5CllnkJFNJr0RtVO0tUdj8lEFfnBX0bTgk13z8MYYmVIqW12qB6vOasIepU51SPWNFRiyeJyK0NdUsm0e3vgxPxUwI2VkaWlZTkVxsn9hNmfVnXKPMeO4B6wNQ8Kl9PzuqigYa3qO9BXh/rQ== x-ms-office365-filtering-correlation-id: e4d22a9c-7827-492e-bb82-08d666e56b01 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BN6PR15MB1252; x-ms-traffictypediagnostic: BN6PR15MB1252: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(3230021)(999002)(5005026)(6040522)(2401047)(8121501046)(3231475)(944501520)(52105112)(93006095)(93001095)(3002001)(10201501046)(149066)(150057)(6041310)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(2016111802025)(6043046)(201708071742011)(7699051)(76991095);SRVR:BN6PR15MB1252;BCL:0;PCL:0;RULEID:;SRVR:BN6PR15MB1252; x-forefront-prvs: 0893636978 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(366004)(376002)(136003)(346002)(39830400003)(199004)(189003)(81156014)(186003)(6506007)(508600001)(386003)(81166006)(52116002)(486006)(14454004)(25786009)(7736002)(256004)(97736004)(68736007)(2501003)(6512007)(8936002)(305945005)(26005)(1076003)(5640700003)(36756003)(102836004)(53936002)(2906002)(66066001)(2351001)(8676002)(99286004)(105586002)(6116002)(3846002)(6436002)(71190400001)(476003)(86362001)(5660300001)(316002)(6916009)(71200400001)(2616005)(6486002)(106356001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR15MB1252;H:BN6PR15MB1507.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: tresys.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: MhVDB8selPWRc87WFwSQphrK4kb06qmIoLF6Yf5QZIez9HYp+f6yQL0QWVp08qKGWBPa94Okzc+HguN8WcH+3MnLhAyZ5R1I/ozHttoc3EUQMTZhDzi3TppzWrTFhBIjhfj6kZRVgGeiNLhpAATMFzs4pmucapL7PpSG5AmW2uftrnMVVEXM7JLJ/5Gsx911fgvKfhN8Q4JCgaxNcAbJ+m1XBeN+1+dsMSGLuyiEsootYxtgQd7W+ryVFpJy8shMqhK9371G1C7NCYoG+X8yALF4YZpJ5Vw320fLGlgkU+SbXAiMG8I4hV2ktvRwOlTf spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: tresys.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4d22a9c-7827-492e-bb82-08d666e56b01 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Dec 2018 01:41:25.2797 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a0d45667-6c07-4e88-868f-4ac9af95c7ed X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR15MB1252 Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org The display manager lightdm (and I think gdm) start a dbus binary. This allows that to happen in a special dbus domain. 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=3D669= 5040 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(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 tcontext= =3Dsystem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive=3D1 type=3DAVC msg=3Daudit(1544626796.378:201): avc: denied { execute_no_tran= s } 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 { 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=3Dsys= tem_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=3Dsys= tem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive=3D1 type=3DAVC msg=3Daudit(1544628523.635:3208): avc: denied { read open } fo= r 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 t= context=3Dsystem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive=3D1 type=3DAVC msg=3Daudit(1544628523.635:3208): avc: denied { execute_no_tra= ns } 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.c1= 023 tcontext=3Dsystem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive= =3D1 type=3DAVC msg=3Daudit(1544628523.635:3208): avc: denied { map } for pid= =3D16376 comm=3D"dbus-daemon" path=3D"/usr/bin/dbus-daemon" dev=3D"dm-1" in= o=3D6695040 scontext=3Dsystem_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=3Dsy= stem_u:object_r:dbusd_exec_t:s0 tclass=3Dfile permissive=3D1 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/x= server.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) =20 optional_policy(` accountsd_dbus_chat(xdm_t) --=20 2.19.2