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 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 ; 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 ; 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 ; Sun, 11 Dec 2011 14:36:45 +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: <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: 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: 5a6397cf-cef4-490c-8b2d-734d2c842c39 X-Archives-Hash: fb0b624472987d83eb81fa07a301ad2f commit: 5a3923f95ddfe75d03cb2a363151a7f096b61bf1 Author: Sven Vermeulen siphos be> AuthorDate: Sun Dec 11 14:35:39 2011 +0000 Commit: Sven Vermeulen siphos 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 @@ =20 -0 -2011-02-24 +1 +2011-12-11 =20
Unable To Load SELinux Policy @@ -225,4 +225,70 @@ contexts that you see in the output with the nex= t table.
+ +
+Unable to Emerge Anything (OSError: [Errno 22] Invalid argument)<= /title> +<subsection> +<title>Problem Description + + +

+When trying to install software with Portage, you get a huge python stac= ktrace +and finally the error message OSError: [Errno 22] Invalid argument: +

+ +
+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
+
+ + + + +Wrong Context + + +

+The above error comes when you launch portage (through emerge) wh= ile you +are not in sysadm_t context. You can verify this with id -Z: +

+ +
+~# id -Z
+system_u:system_r:local_login_t
+
+ +

+As long as the context isn't sysadm_t, then Portage will break. T= his is +because Portage wants to switch its execution context from portage_t<= /c> to +portage_sandbox_t but fails (it isn't in portage_t to begi= n with +because the user who launched Portage isn't in sysadm_t). +

+ +

+Please check Unable to Log On above first= . Also +make sure that you can dispatch-conf or etc-update after +installing SELinux so that /etc/pam.d/system-login is updat= ed with +the right pam_selinux.so calls. +

+ + +
+
+