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=-9.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT 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 0C977C10F03 for ; Wed, 20 Mar 2019 00:20:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D054620828 for ; Wed, 20 Mar 2019 00:20:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=tresys.onmicrosoft.com header.i=@tresys.onmicrosoft.com header.b="G5BIixzP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727434AbfCTAUi (ORCPT ); Tue, 19 Mar 2019 20:20:38 -0400 Received: from mail-eopbgr770110.outbound.protection.outlook.com ([40.107.77.110]:53831 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727429AbfCTAUi (ORCPT ); Tue, 19 Mar 2019 20:20:38 -0400 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=7u4K7d47tIHKXThzqOr+ee1OyYRdH1Sg6q7xFRGKke4=; b=G5BIixzPogmjTYOluts0Shn5ZFmnyOQUNG2TWBaehIFMXg0Gnom+orJUG3dxZjg44pTfMn+IZDjhLznXe6fxRg6yzJQXrv90epSH5g6cYrg9R89FIVJQFrjLVoeH+F32rZBdrDAV8a0b33EwH0CHjr9oB3kJYtQPvsvluhd78Ck= Received: from BN6PR15MB1507.namprd15.prod.outlook.com (10.172.151.147) by BN6PR15MB1156.namprd15.prod.outlook.com (10.172.205.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Wed, 20 Mar 2019 00:20:35 +0000 Received: from BN6PR15MB1507.namprd15.prod.outlook.com ([fe80::ec41:1dc7:5fd4:a07a]) by BN6PR15MB1507.namprd15.prod.outlook.com ([fe80::ec41:1dc7:5fd4:a07a%8]) with mapi id 15.20.1709.015; Wed, 20 Mar 2019 00:20:35 +0000 From: "Sugar, David" To: "selinux-refpolicy@vger.kernel.org" Subject: [PATCH 2/4] Allow ntpd to update chronyd service Thread-Topic: [PATCH 2/4] Allow ntpd to update chronyd service Thread-Index: AQHU3rK8B7KJYQQc3UCruKFOg8WFiw== Date: Wed, 20 Mar 2019 00:20:34 +0000 Message-ID: <20190320002012.21220-3-dsugar@tresys.com> References: <20190320002012.21220-1-dsugar@tresys.com> In-Reply-To: <20190320002012.21220-1-dsugar@tresys.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [2601:154:c201:cca:6e88:14ff:fed4:292c] x-clientproxiedby: BL0PR03CA0002.namprd03.prod.outlook.com (2603:10b6:208:2d::15) 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-mailer: git-send-email 2.20.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8ae94234-a3a8-4ddd-6d4c-08d6acc9de58 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:BN6PR15MB1156; x-ms-traffictypediagnostic: BN6PR15MB1156: x-microsoft-antispam-prvs: x-forefront-prvs: 098291215C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(136003)(376002)(39840400004)(346002)(396003)(199004)(189003)(486006)(46003)(446003)(508600001)(305945005)(102836004)(6506007)(76176011)(6916009)(106356001)(386003)(105586002)(7736002)(99286004)(52116002)(2616005)(476003)(11346002)(186003)(2501003)(2906002)(36756003)(14454004)(6512007)(6486002)(53936002)(81156014)(5640700003)(97736004)(86362001)(81166006)(316002)(6436002)(6116002)(1076003)(50226002)(5660300002)(68736007)(2351001)(256004)(25786009)(71190400001)(71200400001)(8936002)(8676002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR15MB1156;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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: WL9gT7qJvuXNk9kfvZf1APfFW3fiZjYj5XZFU7EhPjYPjKmLlIuf+yfFzVASX+Bi5yzVQu1HyAy5K6B+mcCY5DAgthOg9qs/i5WGphdt3QOtsVceC7Hy6nZc0exuNY9boFCwr+ALgPukYS/grMOH11s2M21mRVa+nC8lfLRixTaubbbT5ZNf1omate9w+FKxStqHO/5fzzmq1eT4ll9+gFG/3VTT2PwZoPXiA8xn6oCOeVi7H+Kjh5KukU3lGUgnC+Ao+828LBPZP7cevQV8hBBf4/UPR1Whf5glfQg7ofWM6WCNrrPFieMllz3D8AQPc6pu7soDhWuHTE7iDJtrumn1kLXgKBkQgaSOv99g/gSuN02Y96NMZppfrP0rqNMnNjZNS5R7s95As17DB1fpG+7iXRjph4LY4QG6HPEzoB8= 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: 8ae94234-a3a8-4ddd-6d4c-08d6acc9de58 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2019 00:20:34.2969 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a0d45667-6c07-4e88-868f-4ac9af95c7ed X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR15MB1156 Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org type=3DUSER_AVC msg=3Daudit(1553013917.361:9938): pid=3D1 uid=3D0 auid=3D42= 94967295 ses=3D4294967295 subj=3Dsystem_u:system_r:init_t:s0 msg=3D'avc: d= enied { disable } for auid=3Dn/a uid=3D0 gid=3D0 path=3D"/usr/lib/systemd/= system/chronyd.service" cmdline=3D"/usr/lib/systemd/systemd-timedated" scon= text=3Dsystem_u:system_r:ntpd_t:s0 tcontext=3Dsystem_u:object_r:chronyd_uni= t_t:s0 tclass=3Dservice exe=3D"/usr/lib/systemd/systemd" sauid=3D0 hostnam= e=3D? addr=3D? terminal=3D? type=3DUSER_AVC msg=3Daudit(1553013917.406:9943): pid=3D1 uid=3D0 auid=3D42= 94967295 ses=3D4294967295 subj=3Dsystem_u:system_r:init_t:s0 msg=3D'avc: d= enied { stop } for auid=3Dn/a uid=3D0 gid=3D0 path=3D"/usr/lib/systemd/sys= tem/chronyd.service" cmdline=3D"/usr/lib/systemd/systemd-timedated" scontex= t=3Dsystem_u:system_r:ntpd_t:s0 tcontext=3Dsystem_u:object_r:chronyd_unit_t= :s0 tclass=3Dservice exe=3D"/usr/lib/systemd/systemd" sauid=3D0 hostname= =3D? addr=3D? terminal=3D?' type=3DUSER_AVC msg=3Daudit(1553021100.061:9970): pid=3D1 uid=3D0 auid=3D42= 94967295 ses=3D4294967295 subj=3Dsystem_u:system_r:init_t:s0 msg=3D'avc: d= enied { enable } for auid=3Dn/a uid=3D0 gid=3D0 path=3D"/usr/lib/systemd/s= ystem/chronyd.service" cmdline=3D"/usr/lib/systemd/systemd-timedated" scont= ext=3Dsystem_u:system_r:ntpd_t:s0 tcontext=3Dsystem_u:object_r:chronyd_unit= _t:s0 tclass=3Dservice exe=3D"/usr/lib/systemd/systemd" sauid=3D0 hostname= =3D? addr=3D? terminal=3D?' type=3DUSER_AVC msg=3Daudit(1553021100.104:9973): pid=3D1 uid=3D0 auid=3D42= 94967295 ses=3D4294967295 subj=3Dsystem_u:system_r:init_t:s0 msg=3D'avc: d= enied { start } for auid=3Dn/a uid=3D0 gid=3D0 path=3D"/usr/lib/systemd/sy= stem/chronyd.service" cmdline=3D"/usr/lib/systemd/systemd-timedated" sconte= xt=3Dsystem_u:system_r:ntpd_t:s0 tcontext=3Dsystem_u:object_r:chronyd_unit_= t:s0 tclass=3Dservice exe=3D"/usr/lib/systemd/systemd" sauid=3D0 hostname= =3D? addr=3D? terminal=3D?' Signed-off-by: Dave Sugar --- policy/modules/services/ntp.te | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/policy/modules/services/ntp.te b/policy/modules/services/ntp.t= e index dc953784..d882fc59 100644 --- a/policy/modules/services/ntp.te +++ b/policy/modules/services/ntp.te @@ -153,6 +153,11 @@ ifdef(`init_systemd',` # for /run/systemd/netif/links systemd_list_networkd_runtime(ntpd_t) =20 + optional_policy(` + chronyd_enabledisable(ntpd_t) + chronyd_startstop(ntpd_t) + ') + optional_policy(` unconfined_dbus_send(ntpd_t) ') --=20 2.20.1