From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 0CF10139694 for ; Sun, 30 Apr 2017 14:20:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 69A3121C0AA; Sun, 30 Apr 2017 14:20:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 3665721C0AA for ; Sun, 30 Apr 2017 14:20:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 559BA34168E for ; Sun, 30 Apr 2017 14:20:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BEF7F7446 for ; Sun, 30 Apr 2017 14:19:59 +0000 (UTC) From: "Jason Zaman" 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" Message-ID: <1493561863.d99dbfd2344aaab6826b1b61a1d4ef858ef58568.perfinion@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/wm.if policy/modules/contrib/wm.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: d99dbfd2344aaab6826b1b61a1d4ef858ef58568 X-VCS-Branch: master Date: Sun, 30 Apr 2017 14:19:59 +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: c8a6a9ac-a6a3-4847-8982-ac2a3515f502 X-Archives-Hash: 7fc1a2abf5a73698a1d6779fc0a54cb9 commit: d99dbfd2344aaab6826b1b61a1d4ef858ef58568 Author: Guido Trentalancia trentalancia net> AuthorDate: Sun Apr 16 22:39:36 2017 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Apr 30 14:17:43 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=d99dbfd2 wm: interactive start Update the window manager (wm) module (support starting gnome-shell from an X terminal). This second version curbs on an open permission when dealing with the user terminal (terminal is already opened by the X terminal application, thanks to Christian Göttsche for the tip). Signed-off-by: Guido Trentalancia trentalancia.net> policy/modules/contrib/wm.if | 27 +++++++++++++++++++++++++++ policy/modules/contrib/wm.te | 7 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/policy/modules/contrib/wm.if b/policy/modules/contrib/wm.if index dbe32237..e8fd7706 100644 --- a/policy/modules/contrib/wm.if +++ b/policy/modules/contrib/wm.if @@ -73,6 +73,8 @@ template(`wm_role_template',` xserver_role($2, $1_wm_t) xserver_manage_core_devices($1_wm_t) + wm_write_pipes($1, $3) + optional_policy(` dbus_connect_spec_session_bus($1, $1_wm_t) dbus_spec_session_bus_client($1, $1_wm_t) @@ -219,3 +221,28 @@ interface(`wm_application_domain',` userdom_user_application_domain($1, $2) domtrans_pattern(wm_domain, $2, $1) ') + +######################################## +### +### Write wm unnamed pipes. +### +## +### +### The prefix of the user domain (e.g., user +### is the prefix for user_t). +### +### +### +### +### Domain allowed access. +### +### +### +## +interface(`wm_write_pipes',` + gen_require(` + type $1_t; + ') + + allow $2 $1_wm_t:fifo_file write; +') diff --git a/policy/modules/contrib/wm.te b/policy/modules/contrib/wm.te index 77dcc432..5b39df69 100644 --- a/policy/modules/contrib/wm.te +++ b/policy/modules/contrib/wm.te @@ -64,6 +64,8 @@ kernel_read_fs_sysctls(wm_domain) kernel_read_proc_symlinks(wm_domain) kernel_read_sysctl(wm_domain) +locallogin_dontaudit_use_fds(wm_domain) + miscfiles_read_fonts(wm_domain) miscfiles_read_generic_certs(wm_domain) miscfiles_read_localization(wm_domain) @@ -72,13 +74,16 @@ networkmanager_read_etc_files(wm_domain) udev_read_pid_files(wm_domain) -# this is needed by gnome-shell +# the following is needed by gnome-shell userdom_exec_user_home_content_files(wm_domain) userdom_manage_user_tmp_sockets(wm_domain) userdom_tmp_filetrans_user_tmp(wm_domain, sock_file) userdom_user_runtime_filetrans_user_tmp(wm_domain, sock_file) +# to print error messages +userdom_use_inherited_user_terminals(wm_domain) + userdom_manage_user_home_content_dirs(wm_domain) userdom_manage_user_home_content_files(wm_domain)