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 26CEE158041 for ; Sun, 5 Sep 2021 16:00:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 94243E086B; Sun, 5 Sep 2021 16:00:21 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 6842FE086E for ; Sun, 5 Sep 2021 16:00:21 +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 49E4A340CFE for ; Sun, 5 Sep 2021 16:00:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 77038DC for ; Sun, 5 Sep 2021 16:00:16 +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: <1630852004.922a36f3770145f871fae43693999f592b0edca5.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/services/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/services/ftp.te X-VCS-Directories: policy/modules/services/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 922a36f3770145f871fae43693999f592b0edca5 X-VCS-Branch: master Date: Sun, 5 Sep 2021 16:00:16 +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: c96d6672-aaa1-4016-b96d-7cda3878bc1e X-Archives-Hash: 7eb24e7f10b19c1b2e2678c377686fc8 commit: 922a36f3770145f871fae43693999f592b0edca5 Author: Fabrice Fontaine gmail com> AuthorDate: Fri Jul 30 20:40:20 2021 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Sep 5 14:26:44 2021 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=922a36f3 policy/modules/services/ftp.te: make ssh optional Make ssh optional to avoid the following build failure: Compiling targeted policy.30 env LD_LIBRARY_PATH="/home/fabrice/buildroot/output/host/lib:/home/fabrice/buildroot/output/host/usr/lib" /home/fabrice/buildroot/output/host/usr/bin/checkpolicy -c 30 -U deny -S -O -E policy.conf -o policy.30 policy/modules/services/ftp.te:484:ERROR 'type ssh_home_t is not within scope' at token ';' on line 92051: allow sftpd_t ssh_home_t:dir { open read getattr lock search ioctl add_name remove_name write }; #line 484 checkpolicy: error(s) encountered while parsing configuration Signed-off-by: Fabrice Fontaine gmail.com> Signed-off-by: Jason Zaman gentoo.org> policy/modules/services/ftp.te | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/policy/modules/services/ftp.te b/policy/modules/services/ftp.te index 0d84da71..5686b225 100644 --- a/policy/modules/services/ftp.te +++ b/policy/modules/services/ftp.te @@ -481,10 +481,6 @@ tunable_policy(`sftpd_full_access',` files_manage_non_auth_files(sftpd_t) ') -tunable_policy(`sftpd_write_ssh_home',` - ssh_manage_home_files(sftpd_t) -') - tunable_policy(`use_samba_home_dirs',` fs_list_cifs(sftpd_t) fs_read_cifs_files(sftpd_t) @@ -496,3 +492,9 @@ tunable_policy(`use_nfs_home_dirs',` fs_read_nfs_files(sftpd_t) fs_read_nfs_symlinks(ftpd_t) ') + +optional_policy(` + tunable_policy(`sftpd_write_ssh_home',` + ssh_manage_home_files(sftpd_t) + ') +')