From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3E9041382C5 for ; Mon, 1 Feb 2021 02:10:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8F764E09C2; Mon, 1 Feb 2021 02:10:14 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6918EE09C1 for ; Mon, 1 Feb 2021 02:10:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 80F213410AD for ; Mon, 1 Feb 2021 02:10:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1A1E14C3 for ; Mon, 1 Feb 2021 02:10:10 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1612142502.82dbbae293b2fe9a7a5f85590ea17dc1916ee529.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/, policy/modules/apps/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/apps/gpg.te policy/modules/system/userdomain.if X-VCS-Directories: policy/modules/apps/ policy/modules/system/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 82dbbae293b2fe9a7a5f85590ea17dc1916ee529 X-VCS-Branch: master Date: Mon, 1 Feb 2021 02:10:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 269e8201-b6e3-4b58-9e23-86ccf25e39bb X-Archives-Hash: e26fd5d88e91bac301a7622006c2c765 commit: 82dbbae293b2fe9a7a5f85590ea17dc1916ee529 Author: Dave Sugar tresys com> AuthorDate: Thu Jan 28 22:13:57 2021 +0000 Commit: Jason Zaman gentoo org> CommitDate: Mon Feb 1 01:21:42 2021 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=82dbbae2 Work with xdg module disabled These two cases I see when building on a system without graphical interface. Move userdom_xdg_user_template into optional block gpg module doesn't require a graphical front end, move xdg_read_data_files into optional block Signed-off-by: Dave Sugar tresys.com> Signed-off-by: Jason Zaman gentoo.org> policy/modules/apps/gpg.te | 6 ++++-- policy/modules/system/userdomain.if | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/policy/modules/apps/gpg.te b/policy/modules/apps/gpg.te index cfdb685a..376e1a9f 100644 --- a/policy/modules/apps/gpg.te +++ b/policy/modules/apps/gpg.te @@ -359,8 +359,6 @@ miscfiles_read_localization(gpg_pinentry_t) userdom_use_user_terminals(gpg_pinentry_t) -xdg_read_data_files(gpg_pinentry_t) - tunable_policy(`use_nfs_home_dirs',` fs_read_nfs_files(gpg_pinentry_t) ') @@ -382,6 +380,10 @@ optional_policy(` pulseaudio_run(gpg_pinentry_t, gpg_pinentry_roles) ') +optional_policy(` + xdg_read_data_files(gpg_pinentry_t) +') + optional_policy(` xserver_user_x_domain_template(gpg_pinentry, gpg_pinentry_t, gpg_pinentry_tmpfs_t) ') diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if index 01135696..e14bdc01 100644 --- a/policy/modules/system/userdomain.if +++ b/policy/modules/system/userdomain.if @@ -1194,9 +1194,6 @@ template(`userdom_unpriv_user_template', ` fs_exec_noxattr($1_t) ') - # Allow users to manage xdg content in their home directories - userdom_xdg_user_template($1) - # Allow users to run TCP servers (bind to ports and accept connection from # the same domain and outside users) disabling this forces FTP passive mode # and may change other protocols @@ -1239,6 +1236,11 @@ template(`userdom_unpriv_user_template', ` systemd_write_inherited_logind_inhibit_pipes($1_t) ') + # Allow users to manage xdg content in their home directories + optional_policy(` + userdom_xdg_user_template($1) + ') + # Allow controlling usbguard optional_policy(` tunable_policy(`usbguard_user_modify_rule_files',`