Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp6122936pxu; Wed, 23 Dec 2020 14:20:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGjeARc/9QNDKhNH4xK1Pm14u9IzRTG53LxYmDlTOWa0kFO2wLgPRQGNs7XwmEmBFPOAb4 X-Received: by 2002:a05:6402:ca1:: with SMTP id cn1mr26654059edb.128.1608762039231; Wed, 23 Dec 2020 14:20:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608762039; cv=none; d=google.com; s=arc-20160816; b=ypRQkgV5Pwjqja4UhPLOppNlVyeDamD9qCS+WmM9yUyoy1KXmTW7EQf8xJWCtfcv/h 1+C2qU6lxyqZ7jZ8EtNBWAeHiPbXu6UxLBtV6jkOkKYrfzBPMgaEqm57FEWUwTGB1LQw T5RAHi1Gy3zz2V7LzmQIcApUI2rPhYoqK7zv4BJeRB49erZVvk2Wu/8mkzwBeEZcILtQ kBlxh0b7wT0DPKppu1ZExKW7iW3NLNm9aAlSzHTjSmUQDgozKrsmdcHZpzjBV6JKMR2w 6SYTSmwX+Tl6fvwn4bogJGTPUIvzvtnRmL0VLqyHgBRYCA3jozUsz/kDHl4xCwvtN2Ud HAww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=7C8p7+R6unmXfmNyQw9QLUwK+Kj712s42hVGF0OGdoc=; b=PrwJ+Hx9VYaZuuj1sk2IiHl3tvFbsg+lN4oCxK9Av3TuYMDIN0z+twPM6L35f/db/w yK+8ZuUA4uzfVQl95A33gAikr+cOFgl6ErYNPnruuOQ91QPQyP/7Dw+lgw6W4aS3dLT8 hlWOiUQM4Nt7JcTx1fg29LPMWK2EVmDbQOeMPawNRvUthNqcW7VxbZd7T8Ys6pASrTkr INAQystq5zg5jEnVQZjzGQlS7vppPw1YYEiVnjrKzCn2NX09r0AFQIeh7NE6yne5R9WU 265ZMQqy1ewHUEC3SE68HOVYiQH1jDoR5MFY2EOZMSyFdSySBV5ixM1KncCYJGmjxMKh N4Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@coker.com.au header.s=2008 header.b=YVEzIUV6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=coker.com.au Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w1si14789847edl.297.2020.12.23.14.20.32; Wed, 23 Dec 2020 14:20:39 -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=@coker.com.au header.s=2008 header.b=YVEzIUV6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=coker.com.au Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727029AbgLWWTr (ORCPT + 18 others); Wed, 23 Dec 2020 17:19:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725811AbgLWWTr (ORCPT ); Wed, 23 Dec 2020 17:19:47 -0500 Received: from smtp.sws.net.au (smtp.sws.net.au [IPv6:2a01:4f8:140:71f5::dada:cafe]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE555C061794 for ; Wed, 23 Dec 2020 14:19:06 -0800 (PST) Received: from liv.coker.com.au (unknown [103.75.204.226]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: russell@coker.com.au) by smtp.sws.net.au (Postfix) with ESMTPSA id 9F1D4F9F2 for ; Thu, 24 Dec 2020 09:18:21 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1608761902; bh=7C8p7+R6unmXfmNyQw9QLUwK+Kj712s42hVGF0OGdoc=; l=1127; h=From:To:Subject:Date:From; b=YVEzIUV6qd5J/2PJrGs3K8DBrLK4HzF33GdSiLhoeFlGTf0BGXHIAU7+G0hvBxfbs C5lPeOCn4Xn7S+8THL1+l5HboSMrKQ4CfbnsaabJLfPIgh00BWXyxqnObvPv/BcjtE YxjIaKl/54XlEeZhI19V7dl3s3l1RLzk+3St6A34= From: Russell Coker To: selinux-refpolicy@vger.kernel.org Subject: machinectl shell policy Date: Thu, 24 Dec 2020 09:18:14 +1100 Message-ID: <8322849.62pqQp6Oog@liv> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org allow sysadm_t systemd_machined_t:dbus send_msg; systemd_manage_userdb_runtime_dirs(systemd_machined_t) systemd_manage_userdb_runtime_sock_files(systemd_machined_t) term_use_ptmx(systemd_machined_t) dev_getattr_fs(systemd_machined_t) term_getattr_pty_fs(systemd_machined_t) 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? 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" -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/