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 B95ED1381F3 for ; Thu, 15 Aug 2013 17:23:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5C5D6E0C3F; Thu, 15 Aug 2013 17:23:16 +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 CAE29E0C3F for ; Thu, 15 Aug 2013 17:23:15 +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 D0F0133EC6E for ; Thu, 15 Aug 2013 17:23:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 0CB45E5459 for ; Thu, 15 Aug 2013 17:23:13 +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: <1376586877.f292cb77d238fb6c8bbd8e478bdf885cf5082476.SwifT@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/system/modutils.te X-VCS-Directories: policy/modules/system/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: f292cb77d238fb6c8bbd8e478bdf885cf5082476 X-VCS-Branch: master Date: Thu, 15 Aug 2013 17:23:13 +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: e210c359-47ed-4d5b-8a0a-9644930a4b68 X-Archives-Hash: 56f876db8e1c4144355f09a27621ddd9 commit: f292cb77d238fb6c8bbd8e478bdf885cf5082476 Author: Sven Vermeulen siphos be> AuthorDate: Thu Aug 15 17:14:37 2013 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Thu Aug 15 17:14:37 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=f292cb77 Make sure "make modules_install" works The kmod binary (running as depmod) needs to handle temporary files created earlier in the "make modules_install" process. Also, it needs read rights on src_t (for instance for System.map information) and manage the kernel modules. Example of failures without manage kernel modules: depmod: ERROR: openat(/lib/modules/3.10.5-hardened, modules.dep.tmp, 1101, 644): Permission denied depmod: ERROR: openat(/lib/modules/3.10.5-hardened, modules.dep.bin.tmp, 1101, 644): Permission denied depmod: ERROR: openat(/lib/modules/3.10.5-hardened, modules.alias.tmp, 1101, 644): Permission denied without src_t read and user tmp file manage rights: depmod: FATAL: could not load System.map: Permission denied make: *** [_modinst_post] Error 1 See bug #428322 --- policy/modules/system/modutils.te | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/policy/modules/system/modutils.te b/policy/modules/system/modutils.te index 7649321..b7d820c 100644 --- a/policy/modules/system/modutils.te +++ b/policy/modules/system/modutils.te @@ -324,3 +324,18 @@ ifdef(`distro_ubuntu',` unconfined_domain(update_modules_t) ') ') + +ifdef(`distro_gentoo',` + ############################ + # + # insmod_t + # + + # During "make modules_install" temp files created by admin + # that invoked the command are later used by kmod. + userdom_manage_user_tmp_files(insmod_t) + userdom_manage_user_tmp_dirs(insmod_t) + + files_read_src_files(insmod_t) + files_manage_kernel_modules(insmod_t) +')