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 DE8781381F3 for ; Wed, 25 Sep 2013 09:49:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4D87DE0D5F; Wed, 25 Sep 2013 09:49:42 +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 9425CE0D63 for ; Wed, 25 Sep 2013 09:49:41 +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 AEFF733EDF5 for ; Wed, 25 Sep 2013 09:49:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 16259E5460 for ; Wed, 25 Sep 2013 09:49:38 +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: <1380102235.e6bd7d69262d7f78547f4949e5a7b017b67e7a67.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/avahi.if X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: e6bd7d69262d7f78547f4949e5a7b017b67e7a67 X-VCS-Branch: master Date: Wed, 25 Sep 2013 09:49:38 +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: 946ea8c7-61ab-4d76-90af-ad69a8010eb6 X-Archives-Hash: b8932237338e2ea11da50585781fa9c2 commit: e6bd7d69262d7f78547f4949e5a7b017b67e7a67 Author: Dominick Grift gmail com> AuthorDate: Tue Sep 24 10:46:08 2013 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Wed Sep 25 09:43:55 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=e6bd7d69 avahi: create a avahi_initrc_domtrans for udev_t: udev runs a avahi dns check script which does, i guess, a dns check. If needed it starts, or stops avahi via its init script. I also created a avahi_manage_pid_files() for udev_t because the script manages a file called "checked_nameservers.*" in /run/avahi-daemon Signed-off-by: Dominick Grift gmail.com> --- policy/modules/contrib/avahi.if | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/policy/modules/contrib/avahi.if b/policy/modules/contrib/avahi.if index b834cd0..ce712af 100644 --- a/policy/modules/contrib/avahi.if +++ b/policy/modules/contrib/avahi.if @@ -21,6 +21,25 @@ interface(`avahi_domtrans',` ######################################## ## +## Execute avahi init scripts in the +## init script domain. +## +## +## +## Domain allowed to transition. +## +## +# +interface(`avahi_initrc_domtrans',` + gen_require(` + type avahi_initrc_exec_t; + ') + + init_labeled_script_domtrans($1, avahi_initrc_exec_t) +') + +######################################## +## ## Send generic signals to avahi. ## ## @@ -116,6 +135,25 @@ interface(`avahi_stream_connect',` ######################################## ## +## Create, read, and write avahi pid files. +## +## +## +## Domain allowed access. +## +## +# +interface(`avahi_manage_pid_files',` + gen_require(` + type avahi_var_run_t; + ') + + files_search_pids($1) + manage_files_pattern($1, avahi_var_run_t, avahi_var_run_t) +') + +######################################## +## ## Do not audit attempts to search ## avahi pid directories. ## @@ -159,7 +197,7 @@ interface(`avahi_admin',` allow $1 avahi_t:process { ptrace signal_perms }; ps_process_pattern($1, avahi_t) - init_labeled_script_domtrans($1, avahi_initrc_exec_t) + avahi_initrc_domtrans($1) domain_system_change_exemption($1) role_transition $2 avahi_initrc_exec_t system_r; allow $2 system_r;