From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 BFDBFC433DB for ; Wed, 23 Dec 2020 22:19:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70CAD22283 for ; Wed, 23 Dec 2020 22:19:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727029AbgLWWTr (ORCPT ); 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/