Gentoo Archives: gentoo-commits

From: "JosA MarAa Alonso (nimiux)" <nimiux@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in xml/htdocs/proj/es/hardened/selinux: hb-using-troubleshoot.xml
Date: Thu, 29 Dec 2011 13:14:45
Message-Id: 20111229131429.4D1BE2004B@flycatcher.gentoo.org
1 nimiux 11/12/29 13:14:29
2
3 Modified: hb-using-troubleshoot.xml
4 Log:
5 Updating documents (merge frmo hardened-docs)
6
7 Revision Changes Path
8 1.2 xml/htdocs/proj/es/hardened/selinux/hb-using-troubleshoot.xml
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/es/hardened/selinux/hb-using-troubleshoot.xml?rev=1.2&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/es/hardened/selinux/hb-using-troubleshoot.xml?rev=1.2&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/es/hardened/selinux/hb-using-troubleshoot.xml?r1=1.1&r2=1.2
13
14 Index: hb-using-troubleshoot.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/es/hardened/selinux/hb-using-troubleshoot.xml,v
17 retrieving revision 1.1
18 retrieving revision 1.2
19 diff -u -r1.1 -r1.2
20 --- hb-using-troubleshoot.xml 27 Oct 2011 17:29:55 -0000 1.1
21 +++ hb-using-troubleshoot.xml 29 Dec 2011 13:14:29 -0000 1.2
22 @@ -4,11 +4,11 @@
23 <!-- The content of this document is licensed under the CC-BY-SA license -->
24 <!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
25
26 -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/es/hardened/selinux/hb-using-troubleshoot.xml,v 1.1 2011/10/27 17:29:55 nimiux Exp $ -->
27 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/es/hardened/selinux/hb-using-troubleshoot.xml,v 1.2 2011/12/29 13:14:29 nimiux Exp $ -->
28
29 <sections>
30 -<version>0</version>
31 -<date>2011-02-24</date>
32 +<version>1</version>
33 +<date>2011-12-11</date>
34
35 <section>
36 <title>No se puede cargar la directriz de SELinux</title>
37 @@ -243,4 +243,100 @@
38 </body>
39 </subsection>
40 </section>
41 +
42 +<section>
43 +<title>No se puede hacer emerge de ningún paquete (OSError: [Errno 22] Invalid argument)</title>
44 +<subsection>
45 +<title>Descripción del problema</title>
46 +<body>
47 +
48 +<p>
49 +Cuando se intenta instalar software con Portage, se obtiene un volcado
50 +enorme de la pila de python y finalmente el mensaje de error
51 +<e>OSError: [Errno 22] Invalid argument</e>:
52 +</p>
53 +
54 +<pre caption="Volcado de la traza de la pila cuando falla portage al instalar software">
55 +Traceback (most recent call last):
56 + File "/usr/bin/emerge", line 43, in &lt;module&gt;
57 + retval = emerge_main()
58 + File "/usr/lib64/portage/pym/_emerge/main.py", line 1906, in emerge_main
59 + myopts, myaction, myfiles, spinner)
60 + File "/usr/lib64/portage/pym/_emerge/actions.py", line 437, in action_build
61 + retval = mergetask.merge()
62 +...
63 + File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line 104, in _doebuild_spawn
64 + return spawn(cmd, settings, **kwargs)
65 + File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line 1255, in spawn
66 + return spawn_func(mystring, env=mysettings.environ(), **keywords)
67 + File "/usr/lib64/portage/pym/portage/_selinux.py", line 105, in wrapper_func
68 + setexec(con)
69 + File "/usr/lib64/portage/pym/portage/_selinux.py", line 79, in setexec
70 + if selinux.setexeccon(ctx) &lt; 0:
71 +OSError: [Errno 22] Invalid argument
72 +</pre>
73 +
74 +</body>
75 +</subsection>
76 +<subsection>
77 +<title>Contexto erróneo</title>
78 +<body>
79 +
80 +<p>
81 +El error de arriba se produce cuando se lanza portage (mediante
82 +<c>emerge</c>) y no nos encontramos en el contexto <c>sysadm_t</c>.
83 +Puede verificar esto con <c>id -Z</c>:
84 +</p>
85 +
86 +<pre caption="Comprobando el contexto actual">
87 +~# <i>id -Z</i>
88 +system_u:system_r:local_login_t
89 +</pre>
90 +
91 +<p>
92 +Portage fallarán mientras el contexto utilizado no sea <c>sysadm_t</c>.
93 +Esto es debido a que Portage quiere cambiar su contexto de ejecución de
94 +<c>portage_t</c> a <c>portage_sandbox_t</c>, sin embargo no puede
95 +conseguirlo (para empezar, no está en <c>portage_t</c> debido a que
96 +el usuario que lanzó Portage no está en <c>sysadm_t</c>).
97 +</p>
98 +
99 +<p>
100 +Por favor, compruebe la sección <uri link="#doc_chap2">No se puede
101 +ingresar en el sistema</uri> de arriba en primer lugar. También,
102 +asegúrese de que puede hacer <c>dispatch-conf</c> o <c>etc-update</c>
103 +después de instalar SELinux de modo que se actualice
104 +<path>/etc/pam.d/system-login</path> con las llamadas correctas a
105 +<path>pam_selinux.so</path>.
106 +</p>
107 +
108 +</body>
109 +</subsection>
110 +<subsection>
111 +<title>Forzar la instalacilón</title>
112 +<body>
113 +
114 +<p>
115 +Si necesita forzar a Portage para que continúe a pesar de todo
116 +(por ejemplo, se encontraba en medio de una instalación de SELinux por
117 +lo que no puede resolver esas cuestiones ahora), ejecute la orden
118 +<c>emerge</c> pero con <c>FEATURES="-selinux"</c>. Esto deshabilitará
119 +efectivamente la integración de SELinux en Portage y permitirá continuar
120 +con la instalación del software.
121 +</p>
122 +
123 +<pre caption="Correr emerge sin soporte selinux">
124 +~# <i>FEATURES="-selinux" emerge -u world</i>
125 +</pre>
126 +
127 +<p>
128 +¡Asegúrese de que etiqueta de nuevo todo el sistema de ficheros después
129 +de aplicar este enfoque!. Portage no etiquetará correctamente los ficheros
130 +instalados en el sistema si deshabilita el soporte SELinux. Para etiquetar
131 +de nuevo todo el sistema de ficheros, utilice <c>rlpkg -a -r</c>.
132 +</p>
133 +
134 +</body>
135 +</subsection>
136 +</section>
137 </sections>