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 C6B7C139085 for ; Fri, 13 Jan 2017 18:43:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1667223414F; Fri, 13 Jan 2017 18:43:25 +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 E77E623414F for ; Fri, 13 Jan 2017 18:43:14 +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 589B1341810 for ; Fri, 13 Jan 2017 18:43:13 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 576E72638 for ; Fri, 13 Jan 2017 18:43:10 +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: <1484332786.1c1afe0de1dcbd230f92d856769bd9adb176e1d1.swift@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/kernel/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/kernel/devices.te X-VCS-Directories: policy/modules/kernel/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 1c1afe0de1dcbd230f92d856769bd9adb176e1d1 X-VCS-Branch: master Date: Fri, 13 Jan 2017 18:43:10 +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: 59c8b83c-409a-4098-9320-2de322baf4e1 X-Archives-Hash: 8b3056274228f8c74efe9b73213f3b07 commit: 1c1afe0de1dcbd230f92d856769bd9adb176e1d1 Author: Laurent Bigonville bigon be> AuthorDate: Fri Jan 6 13:18:24 2017 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Fri Jan 13 18:39:46 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=1c1afe0d Use genfscon to label /sys/devices/system/cpu/online as cpu_online_t Since 8e01472078763ebc1eaea089a1adab75dd982ccd, it's possible to use genfscon for sysfs. This patch should help to deprecate distribution specific call to restorecon or tmpfiles to restore /sys/devices/system/cpu/online during boot. Thanks to Dominick for the tip. policy/modules/kernel/devices.te | 1 + 1 file changed, 1 insertion(+) diff --git a/policy/modules/kernel/devices.te b/policy/modules/kernel/devices.te index 9b1f207..67515ad 100644 --- a/policy/modules/kernel/devices.te +++ b/policy/modules/kernel/devices.te @@ -66,6 +66,7 @@ dev_node(cpu_device_t) type cpu_online_t, sysfs_types; files_type(cpu_online_t) dev_associate_sysfs(cpu_online_t) +genfscon sysfs /devices/system/cpu/online gen_context(system_u:object_r:cpu_online_t,s0) # # Type for /dev/crash