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 AFEF9C4361B for ; Wed, 9 Dec 2020 12:39:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7366223BC7 for ; Wed, 9 Dec 2020 12:39:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731747AbgLIMjN (ORCPT ); Wed, 9 Dec 2020 07:39:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730658AbgLIMjH (ORCPT ); Wed, 9 Dec 2020 07:39:07 -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 23B3AC0613CF for ; Wed, 9 Dec 2020 04:38:27 -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 B33B2EF36 for ; Wed, 9 Dec 2020 23:38:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1607517503; bh=udOHuJBr9mNB6JZb3ZwI8GbHpBmdO+tDBGi9NWC1rD4=; l=1474; h=From:To:Subject:Date:From; b=ODpguTKyG1dehcad6441/Yje2sinRXhS9pFk5aNk7tROho5ivcqDa685eCuPGhZ16 +obmJVvCexGOhuBFVbnVK2ucFqc0E8ihgV0fph2rGqGzEFUFbMIkTL6WY2d9umDxwE a1K3QoxpZ07G91rxBiHIiKqX9KO/RTo9aMBH/wtY= From: Russell Coker To: selinux-refpolicy@vger.kernel.org Subject: udevadm etc Date: Wed, 09 Dec 2020 23:38:17 +1100 Message-ID: <3161997.pUvnUksOUX@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 # ls -l /usr/lib/systemd/systemd-udevd lrwxrwxrwx. 1 root root 12 Dec 3 22:53 /usr/lib/systemd/systemd-udevd -> / bin/udevadm In systemd verision 247.1 (which is in Debian/Unstable now) systemd-udevd is a symlink to udevadm. In systemd version 241 (in Debian/Buster) it's not a symlink. The systemd changelog doesn't mention this change so I don't know exactly when it happened. type_transition init_t udevadm_exec_t:process udevadm_t; type_transition initrc_t udevadm_exec_t:process udevadm_t; type_transition sysadm_t udevadm_exec_t:process udevadm_t; type_transition consolekit_t udev_exec_t:process udev_t; type_transition devicekit_disk_t udev_exec_t:process udev_t; type_transition hald_t udev_exec_t:process udev_t; type_transition hotplug_t udev_exec_t:process udev_t; type_transition init_t udev_exec_t:process udev_t; type_transition initrc_t udev_exec_t:process udev_t; type_transition kernel_t udev_exec_t:process udev_t; type_transition virtd_t udev_exec_t:process udev_t; Above is a list of the relevant type_transition rules from refpolicy taken from git 3 days ago (there don't appear to be any udev changes since then). I think that the only thing to do is to have init_t and initrc_t run udevadm in the udev_t domain. Is it worth having a udevadm_t domain just for running it from sysadm_t or should we have that run as udev_t too? -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/