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 169FE138200 for ; Thu, 16 May 2013 09:06:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BAD27E084A; Thu, 16 May 2013 09:06:42 +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 32634E084A for ; Thu, 16 May 2013 09:06:41 +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 0F03033E06F for ; Thu, 16 May 2013 09:06:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id B0724E5458 for ; Thu, 16 May 2013 09:06:39 +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: <1368695098.fde2d2cf7d021d1e3e0d53a2a68ee91a3b08f365.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/openvpn.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: fde2d2cf7d021d1e3e0d53a2a68ee91a3b08f365 X-VCS-Branch: master Date: Thu, 16 May 2013 09:06:39 +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: 4842b8a4-ba10-4715-a2ad-d41a3ff8d6ba X-Archives-Hash: e2f7a8e3abba59140178ae67bb10b185 commit: fde2d2cf7d021d1e3e0d53a2a68ee91a3b08f365 Author: Sven Vermeulen siphos be> AuthorDate: Thu May 9 19:58:43 2013 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Thu May 16 09:04:58 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=fde2d2cf Allow openvpn temporary files When launching OpenVPN, it fails to start and the following error is displayed in the openvpn.log file: Options error: Temporary directory (--tmp-dir) fails with '/tmp': Permission denied The AVC denial shows an attempt to read/write/search in tmp_t directory. A quick check through the code does not show any attempts to create directories, only temporary file, so create an openvpn_tmp_t with the proper file transition towards it. See also https://bugs.gentoo.org/show_bug.cgi?id=468636 Signed-off-by: Sven Vermeulen siphos.be> --- policy/modules/contrib/openvpn.te | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/policy/modules/contrib/openvpn.te b/policy/modules/contrib/openvpn.te index ad85917..ac11789 100644 --- a/policy/modules/contrib/openvpn.te +++ b/policy/modules/contrib/openvpn.te @@ -32,6 +32,9 @@ init_script_file(openvpn_initrc_exec_t) type openvpn_status_t; logging_log_file(openvpn_status_t) +type openvpn_tmp_t; +files_tmp_file(openvpn_tmp_t) + type openvpn_var_log_t; logging_log_file(openvpn_var_log_t) @@ -62,6 +65,9 @@ filetrans_pattern(openvpn_t, openvpn_etc_t, openvpn_etc_rw_t, file) allow openvpn_t openvpn_status_t:file manage_file_perms; logging_log_filetrans(openvpn_t, openvpn_status_t, file, "openvpn-status.log") +allow openvpn_t openvpn_tmp_t:file manage_file_perms; +files_tmp_filetrans(openvpn_t, openvpn_tmp_t, file) + manage_dirs_pattern(openvpn_t, openvpn_var_log_t, openvpn_var_log_t) append_files_pattern(openvpn_t, openvpn_var_log_t, openvpn_var_log_t) create_files_pattern(openvpn_t, openvpn_var_log_t, openvpn_var_log_t)