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 CBA11139695 for ; Thu, 2 Mar 2017 10:17:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 02A4821C09D; Thu, 2 Mar 2017 10:17:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CD73421C09B for ; Thu, 2 Mar 2017 10:17:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F36E53416EA for ; Thu, 2 Mar 2017 10:17:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2791E599B for ; Thu, 2 Mar 2017 10:17:51 +0000 (UTC) From: "Sven Vermeulen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" Message-ID: <1488449800.2ea4214ce55c1f5dfa9a23bd74e6b8bc01db9611.swift@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/kernel/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/kernel/corecommands.if X-VCS-Directories: policy/modules/kernel/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 2ea4214ce55c1f5dfa9a23bd74e6b8bc01db9611 X-VCS-Branch: master Date: Thu, 2 Mar 2017 10:17:51 +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-Archives-Salt: bb56f2f5-84e6-4af9-9294-01ba9ce6651a X-Archives-Hash: 2043aacb067f34ac88bb85c72efada76 commit: 2ea4214ce55c1f5dfa9a23bd74e6b8bc01db9611 Author: cgzones googlemail com> AuthorDate: Mon Feb 20 13:20:00 2017 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Thu Mar 2 10:16:40 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=2ea4214c add corecmd_check_exec_bin_files() useful for monit policy/modules/kernel/corecommands.if | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/policy/modules/kernel/corecommands.if b/policy/modules/kernel/corecommands.if index 60c1feb7..d7ccec3a 100644 --- a/policy/modules/kernel/corecommands.if +++ b/policy/modules/kernel/corecommands.if @@ -218,6 +218,25 @@ interface(`corecmd_dontaudit_getattr_bin_files',` ######################################## ## +## Check if files in bin directories are executable (DAC-wise) +## +## +## +## Domain allowed access. +## +## +# +interface(`corecmd_check_exec_bin_files',` + gen_require(` + type bin_t; + ') + + allow $1 bin_t:dir search_dir_perms; + allow $1 bin_t:file { execute getattr }; +') + +######################################## +## ## Read files in bin directories. ## ##