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 04A5113827A for ; Thu, 26 May 2016 17:39:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A963141DF; Thu, 26 May 2016 17:39:39 +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 B8B68141DF for ; Thu, 26 May 2016 17:39:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 9DC4A340AE0 for ; Thu, 26 May 2016 17:39:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 04B5B87B for ; Thu, 26 May 2016 17:39:35 +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: <1464279073.caeaab82769e2525cde308a0101ea6542472f209.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/system/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/system/userdomain.if X-VCS-Directories: policy/modules/system/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: caeaab82769e2525cde308a0101ea6542472f209 X-VCS-Branch: next Date: Thu, 26 May 2016 17:39:35 +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: 600c2015-8b5c-4622-a69c-d597a5a632a8 X-Archives-Hash: 8bb4e32980223b654d2227e97d7e3a08 commit: caeaab82769e2525cde308a0101ea6542472f209 Author: Jason Zaman perfinion com> AuthorDate: Thu May 26 15:09:27 2016 +0000 Commit: Jason Zaman gentoo org> CommitDate: Thu May 26 16:11:13 2016 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=caeaab82 userdomain: filetrans interfaces for user_runtime policy/modules/system/userdomain.if | 99 +++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if index 0d6d9b1..90edc21 100644 --- a/policy/modules/system/userdomain.if +++ b/policy/modules/system/userdomain.if @@ -324,6 +324,7 @@ interface(`userdom_manage_tmp_role',` manage_sock_files_pattern($2, user_tmp_t, user_tmp_t) manage_fifo_files_pattern($2, user_tmp_t, user_tmp_t) files_tmp_filetrans($2, user_tmp_t, { dir file lnk_file sock_file fifo_file }) + userdom_user_runtime_dir_filetrans_user_tmp($2, { dir file lnk_file sock_file fifo_file }) ') ####################################### @@ -2753,6 +2754,104 @@ interface(`userdom_tmp_filetrans_user_tmp',` ######################################## ## +## Create objects in the pid directory +## with an automatic type transition to +## the user runtime root type. +## +## +## +## Domain allowed access. +## +## +## +## +## The class of the object to be created. +## +## +## +## +## The name of the object being created. +## +## +# +interface(`userdom_pid_filetrans_user_runtime_root',` + gen_require(` + type user_runtime_root_t; + ') + + files_pid_filetrans($1, user_runtime_root_t, $2, $3) +') + +######################################## +## +## Create objects in a user runtime +## directory with an automatic type +## transition to a specified private +## type. +## +## +## +## Domain allowed access. +## +## +## +## +## The type of the object to create. +## +## +## +## +## The class of the object to be created. +## +## +## +## +## The name of the object being created. +## +## +# +interface(`userdom_user_runtime_dir_filetrans',` + gen_require(` + type user_runtime_dir_t; + ') + + filetrans_pattern($1, user_runtime_dir_t, $2, $3, $4) + allow $1 user_runtime_root_t:dir search_dir_perms; + files_search_pids($1) +') + +######################################## +## +## Create objects in the user runtime directory +## with an automatic type transition to +## the user temporary type. +## +## +## +## Domain allowed access. +## +## +## +## +## The class of the object to be created. +## +## +## +## +## The name of the object being created. +## +## +# +interface(`userdom_user_runtime_dir_filetrans_user_tmp',` + gen_require(` + type user_tmp_t; + ') + + userdom_user_runtime_dir_filetrans($1, user_tmp_t, $2, $3) +') + +######################################## +## ## Read and write user tmpfs files. ## ##