From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RCaAT-0001xN-VN for garchives@archives.gentoo.org; Sat, 08 Oct 2011 16:54:34 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3BD0921C134; Sat, 8 Oct 2011 16:54:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0E5AE21C134 for ; Sat, 8 Oct 2011 16:54:25 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4D0ED1B4016 for ; Sat, 8 Oct 2011 16:54:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 55ED180042 for ; Sat, 8 Oct 2011 16:54:24 +0000 (UTC) From: "Sven Vermeulen" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" Message-ID: Subject: [gentoo-commits] proj/hardened-docs:master commit in: xml/ X-VCS-Repository: proj/hardened-docs X-VCS-Files: xml/selinux-faq.xml X-VCS-Directories: xml/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: a32bd2f55f10d81df329439f220e0b1e48ec8ab9 Date: Sat, 8 Oct 2011 16:54:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 4d93bf1582af6b0671b49f4f8db4f501 commit: a32bd2f55f10d81df329439f220e0b1e48ec8ab9 Author: Sven Vermeulen siphos be> AuthorDate: Sat Oct 8 16:53:49 2011 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Sat Oct 8 16:53:49 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/hardened-docs= .git;a=3Dcommit;h=3Da32bd2f5 Adding FAQ on recovering portage in case of setfiles failure --- xml/selinux-faq.xml | 37 +++++++++++++++++++++++++++++++++++-- 1 files changed, 35 insertions(+), 2 deletions(-) diff --git a/xml/selinux-faq.xml b/xml/selinux-faq.xml index 9a3fc95..b556c57 100644 --- a/xml/selinux-faq.xml +++ b/xml/selinux-faq.xml @@ -17,8 +17,8 @@ The FAQ is a collection of solutions found on IRC, mail= inglist, forums or elsewhere =20 -14 -2011-09-04 +15 +2011-10-08 =20 Questions @@ -767,5 +767,38 @@ version, or force set it to the higher version. =20 +
+Portage fails to label files because "setfiles" does not work any= more + + +

+Portage uses the setfiles command to set the labels of the files = it +installs. However, that command is a dynamically linked executable, so a= ny +update in its depending libraries (libselinux.so, +libsepol.so, libaudit.so and of course +libc.so) might cause for the application to fail. Gentoo's = standard +solution (revdep-rebuild) will not work, since the tool will try = to +rebuild policycoreutils, which will fail to install because Portage cann= ot set +the file labels. +

+ +

+The solution is to rebuild policycoreutils while disabling Portage' seli= nux +support, then label the installed files manually using chcon, bas= ed on +the feedback received from matchpathcon. +

+ +
+# FEATURES=3D"-selinux" emerge --oneshot policycoreutils
+# for FILE in $(qlist policycoreutils); do \
+CONTEXT=3D$(matchpathcon -n ${FILE}) chcon ${CONTEXT} ${FILE}; done
+
+ +

+Now Portage will function properly again, labeling files as they should. +

+ + +