From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-631645-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 2916A1381F3
	for <garchives@archives.gentoo.org>; Mon, 30 Sep 2013 19:04:02 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0B9E3E0BF6;
	Mon, 30 Sep 2013 19:03:49 +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 7F29BE0C10
	for <gentoo-commits@lists.gentoo.org>; Mon, 30 Sep 2013 19:03:43 +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 9E45833E935
	for <gentoo-commits@lists.gentoo.org>; Mon, 30 Sep 2013 19:03:42 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 8809DE546E
	for <gentoo-commits@lists.gentoo.org>; Mon, 30 Sep 2013 19:03:40 +0000 (UTC)
From: "Sven Vermeulen" <swift@gentoo.org>
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" <swift@gentoo.org>
Message-ID: <1380567778.3f2fdd88b576d2fe658d89a2d972dc928147c73e.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/slocate.fc policy/modules/contrib/slocate.te
X-VCS-Directories: policy/modules/contrib/
X-VCS-Committer: swift
X-VCS-Committer-Name: Sven Vermeulen
X-VCS-Revision: 3f2fdd88b576d2fe658d89a2d972dc928147c73e
X-VCS-Branch: master
Date: Mon, 30 Sep 2013 19:03:40 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: fe5ce133-2251-4bb2-b1cb-4bc1ff4e5ec6
X-Archives-Hash: 29d958ecaf663dd4937dfeb191dd0ac8

commit:     3f2fdd88b576d2fe658d89a2d972dc928147c73e
Author:     Dominick Grift <dominick.grift <AT> gmail <DOT> com>
AuthorDate: Fri Sep 27 07:47:37 2013 +0000
Commit:     Sven Vermeulen <swift <AT> gentoo <DOT> org>
CommitDate: Mon Sep 30 19:02:58 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=3f2fdd88

locate: extra rules needed by debian /etc/cron.daily/locate script

Signed-off-by: Dominick Grift <dominick.grift <AT> gmail.com>

---
 policy/modules/contrib/slocate.fc |  2 ++
 policy/modules/contrib/slocate.te | 13 +++++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/policy/modules/contrib/slocate.fc b/policy/modules/contrib/slocate.fc
index 19dbf4f..5844628 100644
--- a/policy/modules/contrib/slocate.fc
+++ b/policy/modules/contrib/slocate.fc
@@ -3,3 +3,5 @@
 /usr/bin/updatedb.*	--	gen_context(system_u:object_r:locate_exec_t,s0)
 
 /var/lib/[sm]locate(/.*)?	gen_context(system_u:object_r:locate_var_lib_t,s0)
+
+/var/run/mlocate\.daily\.lock	--	gen_context(system_u:object_r:locate_var_run_t,s0)

diff --git a/policy/modules/contrib/slocate.te b/policy/modules/contrib/slocate.te
index b362a61..7292dc0 100644
--- a/policy/modules/contrib/slocate.te
+++ b/policy/modules/contrib/slocate.te
@@ -1,4 +1,4 @@
-policy_module(slocate, 1.12.1)
+policy_module(slocate, 1.12.2)
 
 #################################
 #
@@ -12,24 +12,33 @@ init_system_domain(locate_t, locate_exec_t)
 type locate_var_lib_t;
 files_type(locate_var_lib_t)
 
+type locate_var_run_t;
+files_pid_file(locate_var_run_t)
+
 ########################################
 #
 # Local policy
 #
 
 allow locate_t self:capability { chown dac_read_search dac_override fowner fsetid };
-allow locate_t self:process { execmem execheap execstack signal };
+allow locate_t self:process { execmem execheap execstack signal setsched };
 allow locate_t self:fifo_file rw_fifo_file_perms;
 allow locate_t self:unix_stream_socket create_socket_perms;
 
 manage_dirs_pattern(locate_t, locate_var_lib_t, locate_var_lib_t)
 manage_files_pattern(locate_t, locate_var_lib_t, locate_var_lib_t)
 
+allow locate_t locate_var_run_t:file manage_file_perms;
+files_pid_filetrans(locate_t, locate_var_run_t, file, "mlocate.daily.lock")
+
+can_exec(locate_t, locate_exec_t)
+
 kernel_read_system_state(locate_t)
 kernel_dontaudit_search_network_state(locate_t)
 kernel_dontaudit_search_sysctl(locate_t)
 
 corecmd_exec_bin(locate_t)
+corecmd_exec_shell(locate_t)
 
 dev_getattr_all_blk_files(locate_t)
 dev_getattr_all_chr_files(locate_t)