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 <gentoo-commits+bounces-407596-garchives=archives.gentoo.org@lists.gentoo.org>) id 1RZkWM-0002qv-0x for garchives@archives.gentoo.org; Sun, 11 Dec 2011 14:36:54 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BB1AF21C1C4; Sun, 11 Dec 2011 14:36:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7ADBE21C1C4 for <gentoo-commits@lists.gentoo.org>; Sun, 11 Dec 2011 14:36:46 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D85B61B4010 for <gentoo-commits@lists.gentoo.org>; Sun, 11 Dec 2011 14:36:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 00C0E8004A for <gentoo-commits@lists.gentoo.org>; Sun, 11 Dec 2011 14:36:45 +0000 (UTC) From: "Sven Vermeulen" <sven.vermeulen@siphos.be> To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" <sven.vermeulen@siphos.be> Message-ID: <5a3923f95ddfe75d03cb2a363151a7f096b61bf1.SwifT@gentoo> Subject: [gentoo-commits] proj/hardened-docs:master commit in: xml/selinux/ X-VCS-Repository: proj/hardened-docs X-VCS-Files: xml/selinux/hb-using-troubleshoot.xml X-VCS-Directories: xml/selinux/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 5a3923f95ddfe75d03cb2a363151a7f096b61bf1 Date: Sun, 11 Dec 2011 14:36:45 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 5a6397cf-cef4-490c-8b2d-734d2c842c39 X-Archives-Hash: fb0b624472987d83eb81fa07a301ad2f commit: 5a3923f95ddfe75d03cb2a363151a7f096b61bf1 Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> AuthorDate: Sun Dec 11 14:35:39 2011 +0000 Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> CommitDate: Sun Dec 11 14:35:39 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/hardened-docs= .git;a=3Dcommit;h=3D5a3923f9 Adding portage installation failure information --- xml/selinux/hb-using-troubleshoot.xml | 70 +++++++++++++++++++++++++++= +++++- 1 files changed, 68 insertions(+), 2 deletions(-) diff --git a/xml/selinux/hb-using-troubleshoot.xml b/xml/selinux/hb-using= -troubleshoot.xml index 96df785..16fff0a 100644 --- a/xml/selinux/hb-using-troubleshoot.xml +++ b/xml/selinux/hb-using-troubleshoot.xml @@ -7,8 +7,8 @@ <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/hardened/selinux/hb= -appendix-troubleshoot.xml,v 1.2 2011/04/25 20:12:59 zorry Exp $ --> =20 <sections> -<version>0</version> -<date>2011-02-24</date> +<version>1</version> +<date>2011-12-11</date> =20 <section> <title>Unable To Load SELinux Policy</title> @@ -225,4 +225,70 @@ contexts</e> that you see in the output with the nex= t table. </body> </subsection> </section> + +<section> +<title>Unable to Emerge Anything (OSError: [Errno 22] Invalid argument)<= /title> +<subsection> +<title>Problem Description</title> +<body> + +<p> +When trying to install software with Portage, you get a huge python stac= ktrace +and finally the error message <e>OSError: [Errno 22] Invalid argument</e= >: +</p> + +<pre caption=3D"Stacktrace dump when portage fails to install software"> +Traceback (most recent call last): + File "/usr/bin/emerge", line 43, in <module> + retval =3D emerge_main() + File "/usr/lib64/portage/pym/_emerge/main.py", line 1906, in emerge_ma= in + myopts, myaction, myfiles, spinner) + File "/usr/lib64/portage/pym/_emerge/actions.py", line 437, in action_= build + retval =3D mergetask.merge() +... + File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line= 104, in _doebuild_spawn + return spawn(cmd, settings, **kwargs) + File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line= 1255, in spawn + return spawn_func(mystring, env=3Dmysettings.environ(), **keywords) + File "/usr/lib64/portage/pym/portage/_selinux.py", line 105, in wrappe= r_func + setexec(con) + File "/usr/lib64/portage/pym/portage/_selinux.py", line 79, in setexec + if selinux.setexeccon(ctx) < 0:=20 +OSError: [Errno 22] Invalid argument +</pre> + +</body> +</subsection> +<subsection> +<title>Wrong Context</title> +<body> + +<p> +The above error comes when you launch portage (through <c>emerge</c>) wh= ile you +are not in <c>sysadm_t</c> context. You can verify this with <c>id -Z</c= >: +</p> + +<pre caption=3D"Checking current context"> +~# <i>id -Z</i> +system_u:system_r:local_login_t +</pre> + +<p> +As long as the context isn't <c>sysadm_t</c>, then Portage will break. T= his is +because Portage wants to switch its execution context from <c>portage_t<= /c> to +<c>portage_sandbox_t</c> but fails (it isn't in <c>portage_t</c> to begi= n with +because the user who launched Portage isn't in <c>sysadm_t</c>). +</p> + +<p> +Please check <uri link=3D"#doc_chap2">Unable to Log On</uri> above first= . Also +make sure that you can <c>dispatch-conf</c> or <c>etc-update</c> after +installing SELinux so that <path>/etc/pam.d/system-login</path> is updat= ed with +the right <path>pam_selinux.so</path> calls. +</p> + +</body> +</subsection> +</section> + </sections>