Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp7056653pxu; Fri, 25 Dec 2020 00:01:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAshwpNlvcRI7Nw+z4rpyXlb6rxATUkbCYObLEB5Ku6PXGsfRTT17QLxI+So1Cwx5uYa4S X-Received: by 2002:a05:6402:404:: with SMTP id q4mr32163575edv.295.1608883314858; Fri, 25 Dec 2020 00:01:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608883314; cv=none; d=google.com; s=arc-20160816; b=p4zBl7szb6SUsHO4msZq+9xjHim5Wb2lKJZYC7WorNk9TrWbIc13nN8HTL1ankvFRu IP0ncc4UjTqnnO24dYob0aKKoIsxiIlC9MoBSeiR52xYVboFXAt5PSNCfSJ11BfVsEyN ThTLosJ3bERcvCbBCP28sweYEk7qkDXhBmD0ycjv7W2zWmEwhnYgoUVP6sli0IAbkdl/ ql85Cjf4HVaBAtkJ8uO6qosNIe9HFGWDKJxpyxCglawgO9PuS2Qs0f2z1dvwA3vXnn1B 6yzDVHfy8O76C5H8CgOjotVVJ0uuBY2hCuz9sJXzrYUqdeaTCdOCPQ+cD0nOm+HCMbRn ydJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature:dkim-filter; bh=CjJIcYAEjJwRDHzdfn3/sLsctPo5jwFvgNI2NjjIghM=; b=BwHJ4SyZOXc4U1p2mFsmahtUDsFAPd9GJHCd5F24bgQtjtv3aksSQpWsXh7kslgVrN NqGPWZ6Zbjtgx6lTAyURadKsQuHp815sDRI34aQasg/YKfd2SrggxgROj9Bj7yViphsq rz3BrSEqTekPLPOTsEa6W0YYUC2+hZVzw8RaA+IYFB4AHh2k3o/AUl75xxz/JGUomppX nMUarnnvsKnFxGEauG+BXrCRDYhjDJFKtxiSF+EdOQWxJeXOhzQWdXVGPghVEfEInBAm EsfezdR6raydMTM5+EgeLL4Kt45SNUNUgR1wVybHZAahjxtTIHa/V6TJj1suadXrgrh0 YTiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@defensec.nl header.s=default header.b=YyvCcFqB; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si17061818edm.386.2020.12.25.00.01.47; Fri, 25 Dec 2020 00:01:54 -0800 (PST) Received-SPF: pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@defensec.nl header.s=default header.b=YyvCcFqB; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728871AbgLYH7d (ORCPT + 18 others); Fri, 25 Dec 2020 02:59:33 -0500 Received: from agnus.defensec.nl ([80.100.19.56]:54700 "EHLO agnus.defensec.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727200AbgLYH7d (ORCPT ); Fri, 25 Dec 2020 02:59:33 -0500 Received: from brutus (brutus.defensec.nl [IPv6:2001:985:d55d::438]) by agnus.defensec.nl (Postfix) with ESMTPSA id 6424A2A0D7E; Fri, 25 Dec 2020 08:58:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 agnus.defensec.nl 6424A2A0D7E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=defensec.nl; s=default; t=1608883131; bh=CjJIcYAEjJwRDHzdfn3/sLsctPo5jwFvgNI2NjjIghM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YyvCcFqBbmzxY4/xoDVDg1peChC04OEjLxDjHdy4G41B/m8rv21yEM1DZI54JN9Uh QnfeVN5ooB0KizpE5/xQcodP9zu3eju6BlWV9NB1VjkTn+rTLNA7JQU2YmyHqHNj0t L6SYQd0Jr/wv509LuDyikQxkfewXDqoEKLqBErHI= From: Dominick Grift To: Russell Coker Cc: selinux-refpolicy@vger.kernel.org Subject: Re: machinectl shell policy References: <8322849.62pqQp6Oog@liv> <1723812.Y751QtlBzf@liv> Date: Fri, 25 Dec 2020 08:58:41 +0100 In-Reply-To: <1723812.Y751QtlBzf@liv> (Russell Coker's message of "Fri, 25 Dec 2020 16:12:24 +1100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org Russell Coker writes: > On Thursday, 24 December 2020 7:37:50 PM AEDT Dominick Grift wrote: >> > To enable "machinectl shell" on recent versions of systemd we need >> > something like the above policy (which is not complete or ideal, still >> > doesn't work so no point polishing it) and something for the below. What >> > is the below about? >> this should be thoroughly addressed. machined creates a login pty that >> gets relabeled on login as per type_change rules. > > Currently it's not being relabeled on Debian, but that's a separate issue. Maybe the required type_change rules arent present? > >> > type=USER_AVC msg=audit(1608759091.934:1799): pid=324 uid=108 >> > auid=4294967295 ses=4294967295 >> > subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc: denied { >> > 0x2 } for msgtype=error >> > error_name=org.freedesktop.DBus.Error.FileNotFound dest=:1.18 spid=2642 >> > tpid=2706 scontext=system_u:system_r:systemd_machined_t:s0 >> > tcontext=bofh:sysadm_r:sysadm_t:s0-s0:c0.c1023 tclass=(null) permissive=0 >> > exe="/usr/bin/dbus-daemon" sauid=108 hostname=? addr=? >> > terminal=?'UID="messagebus" AUID="unset" SAUID="messagebus" >> >> Yes i noticed the above as well on debian with dbus-daemon, i dont see >> any of these on fedora with dbus-broker >> >> By the way we probably shouldnt use the same dbus policy for both >> dbus-daemon and dbus-broker because theyre pretty different. >> >> * dbus-broker does not check method returns (dbus-daemon does) >> * dbus-broker is systemd specific (dbus activation works via systemd) > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892001 > > We have work in progress on dbus-broker in Debian. Would it make sense to > only support dbus-broker in SE Linux policy? Being forced to use only 1 of > the 2 dbus programs (and the newer and faster 1 of the 2) is a very small > trade-off, smaller than some of the other trade-offs for running SE Linux. should probably be able to support both (conditionally) but could get messy -- gpg --locate-keys dominick.grift@defensec.nl Key fingerprint = FCD2 3660 5D6B 9D27 7FC6 E0FF DA7E 521F 10F6 4098 https://sks-keyservers.net/pks/lookup?op=get&search=0xDA7E521F10F64098 Dominick Grift