Received: from smtp.sws.net.au (smtp.sws.net.au [144.76.186.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21F6026FA59 for ; Mon, 4 Aug 2025 14:11:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=144.76.186.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754316671; cv=none; b=fyJav8V4hMR8PkI+NLt+bEDax05pu71OS5lvYMWW0THAvLXCwAX8x6TTYGxnpCkb3/3Kevp8Fy0xnPkhaGx1tnrbZ3XJnxwc+9n24p93miG6hlLipl2pWM9oByeyx7EoLGm39deqeMsEX3GZUKX1nLltr9wzJm18Bgdw+eqGb6E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754316671; c=relaxed/simple; bh=Ura0lV92uRMchXAowMJ0Oww4Sg3VOn3VBXGcqQm1sac=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=YR6C8UOhZeCUYfo70i7mDveP+5z2T8VXhwr7Q03r5GcetNe9d2nG7+jtfI1qtj4s+AqcR1fLVj/QKvuty97O/7H4UsJymHYUHPmyXUgycPOEwKP2xjPFWMp9qnfGPDwB+afvNjTzhvWbwRyNsNXuTd1G7s0G7XHRkOcYVi6rT6k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=coker.com.au; spf=pass smtp.mailfrom=coker.com.au; dkim=pass (1024-bit key) header.d=coker.com.au header.i=@coker.com.au header.b=uOM7IF5p; arc=none smtp.client-ip=144.76.186.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=coker.com.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=coker.com.au Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=coker.com.au header.i=@coker.com.au header.b="uOM7IF5p" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1754316090; bh=EFMUlxThp3PP/oVGPH8il8pAFoc6TuCNmLAbP/lnBOI=; l=1714; h=From:To:Reply-To:Subject:Date:From; b=uOM7IF5p+dnTRLiqe3YhHM19tSN6oFJjbWEgY1QETYkJGOlFnI5cLtLNaqRpwXZ+Z 2/8ZCbd4wjEp5Ic2R1MR+Q76jRt5SBm155hpayZ1Ek78vrjbWOcT2zGag99KnBwxOU +EPVWEtPvvAKwaiDqMLByMpJDsZ/e/z7trnXxj/w= Received: from xev.localnet (n175-33-172-140.sun22.vic.optusnet.com.au [175.33.172.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) (Authenticated sender: russell@coker.com.au) by smtp.sws.net.au (Postfix) with ESMTPSA id 57CBDF10A for ; Tue, 05 Aug 2025 00:01:27 +1000 (AEST) From: Russell Coker To: SELinux Reference Policy mailing list Reply-To: russell@coker.com.au Subject: allow $1_systemd_t $2:process noatsecure; Date: Tue, 05 Aug 2025 00:01:16 +1000 Message-ID: <2104185.QkHrqEjB74@xev> Precedence: bulk X-Mailing-List: selinux-refpolicy@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" https://github.com/SELinuxProject/refpolicy/pull/999 In the above PR I have a template as follows: +###################################### +## +## Allow the specified domain to not have the atsecure setting when started +## as a daemon by the specified systemd user instance +## +## +## +## Prefix for the user domain. +## +## +## +## +## Domain that is entered with noatsecure +## +## +# +template(`systemd_user_daemon_domain_noatsecure',` + gen_require(` + type $1_systemd_t; + ') + + allow $1_systemd_t $2:process noatsecure; +') I have that called from the template dbus_role_template with the following (adjusted for word wrap): + # dbus-broker-launch fails with no media on sd_bus_open_user() + # without this + systemd_user_daemon_domain_noatsecure($1, $1_dbusd_t) So far this has been the only case I've found for needing noatsecure. Pebenito said: > I think this perm should be default for anything that systemd --user is > running, same as with pid1. With the justification of: > Because, as with system units, you can specify environment variables in user > units. I don't object to this, but I'm hesitant to change my PR to include things with this sort of scope that I haven't found a need for. I would like some comments from other members of this list. For reference the below URL has the background to this: https://blog.siphos.be/2011/04/selinux-and-noatsecure-or-why-portage-complains-about-ld_preload-and-libsandbox-so/ -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/