From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D6D65138202 for ; Wed, 25 Sep 2013 09:49:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E57A6E0D66; Wed, 25 Sep 2013 09:49:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E7ADCE0D60 for ; Wed, 25 Sep 2013 09:49:40 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6C50F33EDE7 for ; Wed, 25 Sep 2013 09:49:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 9BEC8E546A for ; Wed, 25 Sep 2013 09:49:37 +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: <1380102223.b814864e552994f1145780b333ff8eee4dc53098.swift@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/apt.if policy/modules/contrib/mandb.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: b814864e552994f1145780b333ff8eee4dc53098 X-VCS-Branch: master Date: Wed, 25 Sep 2013 09:49:37 +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: a109e3dc-a7f0-4e0e-afb2-b33aecaacc87 X-Archives-Hash: ec3f3ca03ac056b2058c2edd448b3370 commit: b814864e552994f1145780b333ff8eee4dc53098 Author: Dominick Grift gmail com> AuthorDate: Tue Sep 24 07:40:07 2013 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Wed Sep 25 09:43:43 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=b814864e mandb: Make the man-db cronjob work on Debian Signed-off-by: Dominick Grift gmail.com> --- policy/modules/contrib/apt.if | 19 +++++++++++++++++++ policy/modules/contrib/mandb.te | 14 +++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/policy/modules/contrib/apt.if b/policy/modules/contrib/apt.if index e2414c4..cde81d2 100644 --- a/policy/modules/contrib/apt.if +++ b/policy/modules/contrib/apt.if @@ -21,6 +21,25 @@ interface(`apt_domtrans',` ######################################## ## +## Execute the apt in the caller domain. +## +## +## +## Domain allowed access. +## +## +# +interface(`apt_exec',` + gen_require(` + type apt_exec_t; + ') + + corecmd_search_bin($1) + can_exec($1, apt_exec_t) +') + +######################################## +## ## Execute apt programs in the apt domain. ## ## diff --git a/policy/modules/contrib/mandb.te b/policy/modules/contrib/mandb.te index 9e6239c..0fb1897 100644 --- a/policy/modules/contrib/mandb.te +++ b/policy/modules/contrib/mandb.te @@ -18,19 +18,31 @@ role mandb_roles types mandb_t; # Local policy # -allow mandb_t self:process signal; +allow mandb_t self:capability { setuid setgid }; +allow mandb_t self:process { setsched signal }; allow mandb_t self:fifo_file rw_fifo_file_perms; allow mandb_t self:unix_stream_socket create_stream_socket_perms; +kernel_read_kernel_sysctls(mandb_t) kernel_read_system_state(mandb_t) corecmd_exec_bin(mandb_t) +corecmd_exec_shell(mandb_t) + +dev_search_sysfs(mandb_t) domain_use_interactive_fds(mandb_t) files_read_etc_files(mandb_t) miscfiles_manage_man_cache(mandb_t) +miscfiles_read_man_pages(mandb_t) +miscfiles_read_localization(mandb_t) + +optional_policy(` + apt_exec(mandb_t) + apt_read_db(mandb_t) +') optional_policy(` cron_system_entry(mandb_t, mandb_exec_t)