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 324CE138010 for ; Wed, 10 Oct 2012 19:53:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BEB1AE0478; Wed, 10 Oct 2012 19:52:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 03D84E0462 for ; Wed, 10 Oct 2012 19:52:15 +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 5D9B333D800 for ; Wed, 10 Oct 2012 19:52:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 07EA6E5445 for ; Wed, 10 Oct 2012 19:52:14 +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: <1349898560.193911a10b440767ca00db4c3dea347201109135.SwifT@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/postgresql.if X-VCS-Directories: policy/modules/services/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 193911a10b440767ca00db4c3dea347201109135 X-VCS-Branch: master Date: Wed, 10 Oct 2012 19:52:14 +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: a15a3b78-a170-49af-ab89-e6b7e659d32b X-Archives-Hash: 87ae702dd4d91724e6d5cec2512e6cfc commit: 193911a10b440767ca00db4c3dea347201109135 Author: Sven Vermeulen siphos be> AuthorDate: Sat Oct 6 16:10:38 2012 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Wed Oct 10 19:49:20 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=193911a1 Allow search within postgresql var directory for the stream connect interface Domains that are granted postgresql_stream_connect() need to be able to search through the postgresql_var_run_t directory (in which the socket is located). Update the interface to use the stream_connect_pattern definition to simplify the interface and make it more readable. Signed-off-by: Sven Vermeulen siphos.be> --- policy/modules/services/postgresql.if | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/policy/modules/services/postgresql.if b/policy/modules/services/postgresql.if index 81f87bd..85d430f 100644 --- a/policy/modules/services/postgresql.if +++ b/policy/modules/services/postgresql.if @@ -446,11 +446,10 @@ interface(`postgresql_stream_connect',` type postgresql_t, postgresql_var_run_t, postgresql_tmp_t; ') + stream_connect_pattern($1, { postgresql_var_run_t postgresql_tmp_t }, { postgresql_var_run_t postgresql_tmp_t }, postgresql_t) + files_search_pids($1) - allow $1 postgresql_t:unix_stream_socket connectto; - allow $1 postgresql_var_run_t:sock_file write; - # Some versions of postgresql put the sock file in /tmp - allow $1 postgresql_tmp_t:sock_file write; + files_search_tmp($1) ') ########################################