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 E7D261381F3 for ; Fri, 19 Apr 2013 15:41:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 82C82E09F8; Fri, 19 Apr 2013 15:41:24 +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 E57A8E09F8 for ; Fri, 19 Apr 2013 15:41:23 +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 8D70133DEEB for ; Fri, 19 Apr 2013 15:41:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 294C1E4306 for ; Fri, 19 Apr 2013 15:41:21 +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: <1366385910.00873e74f83c9a33ea64654d5f6668164dd27f69.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/chromium.te policy/modules/contrib/xdg.if X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 00873e74f83c9a33ea64654d5f6668164dd27f69 X-VCS-Branch: master Date: Fri, 19 Apr 2013 15:41:21 +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: f785fd3c-96bc-4e3d-8c05-196077da3948 X-Archives-Hash: 641ef620a9f49e6b8ae009b717a91cbf commit: 00873e74f83c9a33ea64654d5f6668164dd27f69 Author: Sven Vermeulen siphos be> AuthorDate: Fri Apr 19 15:34:16 2013 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Fri Apr 19 15:38:30 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=00873e74 Add read/create/write interfaces for downloads content With these interfaces, we can now support the generic set of privileges: - read (xdg_read_downloads_home) - write (xdg_create_downloads_home + xdg_write_downloads_home) - manage (xdg_manage_downloads_home) --- policy/modules/contrib/chromium.te | 1 + policy/modules/contrib/xdg.if | 61 ++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 0 deletions(-) diff --git a/policy/modules/contrib/chromium.te b/policy/modules/contrib/chromium.te index c3c5dab..668e590 100644 --- a/policy/modules/contrib/chromium.te +++ b/policy/modules/contrib/chromium.te @@ -159,6 +159,7 @@ xdg_create_config_home_dirs(chromium_t) xdg_create_data_home_dirs(chromium_t) xdg_generic_user_home_dir_filetrans_cache_home(chromium_t, dir, ".cache") xdg_generic_user_home_dir_filetrans_config_home(chromium_t, dir, ".config") +xdg_manage_downloads_home(chromium_t) xdg_read_config_home_files(chromium_t) xdg_read_data_home_files(chromium_t) diff --git a/policy/modules/contrib/xdg.if b/policy/modules/contrib/xdg.if index 3613a65..06ec2fc 100644 --- a/policy/modules/contrib/xdg.if +++ b/policy/modules/contrib/xdg.if @@ -765,6 +765,67 @@ interface(`xdg_relabel_all_data_home',` userdom_search_user_home_dirs($1) ') + +######################################### +## +## Read downloaded content +## +## +## +## Domain allowed access +## +## +# +interface(`xdg_read_downloads_home',` + gen_require(` + type xdg_downloads_home_t; + ') + + read_files_pattern($1, xdg_downloads_home_t, xdg_downloads_home_t) + + userdom_search_user_home_dirs($1) +') + +######################################### +## +## Create downloaded content +## +## +## +## Domain allowed access +## +## +# +interface(`xdg_create_downloads_home',` + gen_require(` + type xdg_downloads_home_t; + ') + + create_files_pattern($1, xdg_downloads_home_t, xdg_downloads_home_t) + + userdom_search_user_home_dirs($1) +') + +######################################### +## +## Write downloaded content +## +## +## +## Domain allowed access +## +## +# +interface(`xdg_write_downloads_home',` + gen_require(` + type xdg_downloads_home_t; + ') + + write_files_pattern($1, xdg_downloads_home_t, xdg_downloads_home_t) + + userdom_search_user_home_dirs($1) +') + ######################################### ## ## Manage downloaded content