From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-932143-garchives=archives.gentoo.org@lists.gentoo.org> 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 43F8C139694 for <garchives@archives.gentoo.org>; Fri, 17 Feb 2017 08:51:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A119721C0A9; Fri, 17 Feb 2017 08:51:34 +0000 (UTC) Received: from smtp.gentoo.org (unknown [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 81AE321C0A9 for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2017 08:51:24 +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 4D992340FDA for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2017 08:50:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 659BF4ACF for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2017 08:50:55 +0000 (UTC) From: "Jason Zaman" <perfinion@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, "Jason Zaman" <perfinion@gentoo.org> Message-ID: <1487320729.9671bfb441d3b4606c944fceb142ff772309f677.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/cups.if policy/modules/contrib/lpd.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 9671bfb441d3b4606c944fceb142ff772309f677 X-VCS-Branch: next Date: Fri, 17 Feb 2017 08:50:55 +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: 7d3872cc-d153-41da-88cd-06a613310b2b X-Archives-Hash: 83e76745f6be0bfefdff282b395fb0c1 Message-ID: <20170217085055.xSqt4e0h-8eSpVmblDPAxwZZxJgMqhvsmlvfOS0BQk4@z> commit: 9671bfb441d3b4606c944fceb142ff772309f677 Author: Guido Trentalancia <guido <AT> trentalancia <DOT> net> AuthorDate: Sat Feb 11 20:13:40 2017 +0000 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> CommitDate: Fri Feb 17 08:38:49 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=9671bfb4 cups/lpd: read permission for cupsd_var_run_t socket files Introduce a new interface in the cups module to read cups socket files and call such interface from the lpd module. Thanks to Christpher PeBenito for revising this patch. Signed-off-by: Guido Trentalancia <guido <AT> trentalancia.net> policy/modules/contrib/cups.if | 19 +++++++++++++++++++ policy/modules/contrib/lpd.te | 1 + 2 files changed, 20 insertions(+) diff --git a/policy/modules/contrib/cups.if b/policy/modules/contrib/cups.if index bd6b77f4..1fb79e2b 100644 --- a/policy/modules/contrib/cups.if +++ b/policy/modules/contrib/cups.if @@ -129,6 +129,25 @@ interface(`cups_read_pid_files',` ######################################## ## <summary> +## Read cups socket files. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`cups_read_sock_files',` + gen_require(` + type cupsd_var_run_t; + ') + + files_search_pids($1) + allow $1 cupsd_var_run_t:sock_file read_sock_file_perms; +') + +######################################## +## <summary> ## Execute cups_config in the ## cups config domain. ## </summary> diff --git a/policy/modules/contrib/lpd.te b/policy/modules/contrib/lpd.te index 87984710..480b5e7e 100644 --- a/policy/modules/contrib/lpd.te +++ b/policy/modules/contrib/lpd.te @@ -295,6 +295,7 @@ optional_policy(` cups_read_config(lpr_t) cups_stream_connect(lpr_t) cups_read_pid_files(lpr_t) + cups_read_sock_files(lpr_t) ') optional_policy(`