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 CB70C138C92 for ; Mon, 24 Oct 2016 16:04:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6BA9621C081; Mon, 24 Oct 2016 16:03:15 +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 2F4A021C081 for ; Mon, 24 Oct 2016 16:03:10 +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 420CF34165F for ; Mon, 24 Oct 2016 16:03:09 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 53ACE24B8 for ; Mon, 24 Oct 2016 16:03:05 +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: <1477324972.975c23d83a8f52c93dffdfd7899bfb561769e711.swift@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/miscfiles.fc policy/modules/system/miscfiles.if policy/modules/system/miscfiles.te policy/modules/system/userdomain.if policy/modules/system/userdomain.te X-VCS-Directories: policy/modules/system/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 975c23d83a8f52c93dffdfd7899bfb561769e711 X-VCS-Branch: next Date: Mon, 24 Oct 2016 16:03:05 +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: dfe9e619-b48b-4cd5-86ca-29b40cc4c632 X-Archives-Hash: ece3d6990c2fb8ef37ce8b83e912337e commit: 975c23d83a8f52c93dffdfd7899bfb561769e711 Author: Jason Zaman perfinion com> AuthorDate: Sun Oct 9 05:08:41 2016 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Mon Oct 24 16:02:52 2016 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=975c23d8 DO NOT MERGE. sync user_cert_t cert_home_t with upstream Need to upstream userdom_user_home_dir_filetrans_user_cert interface policy/modules/system/miscfiles.fc | 2 -- policy/modules/system/miscfiles.if | 46 ++++--------------------------------- policy/modules/system/miscfiles.te | 7 ------ policy/modules/system/userdomain.if | 33 +++++++++++++++++++++++--- policy/modules/system/userdomain.te | 2 +- 5 files changed, 36 insertions(+), 54 deletions(-) diff --git a/policy/modules/system/miscfiles.fc b/policy/modules/system/miscfiles.fc index be0b6a1..42ac30b 100644 --- a/policy/modules/system/miscfiles.fc +++ b/policy/modules/system/miscfiles.fc @@ -103,8 +103,6 @@ ifdef(`distro_redhat',` /var/spool/postfix/etc/localtime -- gen_context(system_u:object_r:locale_t,s0) ') -HOME_DIR/.pki(/.*)? gen_context(system_u:object_r:cert_home_t,s0) - ifdef(`distro_gentoo',` /etc/fonts(/.*)? gen_context(system_u:object_r:fonts_t,s0) ') diff --git a/policy/modules/system/miscfiles.if b/policy/modules/system/miscfiles.if index 63ed47f..d89c7c0 100644 --- a/policy/modules/system/miscfiles.if +++ b/policy/modules/system/miscfiles.if @@ -97,15 +97,8 @@ interface(`miscfiles_read_generic_certs',` ## # interface(`miscfiles_manage_user_certs',` - gen_require(` - type cert_home_t; - ') - - manage_dirs_pattern($1, cert_home_t, cert_home_t) - manage_files_pattern($1, cert_home_t, cert_home_t) - manage_lnk_files_pattern($1, cert_home_t, cert_home_t) - - userdom_search_user_home_dirs($1) + userdom_manage_user_certs($1) + refpolicywarn(`$0() has been deprecated, please use userdom_manage_user_certs() instead.') ') ######################################## @@ -213,35 +206,6 @@ interface(`miscfiles_manage_cert_files',` ######################################## ## -## Automatically use the cert_home_t label for selected resources created -## in a users home directory -## -## -## -## Domain allowed access -## -## -## -## -## Resource type(s) for which the label should be used -## -## -## -## -## Name of the resource that is being created -## -## -# -interface(`miscfiles_user_home_dir_filetrans_cert_home',` - gen_require(` - type cert_home_t; - ') - - userdom_user_home_dir_filetrans($1, cert_home_t, $2, $3) -') - -######################################## -## ## Read fonts. ## ## @@ -823,8 +787,7 @@ interface(`miscfiles_read_test_files',` ######################################## ## -## Create files in etc directories -## with localization file type. +## Execute test files. ## ## ## @@ -843,7 +806,8 @@ interface(`miscfiles_exec_test_files',` ######################################## ## -## Execute test files. +## Create files in etc directories +## with localization file type. ## ## ## diff --git a/policy/modules/system/miscfiles.te b/policy/modules/system/miscfiles.te index 246ac6a..85a29e3 100644 --- a/policy/modules/system/miscfiles.te +++ b/policy/modules/system/miscfiles.te @@ -14,13 +14,6 @@ type cert_t; miscfiles_cert_type(cert_t) # -# cert_home_t is the type of files in the users' home directories. -# -type cert_home_t; -miscfiles_cert_type(cert_home_t) -userdom_user_home_content(cert_home_t) - -# # fonts_t is the type of various font # files in /usr # diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if index 1572b51..d2b1df0 100644 --- a/policy/modules/system/userdomain.if +++ b/policy/modules/system/userdomain.if @@ -272,9 +272,6 @@ interface(`userdom_manage_home_role',` ') ifdef(`distro_gentoo',` - miscfiles_manage_user_certs($2) - miscfiles_relabel_user_certs($2) - optional_policy(` flash_manage_home($2) flash_relabel_home($2) @@ -2467,6 +2464,36 @@ interface(`userdom_manage_user_certs',` ######################################## ## +## Automatically use the user_cert_t label for +## selected resources created in a users home +## directory +## +## +## +## Domain allowed access +## +## +## +## +## Resource type(s) for which the label should be used +## +## +## +## +## Name of the resource that is being created +## +## +# +interface(`userdom_user_home_dir_filetrans_user_cert',` + gen_require(` + type user_cert_t; + ') + + userdom_user_home_dir_filetrans($1, user_cert_t, $2, $3) +') + +######################################## +## ## Write to user temporary named sockets. ## ## diff --git a/policy/modules/system/userdomain.te b/policy/modules/system/userdomain.te index 0b0eb60..b590d64 100644 --- a/policy/modules/system/userdomain.te +++ b/policy/modules/system/userdomain.te @@ -93,7 +93,7 @@ files_associate_tmp(user_home_t) files_poly_parent(user_home_t) files_mountpoint(user_home_t) -type user_cert_t; +type user_cert_t alias cert_home_t; userdom_user_home_content(user_cert_t) type user_devpts_t alias { staff_devpts_t sysadm_devpts_t secadm_devpts_t auditadm_devpts_t unconfined_devpts_t };