Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4384385pxu; Wed, 9 Dec 2020 16:08:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEp6oRxve/rp3xWDbi9aRKG8X6DiWMslspVGAtlJ+yAMlCPAS9OFqwmKdmDzKPBaLJa/X3 X-Received: by 2002:aa7:cb0e:: with SMTP id s14mr4336938edt.122.1607558881829; Wed, 09 Dec 2020 16:08:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607558881; cv=none; d=google.com; s=arc-20160816; b=b/CTLufueUGtV91IzmWyE/MZgDpawW45yAAgfSHz5e4jJerOEXozlclZFYNa5ZqsIm wd+BxomTwY8sUUaxQfg8HJRtW10SVrPsbOkBn9oS0Efxv3GYR3FhcLXMoldRT5hoPId9 VDILkNqBMeTR5VAfuJRqfbVnM3Gk3AhB5GjOOJl9mzyj/h4J6yf9mv7q5H6CAV85Lg64 TCNY/bY/LCDg98rNvwnTT/Ko86WUuLBhUq3ni3eoxLyzV8uaKx/dbTebfMU3nnlpaVoy xfvyqFPgLGS5T9u64qNMJbbsBLP/Xx9tNfrpUPKtxPf2bDZ7/J1/AGNqHMlLhvHAhpFW vhyw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uQvsC97wc4gtsaa9SVR/djh3Uz7flSdj6CUaDLwHoRU=; b=W/lIC2iVhtKzo4X9WqM6DrQGRASixtuUC2Z/QcJEK4DV39ooCVdL7s2XUlJ/ZsgMdH ItDvnsoiFSh2o9jnLB4jAYmyPQB8xY0PxSE3dCMCJoeEEO3A3R6rQHzzstQGU4dK+tY1 8RMUNzyep6i2v0zmCKHBMESJByIjsu6dPmega1mQs/FPP7mEF/Wt5Jq91rdVduS46TtU fa5Y/GzX6KshHzh+bIxHDyYj9k7JGlO1egikw5WkzZFvCxHkk+KmEZaPxBW+AxbepoNH HR8akNDJPDrdzR59MCDaRKYu7YH1upAlqqniHF/gj1MegpNlM7J3KcwvgFXv5hsoLWp0 kzbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@coker.com.au header.s=2008 header.b="RGWmk/ml"; 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 h18si1826987eds.65.2020.12.09.16.07.55; Wed, 09 Dec 2020 16:08:01 -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="RGWmk/ml"; 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 S1726627AbgLJADe (ORCPT + 16 others); Wed, 9 Dec 2020 19:03:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725914AbgLJADe (ORCPT ); Wed, 9 Dec 2020 19:03:34 -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 3F6B2C0613CF for ; Wed, 9 Dec 2020 16:02:54 -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 F01C2FE3A; Thu, 10 Dec 2020 11:02:48 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1607558570; bh=uQvsC97wc4gtsaa9SVR/djh3Uz7flSdj6CUaDLwHoRU=; l=2112; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RGWmk/mlRqx0XVruT/e+2G6ZFJmjpkMM4cxZzMrOojhwsfOaCzFRHwVPI53ogit9g ysKX44hJrDmkkpZgMykJ1LiMWjCbMGq3Dm0xBjkQOTYaMPVKJiPsaC2kji7SmrVL68 VYAvEM2GpQGbJ4QrAX86Ngn72ANQwIPFT4GI+i8o= From: Russell Coker To: Chris PeBenito Cc: selinux-refpolicy@vger.kernel.org Subject: Re: udevadm etc Date: Thu, 10 Dec 2020 11:02:44 +1100 Message-ID: <5107170.hMIqiVgsFT@liv> In-Reply-To: References: <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 On Thursday, 10 December 2020 9:00:38 AM AEDT Chris PeBenito wrote: > On 12/9/20 7:38 AM, Russell Coker wrote: > > 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? > > The udevadm_t domain is much smaller than udev_t, and critically doesn't > have all the device access udev_t has. Systemd merging the binaries into > one doesn't necessarily mean the policy has to merge too. Currently only 3 domains can transition to udevadm_t. 2 of those 3 also transition to udev_t so they can't use udevadm_t without code changes. The only remaining domain is sysadm_t. The question is not "do we have to merge the policy because systemd merges binaries" but "should we have a separate domain only used for sysadm_t"? -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/