| 1 |
# French translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003. |
| 5 |
# Stéphan Rafin <[email protected]>, 2002. |
| 6 |
# Thierry Vignaud <[email protected]>, 1999, 2002. |
| 7 |
# François Micaux, 2002. |
| 8 |
# Alain Portal <[email protected]>, 2003-2008. |
| 9 |
# Jean-Philippe Guérard <[email protected]>, 2005-2006. |
| 10 |
# Jean-Luc Coulon (f5ibh) <[email protected]>, 2006-2007. |
| 11 |
# Julien Cristau <[email protected]>, 2006-2007. |
| 12 |
# Thomas Huriaux <[email protected]>, 2006-2008. |
| 13 |
# Nicolas François <[email protected]>, 2006-2008. |
| 14 |
# Florentin Duneau <[email protected]>, 2006-2010. |
| 15 |
# Simon Paillard <[email protected]>, 2006, 2013. |
| 16 |
# Denis Barbier <[email protected]>, 2006, 2010. |
| 17 |
# David Prévot <[email protected]>, 2010, 2012, 2013. |
| 18 |
# Cédric Boutillier <[email protected]>, 2011, 2012. |
| 19 |
# Frédéric Hantrais <[email protected]>, 2013, 2014. |
| 20 |
# Jean-Paul Guillonneau <[email protected]>, 2021, 2023. |
| 21 |
msgid "" |
| 22 |
msgstr "" |
| 23 |
"Project-Id-Version: manpages-fr\n" |
| 24 |
"POT-Creation-Date: 2026-06-05 06:50+0200\n" |
| 25 |
"PO-Revision-Date: 2023-04-06 07:05+0200\n" |
| 26 |
"Last-Translator: Jean-Paul Guillonneau <[email protected]>\n" |
| 27 |
"Language-Team: French <[email protected]>\n" |
| 28 |
"Language: fr\n" |
| 29 |
"MIME-Version: 1.0\n" |
| 30 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 31 |
"Content-Transfer-Encoding: 8bit\n" |
| 32 |
"Plural-Forms: nplurals=2; plural=n > 1;\n" |
| 33 |
"X-Generator: vim\n" |
| 34 |
|
| 35 |
#. type: TH |
| 36 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 37 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 38 |
#, no-wrap |
| 39 |
msgid "user_namespaces" |
| 40 |
msgstr "user_namespaces" |
| 41 |
|
| 42 |
#. type: TH |
| 43 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 44 |
#: opensuse-tumbleweed |
| 45 |
#, no-wrap |
| 46 |
msgid "2026-02-08" |
| 47 |
msgstr "8 février 2026" |
| 48 |
|
| 49 |
#. type: TH |
| 50 |
#: archlinux debian-unstable |
| 51 |
#, no-wrap |
| 52 |
msgid "Linux man-pages 6.18" |
| 53 |
msgstr "Pages du manuel de Linux 6.18" |
| 54 |
|
| 55 |
#. type: SH |
| 56 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 57 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 58 |
#, no-wrap |
| 59 |
msgid "NAME" |
| 60 |
msgstr "NOM" |
| 61 |
|
| 62 |
#. type: Plain text |
| 63 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 64 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 65 |
msgid "user_namespaces - overview of Linux user namespaces" |
| 66 |
msgstr "" |
| 67 |
"user_namespaces — Présentation des espaces de noms utilisateur sous Linux" |
| 68 |
|
| 69 |
#. type: SH |
| 70 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 71 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 72 |
#, no-wrap |
| 73 |
msgid "DESCRIPTION" |
| 74 |
msgstr "DESCRIPTION" |
| 75 |
|
| 76 |
#. type: Plain text |
| 77 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 78 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 79 |
msgid "For an overview of namespaces, see B<namespaces>(7)." |
| 80 |
msgstr "" |
| 81 |
"Pour une présentation générale des espaces de noms, consultez " |
| 82 |
"B<namespaces>(7)." |
| 83 |
|
| 84 |
# |
| 85 |
#. #-#-#-#-# archlinux: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 86 |
#. FIXME: This page says very little about the interaction |
| 87 |
#. of user namespaces and keys. Add something on this topic. |
| 88 |
#. ============================================================ |
| 89 |
#. type: Plain text |
| 90 |
#. #-#-#-#-# debian-trixie: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 91 |
#. FIXME: This page says very little about the interaction |
| 92 |
#. of user namespaces and keys. Add something on this topic. |
| 93 |
#. ============================================================ |
| 94 |
#. type: Plain text |
| 95 |
#. #-#-#-#-# debian-unstable: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 96 |
#. FIXME: This page says very little about the interaction |
| 97 |
#. of user namespaces and keys. Add something on this topic. |
| 98 |
#. ============================================================ |
| 99 |
#. type: Plain text |
| 100 |
#. #-#-#-#-# fedora-44: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 101 |
#. FIXME: This page says very little about the interaction |
| 102 |
#. of user namespaces and keys. Add something on this topic. |
| 103 |
#. ============================================================ |
| 104 |
#. type: Plain text |
| 105 |
#. #-#-#-#-# fedora-rawhide: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 106 |
#. FIXME: This page says very little about the interaction |
| 107 |
#. of user namespaces and keys. Add something on this topic. |
| 108 |
#. ============================================================ |
| 109 |
#. type: Plain text |
| 110 |
#. #-#-#-#-# mageia-cauldron: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 111 |
#. FIXME: This page says very little about the interaction |
| 112 |
#. of user namespaces and keys. Add something on this topic. |
| 113 |
#. ============================================================ |
| 114 |
#. type: Plain text |
| 115 |
#. #-#-#-#-# opensuse-leap-16-1: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 116 |
#. FIXME: This page says very little about the interaction |
| 117 |
#. of user namespaces and keys. Add something on this topic. |
| 118 |
#. ============================================================ |
| 119 |
#. type: Plain text |
| 120 |
#. #-#-#-#-# opensuse-tumbleweed: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 121 |
#. FIXME: This page says very little about the interaction |
| 122 |
#. of user namespaces and keys. Add something on this topic. |
| 123 |
#. ============================================================ |
| 124 |
#. type: Plain text |
| 125 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 126 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 127 |
msgid "" |
| 128 |
"User namespaces isolate security-related identifiers and attributes, in " |
| 129 |
"particular, user IDs and group IDs (see B<credentials>(7)), the root " |
| 130 |
"directory, keys (see B<keyrings>(7)), and capabilities (see " |
| 131 |
"B<capabilities>(7)). A process's user and group IDs can be different inside " |
| 132 |
"and outside a user namespace. In particular, a process can have a normal " |
| 133 |
"unprivileged user ID outside a user namespace while at the same time having " |
| 134 |
"a user ID of 0 inside the namespace; in other words, the process has full " |
| 135 |
"privileges for operations inside the user namespace, but is unprivileged for " |
| 136 |
"operations outside the namespace." |
| 137 |
msgstr "" |
| 138 |
"Les espaces de noms utilisateur isolent les identifiants et attributs liés à " |
| 139 |
"la sécurité, en particulier les identifiants d'utilisateurs et de groupes " |
| 140 |
"(consultez B<credentials>(7)), le répertoire racine, les clefs (consultez " |
| 141 |
"B<keyctl>(2)) et les capacités (consultez B<capabilities>(7)). Les " |
| 142 |
"identifiants d'utilisateur et de groupe d'un processus peuvent être " |
| 143 |
"différents selon que l'on se trouve à l'intérieur ou à l'extérieur d'un " |
| 144 |
"espace de noms utilisateur. Un processus peut notamment avoir un identifiant " |
| 145 |
"sans privilège particulier en dehors d'un espace de noms et avoir " |
| 146 |
"l'identifiant 0 à l'intérieur d'un espace de noms. Autrement dit, le " |
| 147 |
"processus dispose de tous les privilèges pour des opérations effectuées dans " |
| 148 |
"l'espace de noms, tandis qu'il n'en a aucun pour les opérations réalisées en " |
| 149 |
"dehors de l'espace de noms utilisateur." |
| 150 |
|
| 151 |
#. type: SS |
| 152 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 153 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 154 |
#, no-wrap |
| 155 |
msgid "Nested namespaces, namespace membership" |
| 156 |
msgstr "Espaces de noms imbriqués, appartenance aux espaces de noms" |
| 157 |
|
| 158 |
#. type: Plain text |
| 159 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 160 |
#: opensuse-tumbleweed |
| 161 |
msgid "" |
| 162 |
"User namespaces can be nested; that is, each user namespace \\[em]except the " |
| 163 |
"initial (\"root\") namespace\\[em] has a parent user namespace, and can have " |
| 164 |
"zero or more child user namespaces. The parent user namespace is the user " |
| 165 |
"namespace of the process that creates the user namespace via a call to " |
| 166 |
"B<unshare>(2) or B<clone>(2) with the B<CLONE_NEWUSER> flag." |
| 167 |
msgstr "" |
| 168 |
"Les espaces de noms utilisateur peuvent être imbriqués. Cela signifie que " |
| 169 |
"chaque espace de noms utilisateur \\[em]\\ à l'exception de l'espace de noms " |
| 170 |
"initial (« root »)\\ \\[em] a un espace de noms parent et peut avoir " |
| 171 |
"éventuellement un ou plusieurs espaces de noms utilisateur enfant. L'espace " |
| 172 |
"de noms utilisateur parent est l'espace de noms du processus qui a créé " |
| 173 |
"l'espace de noms utilisateur au moyen de B<unshare>(2) ou de B<clone>(2) " |
| 174 |
"invoqué avec l'attribut B<CLONE_NEWUSER>." |
| 175 |
|
| 176 |
#. commit 8742f229b635bf1c1c84a3dfe5e47c814c20b5c8 |
| 177 |
#. FIXME Explain the rationale for this limit. (What is the rationale?) |
| 178 |
#. type: Plain text |
| 179 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 180 |
#: opensuse-tumbleweed |
| 181 |
msgid "" |
| 182 |
"The kernel imposes (since Linux 3.11) a limit of 32 nested levels of user " |
| 183 |
"namespaces. Calls to B<unshare>(2) or B<clone>(2) that would cause this " |
| 184 |
"limit to be exceeded fail with the error B<EUSERS>." |
| 185 |
msgstr "" |
| 186 |
"Le noyau impose (à partir de Linux 3.11) une limite de 32 niveaux " |
| 187 |
"d'imbrication pour les espaces de noms utilisateur. Si un appel à " |
| 188 |
"B<unshare>(2) ou à B<clone>(2) provoque le dépassement de cette limite, la " |
| 189 |
"commande échoue en renvoyant l'erreur B<EUSERS>." |
| 190 |
|
| 191 |
#. type: Plain text |
| 192 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 193 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 194 |
msgid "" |
| 195 |
"Each process is a member of exactly one user namespace. A process created " |
| 196 |
"via B<fork>(2) or B<clone>(2) without the B<CLONE_NEWUSER> flag is a " |
| 197 |
"member of the same user namespace as its parent. A single-threaded process " |
| 198 |
"can join another user namespace with B<setns>(2) if it has the " |
| 199 |
"B<CAP_SYS_ADMIN> in that namespace; upon doing so, it gains a full set of " |
| 200 |
"capabilities in that namespace." |
| 201 |
msgstr "" |
| 202 |
"Chaque processus est membre d'exactement un espace de noms utilisateur. Un " |
| 203 |
"processus créé par B<fork>(2) ou par B<clone>(2) sans l'attribut " |
| 204 |
"B<CLONE_NEWUSER> est membre du même espace de noms que son processus parent. " |
| 205 |
"Un processus mono-threadé peut rejoindre un autre espace de noms en " |
| 206 |
"utilisant B<setns>(2) s'il dispose de la capacité B<CAP_SYS_ADMIN> dans cet " |
| 207 |
"espace de noms ; cette action lui octroie un ensemble de capacités dans cet " |
| 208 |
"espace de noms." |
| 209 |
|
| 210 |
# |
| 211 |
#. type: Plain text |
| 212 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 213 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 214 |
msgid "" |
| 215 |
"A call to B<clone>(2) or B<unshare>(2) with the B<CLONE_NEWUSER> flag " |
| 216 |
"makes the new child process (for B<clone>(2)) or the caller (for " |
| 217 |
"B<unshare>(2)) a member of the new user namespace created by the call." |
| 218 |
msgstr "" |
| 219 |
"Un appel à B<clone>(2) ou à B<unshare>(2) avec l'attribut B<CLONE_NEWUSER> " |
| 220 |
"place le nouveau processus enfant (pour B<clone>(2)) ou l'appelant (pour " |
| 221 |
"B<unshare>(2)) dans le nouvel espace de noms utilisateur créé par l'appel." |
| 222 |
|
| 223 |
# |
| 224 |
#. type: Plain text |
| 225 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 226 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 227 |
msgid "" |
| 228 |
"The B<NS_GET_PARENT> B<ioctl>(2) operation can be used to discover the " |
| 229 |
"parental relationship between user namespaces; see B<ioctl_nsfs>(2)." |
| 230 |
msgstr "" |
| 231 |
"L’opération B<ioctl>(2) B<NS_GET_PARENT> peut être utilisée pour découvrir " |
| 232 |
"les relations de parenté entre les espaces de noms utilisateur. Consultez " |
| 233 |
"B<ioctl_nsfs>(2)." |
| 234 |
|
| 235 |
# |
| 236 |
#. ============================================================ |
| 237 |
#. type: Plain text |
| 238 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 239 |
#: opensuse-tumbleweed |
| 240 |
msgid "" |
| 241 |
"A task that changes one of its effective IDs will have its dumpability reset " |
| 242 |
"to the value in I</proc/sys/fs/suid_dumpable>. This may affect the " |
| 243 |
"ownership of proc files of child processes and may thus cause the parent to " |
| 244 |
"lack the permissions to write to mapping files of child processes running in " |
| 245 |
"a new user namespace. In such cases, making the parent process dumpable, " |
| 246 |
"using B<PR_SET_DUMPABLE> in a call to B<prctl>(2), before creating a child " |
| 247 |
"process in a new user namespace may rectify this problem. See B<prctl>(2) " |
| 248 |
"and B<proc>(5) for details on how ownership is affected." |
| 249 |
msgstr "" |
| 250 |
|
| 251 |
#. type: SS |
| 252 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 253 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 254 |
#, no-wrap |
| 255 |
msgid "Capabilities" |
| 256 |
msgstr "Capacités" |
| 257 |
|
| 258 |
#. type: Plain text |
| 259 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 260 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 261 |
msgid "" |
| 262 |
"The child process created by B<clone>(2) with the B<CLONE_NEWUSER> flag " |
| 263 |
"starts out with a complete set of capabilities in the new user namespace. " |
| 264 |
"Likewise, a process that creates a new user namespace using B<unshare>(2) " |
| 265 |
"or joins an existing user namespace using B<setns>(2) gains a full set of " |
| 266 |
"capabilities in that namespace. On the other hand, that process has no " |
| 267 |
"capabilities in the parent (in the case of B<clone>(2)) or previous (in the " |
| 268 |
"case of B<unshare>(2) and B<setns>(2)) user namespace, even if the new " |
| 269 |
"namespace is created or joined by the root user (i.e., a process with user " |
| 270 |
"ID 0 in the root namespace)." |
| 271 |
msgstr "" |
| 272 |
"Le processus enfant créé par B<clone>(2) avec l'attribut B<CLONE_NEWUSER> " |
| 273 |
"s’initialise avec un nouvel ensemble de capacités dans le nouvel espace de " |
| 274 |
"noms utilisateur. De même, un processus qui crée un nouvel espace de noms au " |
| 275 |
"moyen de B<unshare>(2) ou qui rejoint un espace de noms existant à l’aide de " |
| 276 |
"B<setns>(2) reçoit un ensemble de capacités dans cet espace de noms. D’un " |
| 277 |
"autre côté, le processus n’a aucune capacité dans le parent (dans le cas de " |
| 278 |
"B<clone>(2)) ou dans le précédent espace de noms utilisateur (dans le cas de " |
| 279 |
"B<unshare>(2) et B<setns>(2)), même si le nouvel espace de noms utilisateur " |
| 280 |
"est créé ou rejoint par l’utilisateur racine (c’est-à-dire un processus avec " |
| 281 |
"l’ID utilisateur 0 dans l’espace de noms racine)." |
| 282 |
|
| 283 |
#. type: Plain text |
| 284 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 285 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 286 |
msgid "" |
| 287 |
"Note that a call to B<execve>(2) will cause a process's capabilities to be " |
| 288 |
"recalculated in the usual way (see B<capabilities>(7)). Consequently, " |
| 289 |
"unless the process has a user ID of 0 within the namespace, or the " |
| 290 |
"executable file has a nonempty inheritable capabilities mask, the process " |
| 291 |
"will lose all capabilities. See the discussion of user and group ID " |
| 292 |
"mappings, below." |
| 293 |
msgstr "" |
| 294 |
"Remarquez qu'un appel à B<execve>(2) déclenche la réévaluation des capacités " |
| 295 |
"selon la méthode habituelle (consultez B<capabilities>(7)), de sorte que le " |
| 296 |
"processus perdra ses capacités, sauf si son identifiant utilisateur vaut 0 " |
| 297 |
"dans l'espace de noms ou si le fichier exécutable a un masque de capacités " |
| 298 |
"héritable non vide. Pour en savoir plus, consultez les commentaires sur le " |
| 299 |
"mappage entre utilisateurs et groupes ci-dessous." |
| 300 |
|
| 301 |
#. type: Plain text |
| 302 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 303 |
#: opensuse-tumbleweed |
| 304 |
msgid "" |
| 305 |
"A call to B<clone>(2) or B<unshare>(2) using the B<CLONE_NEWUSER> flag or " |
| 306 |
"a call to B<setns>(2) that moves the caller into another user namespace " |
| 307 |
"sets the \"securebits\" flags (see B<capabilities>(7)) to their default " |
| 308 |
"values (all flags disabled) in the child (for B<clone>(2)) or caller (for " |
| 309 |
"B<unshare>(2) or B<setns>(2)). Note that because the caller no longer has " |
| 310 |
"capabilities in its original user namespace after a call to B<setns>(2), it " |
| 311 |
"is not possible for a process to reset its \"securebits\" flags while " |
| 312 |
"retaining its user namespace membership by using a pair of B<setns>(2) " |
| 313 |
"calls to move to another user namespace and then return to its original user " |
| 314 |
"namespace." |
| 315 |
msgstr "" |
| 316 |
"Un appel à B<clone>(2) ou B<unshare>(2) en utilisant l'attribut " |
| 317 |
"B<CLONE_NEWUSER> ou un appel à B<setns>(2) qui déplace l’appelant dans " |
| 318 |
"d’autres jeux d’espaces de noms utilisateur positionne les indicateurs " |
| 319 |
"« securebits » (consultez B<capabilities>(7)) à leurs valeurs par défaut " |
| 320 |
"(tous les indicateurs désactivés) dans l’enfant (pour B<clone>(2)) ou " |
| 321 |
"l’appelant (pour B<unshare>(2) ou B<setns>(2)). Remarquez que parce que " |
| 322 |
"l’appelant n’a plus de capacités dans son espace de noms utilisateur après " |
| 323 |
"un appel à B<setns>(2), il n’est pas possible à un processus de " |
| 324 |
"réinitialiser ses indicateurs « securebits » tout en conservant son " |
| 325 |
"appartenance à un espace de noms utilisateur en utilisant une paire d’appels " |
| 326 |
"B<setns>(2) pour se déplacer vers un autre espace de noms utilisateur et " |
| 327 |
"ensuite retourner vers son espace de noms utilisateur original." |
| 328 |
|
| 329 |
#. type: Plain text |
| 330 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 331 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 332 |
msgid "" |
| 333 |
"The rules for determining whether or not a process has a capability in a " |
| 334 |
"particular user namespace are as follows:" |
| 335 |
msgstr "" |
| 336 |
"Les règles pour déterminer si un processus a ou n’a pas de capacités dans un " |
| 337 |
"espace de noms utilisateur particulier sont comme suit :" |
| 338 |
|
| 339 |
#. type: IP |
| 340 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 341 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 342 |
#, no-wrap |
| 343 |
msgid "\\[bu]" |
| 344 |
msgstr "-" |
| 345 |
|
| 346 |
#. In the 3.8 sources, see security/commoncap.c::cap_capable(): |
| 347 |
#. type: Plain text |
| 348 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 349 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 350 |
msgid "" |
| 351 |
"A process has a capability inside a user namespace if it is a member of that " |
| 352 |
"namespace and it has the capability in its effective capability set. A " |
| 353 |
"process can gain capabilities in its effective capability set in various " |
| 354 |
"ways. For example, it may execute a set-user-ID program or an executable " |
| 355 |
"with associated file capabilities. In addition, a process may gain " |
| 356 |
"capabilities via the effect of B<clone>(2), B<unshare>(2), or B<setns>(2), " |
| 357 |
"as already described." |
| 358 |
msgstr "" |
| 359 |
"Un processus dispose d'une capacité dans un espace de noms utilisateur s'il " |
| 360 |
"est membre de cet espace de noms et si cette capacité est activée dans son " |
| 361 |
"jeu de capacités. Un processus peut obtenir une nouvelle capacité dans son " |
| 362 |
"jeu de capacités de plusieurs façons. Il peut, par exemple, exécuter un " |
| 363 |
"programme set-user-ID ou un exécutable avec des capacités de fichier " |
| 364 |
"associées. Il peut également obtenir des capacités à l’aide de l'action de " |
| 365 |
"B<clone>(2), B<unshare>(2) ou B<setns>(2) comme indiqué précédemment." |
| 366 |
|
| 367 |
#. type: Plain text |
| 368 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 369 |
#: opensuse-tumbleweed |
| 370 |
msgid "" |
| 371 |
"If a process has a capability in a user namespace, then it has that " |
| 372 |
"capability in all child (and further removed descendant) namespaces as well." |
| 373 |
msgstr "" |
| 374 |
"Si un processus dispose d'une capacité dans un espace de noms utilisateur, " |
| 375 |
"alors il a cette même capacité dans tous les espaces de noms enfant (et les " |
| 376 |
"espaces descendants supprimés)." |
| 377 |
|
| 378 |
# |
| 379 |
#. * The owner of the user namespace in the parent of the |
| 380 |
#. * user namespace has all caps. |
| 381 |
#. (and likewise associates the effective group ID of the creating process |
| 382 |
#. with the namespace). |
| 383 |
#. See kernel commit 520d9eabce18edfef76a60b7b839d54facafe1f9 for a fix |
| 384 |
#. on this point |
| 385 |
#. This includes the case where the process executes a set-user-ID |
| 386 |
#. program that confers the effective UID of the creator of the namespace. |
| 387 |
#. ============================================================ |
| 388 |
#. type: Plain text |
| 389 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 390 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 391 |
msgid "" |
| 392 |
"When a user namespace is created, the kernel records the effective user ID " |
| 393 |
"of the creating process as being the \"owner\" of the namespace. A process " |
| 394 |
"that resides in the parent of the user namespace and whose effective user ID " |
| 395 |
"matches the owner of the namespace has all capabilities in the namespace. " |
| 396 |
"By virtue of the previous rule, this means that the process has all " |
| 397 |
"capabilities in all further removed descendant user namespaces as well. The " |
| 398 |
"B<NS_GET_OWNER_UID> B<ioctl>(2) operation can be used to discover the user " |
| 399 |
"ID of the owner of the namespace; see B<ioctl_nsfs>(2)." |
| 400 |
msgstr "" |
| 401 |
"Lorsqu'un espace de noms est créé, le noyau enregistre l'identifiant " |
| 402 |
"utilisateur effectif du processus de création comme étant le " |
| 403 |
"« propriétaire » de l'espace de noms. Un processus qui se trouve dans le " |
| 404 |
"parent d'un espace de noms utilisateur et qui a un identifiant utilisateur " |
| 405 |
"effectif qui correspond au propriétaire de l'espace de noms dispose de " |
| 406 |
"toutes les capacités dans cet espace de noms. En vertu de la règle " |
| 407 |
"précédente, cela signifie que ce processus a également toutes les capacités " |
| 408 |
"dans tous les descendants supprimés de cet espace de noms. L’opération " |
| 409 |
"B<NS_GET_OWNER_UID> d’B<ioctl>(2) peut être utilisée pour découvrir l’ID " |
| 410 |
"d’utilisateur du propriétaire de l’espace de noms. Consultez " |
| 411 |
"B<ioctl_nsfs>(2)." |
| 412 |
|
| 413 |
#. type: SS |
| 414 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 415 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 416 |
#, no-wrap |
| 417 |
msgid "Effect of capabilities within a user namespace" |
| 418 |
msgstr "Effet des capacités à l’intérieur d’un espace de noms utilisateur" |
| 419 |
|
| 420 |
#. type: Plain text |
| 421 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 422 |
#: opensuse-tumbleweed |
| 423 |
msgid "" |
| 424 |
"Having a capability inside a user namespace permits a process to perform " |
| 425 |
"operations (that require privilege) only on resources governed by that " |
| 426 |
"namespace. In other words, having a capability in a user namespace permits " |
| 427 |
"a process to perform privileged operations on resources that are governed by " |
| 428 |
"(nonuser) namespaces owned by (associated with) the user namespace (see the " |
| 429 |
"next subsection)." |
| 430 |
msgstr "" |
| 431 |
"Un processus qui possède des capacités dans un espace de noms utilisateur a " |
| 432 |
"la possibilité d'effectuer des opérations (nécessitant des privilèges) " |
| 433 |
"seulement sur les ressources gérées par cet espace de noms. En d’autres " |
| 434 |
"mots, avoir une capacité dans un espace de noms permet à un processus de " |
| 435 |
"réaliser des opérations privilégiées sur des ressources gérées par des " |
| 436 |
"espaces de noms (non utilisateur) possédés par (associés avec) l’espace de " |
| 437 |
"noms utilisateur (consultez la sous-section suivante)." |
| 438 |
|
| 439 |
#. type: Plain text |
| 440 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 441 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 442 |
msgid "" |
| 443 |
"On the other hand, there are many privileged operations that affect " |
| 444 |
"resources that are not associated with any namespace type, for example, " |
| 445 |
"changing the system (i.e., calendar) time (governed by B<CAP_SYS_TIME>), " |
| 446 |
"loading a kernel module (governed by B<CAP_SYS_MODULE>), and creating a " |
| 447 |
"device (governed by B<CAP_MKNOD>). Only a process with privileges in the " |
| 448 |
"I<initial> user namespace can perform such operations." |
| 449 |
msgstr "" |
| 450 |
"D’un autre coté, il existe beaucoup d’opérations privilégiées affectant les " |
| 451 |
"ressources qui ne sont associées à aucun type d’espace de noms, par exemple, " |
| 452 |
"modifier l’heure du système (c’est-à-dire le calendrier) (régi par " |
| 453 |
"B<CAP_SYS_TIME>), charger un module du noyau (régi par B<CAP_SYS_MODULE>) et " |
| 454 |
"créer un périphérique (régi par B<CAP_MKNOD>). Seuls les processus avec " |
| 455 |
"privilèges dans l’espace de noms I<initial> peuvent réaliser de telles " |
| 456 |
"opérations." |
| 457 |
|
| 458 |
#. fs_flags = FS_USERNS_MOUNT in kernel sources |
| 459 |
#. type: Plain text |
| 460 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 461 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 462 |
msgid "" |
| 463 |
"Holding B<CAP_SYS_ADMIN> within the user namespace that owns a process's " |
| 464 |
"mount namespace allows that process to create bind mounts and mount the " |
| 465 |
"following types of filesystems:" |
| 466 |
msgstr "" |
| 467 |
"Avoir B<CAP_SYS_ADMIN> dans un espace de noms utilisateur qui possède un " |
| 468 |
"espace de noms de montage de processus permet à ce processus de créer des " |
| 469 |
"remontages (bind mount) et de monter les types suivants de système de " |
| 470 |
"fichiers :" |
| 471 |
|
| 472 |
#. type: Plain text |
| 473 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 474 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 475 |
msgid "I</proc> (since Linux 3.8)" |
| 476 |
msgstr "I</proc/> (depuis Linux 3.8)" |
| 477 |
|
| 478 |
#. type: Plain text |
| 479 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 480 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 481 |
msgid "I</sys> (since Linux 3.8)" |
| 482 |
msgstr "I</sys> (depuis Linux 3.8)" |
| 483 |
|
| 484 |
#. type: Plain text |
| 485 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 486 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 487 |
msgid "I<devpts> (since Linux 3.9)" |
| 488 |
msgstr "I<devpts> (depuis Linux 3.9)" |
| 489 |
|
| 490 |
#. type: Plain text |
| 491 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 492 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 493 |
msgid "B<tmpfs>(5) (since Linux 3.9)" |
| 494 |
msgstr "B<tmpfs>(5) (depuis Linux 3.9)" |
| 495 |
|
| 496 |
#. type: Plain text |
| 497 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 498 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 499 |
msgid "I<ramfs> (since Linux 3.9)" |
| 500 |
msgstr "I<ramfs> (depuis Linux 3.9)" |
| 501 |
|
| 502 |
#. type: Plain text |
| 503 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 504 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 505 |
msgid "I<mqueue> (since Linux 3.9)" |
| 506 |
msgstr "I<mqueue> (depuis Linux 3.9)" |
| 507 |
|
| 508 |
#. commit b2197755b2633e164a439682fb05a9b5ea48f706 |
| 509 |
#. type: Plain text |
| 510 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 511 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 512 |
msgid "I<bpf> (since Linux 4.4)" |
| 513 |
msgstr "I<bpf> (depuis Linux 4.4)" |
| 514 |
|
| 515 |
#. commit 92dbc9dedccb9759c7f9f2f0ae6242396376988f |
| 516 |
#. commit 4cb2c00c43b3fe88b32f29df4f76da1b92c33224 |
| 517 |
#. type: Plain text |
| 518 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 519 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 520 |
msgid "I<overlayfs> (since Linux 5.11)" |
| 521 |
msgstr "I<overlayfs> (depuis Linux 5.11)" |
| 522 |
|
| 523 |
#. type: Plain text |
| 524 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 525 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 526 |
msgid "" |
| 527 |
"Holding B<CAP_SYS_ADMIN> within the user namespace that owns a process's " |
| 528 |
"cgroup namespace allows (since Linux 4.6) that process to mount the cgroup " |
| 529 |
"version 2 filesystem and cgroup version 1 named hierarchies (i.e., cgroup " |
| 530 |
"filesystems mounted with the I<\\[dq]none,name=\\[dq]> option)." |
| 531 |
msgstr "" |
| 532 |
"Avoir B<CAP_SYS_ADMIN> dans l’espace de noms utilisateur qui possède un " |
| 533 |
"espace de noms cgroup de processus permet (depuis Linux 4.6) à ce processus " |
| 534 |
"de monter un système de fichiers cgroup version 2 ou cgroup version 1 " |
| 535 |
"appelés hiérarchies (c’est-à-dire des systèmes de fichiers cgroup avec " |
| 536 |
"l’option « I<none,name=> »)." |
| 537 |
|
| 538 |
#. type: Plain text |
| 539 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 540 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 541 |
msgid "" |
| 542 |
"Holding B<CAP_SYS_ADMIN> within the user namespace that owns a process's PID " |
| 543 |
"namespace allows (since Linux 3.8) that process to mount I</proc> " |
| 544 |
"filesystems." |
| 545 |
msgstr "" |
| 546 |
"Avoir B<CAP_SYS_ADMIN> dans un espace de noms utilisateur qui possède un " |
| 547 |
"espace de noms PID de processus permet (depuis Linux 3.8) à ce processus de " |
| 548 |
"monter des systèmes de fichiers I</proc>." |
| 549 |
|
| 550 |
# |
| 551 |
#. ============================================================ |
| 552 |
#. type: Plain text |
| 553 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 554 |
#: opensuse-tumbleweed |
| 555 |
msgid "" |
| 556 |
"However, mounting block-based filesystems can be done only by a process that " |
| 557 |
"holds B<CAP_SYS_ADMIN> in the initial user namespace." |
| 558 |
msgstr "" |
| 559 |
"Cependant le montage de systèmes de fichiers basés sur les blocs peut être " |
| 560 |
"réalisé seulement par un processus ayant B<CAP_SYS_ADMIN> dans l’espace de " |
| 561 |
"noms utilisateur initial." |
| 562 |
|
| 563 |
#. type: SS |
| 564 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 565 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 566 |
#, no-wrap |
| 567 |
msgid "Interaction of user namespaces and other types of namespaces" |
| 568 |
msgstr "Liens entre les espaces de noms utilisateur et les autres espaces de noms" |
| 569 |
|
| 570 |
#. type: Plain text |
| 571 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 572 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 573 |
msgid "" |
| 574 |
"Since Linux 3.8, unprivileged processes can create user namespaces, and the " |
| 575 |
"other types of namespaces can be created with just the B<CAP_SYS_ADMIN> " |
| 576 |
"capability in the caller's user namespace." |
| 577 |
msgstr "" |
| 578 |
"À partir de Linux 3.8, les processus sans privilèges peuvent créer des " |
| 579 |
"espaces de noms utilisateur et les autres espaces de noms peuvent être créés " |
| 580 |
"avec simplement la capacité B<CAP_SYS_ADMIN> dans l'espace de noms " |
| 581 |
"utilisateur de l'appelant." |
| 582 |
|
| 583 |
#. type: Plain text |
| 584 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 585 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 586 |
msgid "" |
| 587 |
"When a nonuser namespace is created, it is owned by the user namespace in " |
| 588 |
"which the creating process was a member at the time of the creation of the " |
| 589 |
"namespace. Privileged operations on resources governed by the nonuser " |
| 590 |
"namespace require that the process has the necessary capabilities in the " |
| 591 |
"user namespace that owns the nonuser namespace." |
| 592 |
msgstr "" |
| 593 |
"Lorsqu'un espace de noms autre qu'utilisateur est créé, il appartient à " |
| 594 |
"l'espace de noms utilisateur auquel appartenait à ce moment là le processus " |
| 595 |
"à l'origine de la création de cet espace de noms. Les opérations " |
| 596 |
"privilégiées sur des ressources régies par un espace de noms non utilisateur " |
| 597 |
"nécessitent que le processus aient les capacités requises dans l’espace de " |
| 598 |
"noms utilisateur qui possède l’espace de noms non utilisateur." |
| 599 |
|
| 600 |
#. type: Plain text |
| 601 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 602 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 603 |
msgid "" |
| 604 |
"If B<CLONE_NEWUSER> is specified along with other B<CLONE_NEW*> flags in a " |
| 605 |
"single B<clone>(2) or B<unshare>(2) call, the user namespace is guaranteed " |
| 606 |
"to be created first, giving the child (B<clone>(2)) or caller " |
| 607 |
"(B<unshare>(2)) privileges over the remaining namespaces created by the " |
| 608 |
"call. Thus, it is possible for an unprivileged caller to specify this " |
| 609 |
"combination of flags." |
| 610 |
msgstr "" |
| 611 |
"Si B<CLONE_NEWUSER> est indiqué en complément de l'attribut B<CLONE_NEW*> " |
| 612 |
"lors d'un appel simple à B<clone>(2) ou à B<unshare>(2), l'espace de noms " |
| 613 |
"utilisateur est garanti d'être créé en premier. Cela donne des privilèges à " |
| 614 |
"l’enfant (dans le cas de B<clone>(2)) ou à l'appelant (dans le cas de " |
| 615 |
"B<unshare>(2)) dans les espaces de noms subsistants créés par l'appel. Il " |
| 616 |
"est ainsi possible à un appelant sans privilèges d'indiquer ce jeu " |
| 617 |
"d'attributs." |
| 618 |
|
| 619 |
# |
| 620 |
#. type: Plain text |
| 621 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 622 |
#: opensuse-tumbleweed |
| 623 |
msgid "" |
| 624 |
"When a new namespace (other than a user namespace) is created via " |
| 625 |
"B<clone>(2) or B<unshare>(2), the kernel records the user namespace of the " |
| 626 |
"creating process as the owner of the new namespace. (This association can't " |
| 627 |
"be changed.) When a process in the new namespace subsequently performs " |
| 628 |
"privileged operations that operate on global resources isolated by the " |
| 629 |
"namespace, the permission checks are performed according to the process's " |
| 630 |
"capabilities in the user namespace that the kernel associated with the new " |
| 631 |
"namespace. For example, suppose that a process attempts to change the " |
| 632 |
"hostname (B<sethostname>(2)), a resource governed by the UTS namespace. In " |
| 633 |
"this case, the kernel will determine which user namespace owns the process's " |
| 634 |
"UTS namespace, and check whether the process has the required capability " |
| 635 |
"(B<CAP_SYS_ADMIN>) in that user namespace." |
| 636 |
msgstr "" |
| 637 |
"Lorsqu'un nouvel espace de noms (autre qu’un espace de noms utilisateur) est " |
| 638 |
"créé à l’aide de B<clone>(2) ou B<unshare>(2), le noyau enregistre l'espace " |
| 639 |
"de noms utilisateur du processus créateur comme le propriétaire du nouvel " |
| 640 |
"espace de noms. (Cette association ne peut pas être changée). Lorsqu'un " |
| 641 |
"processus du nouvel espace de noms effectue ensuite une opération " |
| 642 |
"privilégiée sur une ressource globale isolée par l'espace de noms, les " |
| 643 |
"vérifications de permissions sont réalisées en fonction des capacités du " |
| 644 |
"processus dans l'espace de noms utilisateur que le noyau a associé au nouvel " |
| 645 |
"espace de noms. Par exemple, supposons qu’un processus essaie de modifier le " |
| 646 |
"nom d’hôte (B<sethostname>(2)), une ressource régie par l’espace de noms " |
| 647 |
"UTS. Dans ce cas le noyau déterminera quel espace de noms utilisateur " |
| 648 |
"possède l’espace de noms UTS du processus et vérifiera si le processus à la " |
| 649 |
"capacité requise (B<CAP_SYS_ADMIN>) dans cet espace de noms utilisateur." |
| 650 |
|
| 651 |
# |
| 652 |
#. ============================================================ |
| 653 |
#. type: Plain text |
| 654 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 655 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 656 |
msgid "" |
| 657 |
"The B<NS_GET_USERNS> B<ioctl>(2) operation can be used to discover the user " |
| 658 |
"namespace that owns a nonuser namespace; see B<ioctl_nsfs>(2)." |
| 659 |
msgstr "" |
| 660 |
"L’opération B<NS_GET_USERNS> d’B<ioctl>(2) peut être utilisée pour découvrir " |
| 661 |
"l’espace de noms utilisateur possédant l’espace de noms non utilisateur. " |
| 662 |
"Consultez B<ioctl_nsfs>(2)." |
| 663 |
|
| 664 |
#. type: SS |
| 665 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 666 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 667 |
#, no-wrap |
| 668 |
msgid "User and group ID mappings: uid_map and gid_map" |
| 669 |
msgstr "Correspondance des identifiants d'utilisateur et de groupe : uid_map et gid_map" |
| 670 |
|
| 671 |
#. commit 22d917d80e842829d0ca0a561967d728eb1d6303 |
| 672 |
#. type: Plain text |
| 673 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 674 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 675 |
msgid "" |
| 676 |
"When a user namespace is created, it starts out without a mapping of user " |
| 677 |
"IDs (group IDs) to the parent user namespace. The I</proc/>pidI</uid_map> " |
| 678 |
"and I</proc/>pidI</gid_map> files (available since Linux 3.5) expose the " |
| 679 |
"mappings for user and group IDs inside the user namespace for the process " |
| 680 |
"I<pid>. These files can be read to view the mappings in a user namespace " |
| 681 |
"and written to (once) to define the mappings." |
| 682 |
msgstr "" |
| 683 |
"Lorsqu'un espace de noms utilisateur est créé, il s'initialise sans établir " |
| 684 |
"de mappage entre ses identifiants utilisateurs (identifiants de groupes) et " |
| 685 |
"ceux de l'espace de noms parent. Les fichiers I</proc/>pidI</uid_map> et I</" |
| 686 |
"proc/>pidI</gid_map> présentent (à partir de Linux 3.5) le mappage entre " |
| 687 |
"identifiants utilisateur et groupe à l'intérieur de l'espace de noms " |
| 688 |
"utilisateur pour le processus I<pid>. Ces fichiers peuvent être consultés " |
| 689 |
"pour prendre connaissance des mappages dans un espace de noms utilisateur et " |
| 690 |
"peuvent être modifiés (une seule fois) pour définir les mappages." |
| 691 |
|
| 692 |
#. type: Plain text |
| 693 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 694 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 695 |
msgid "" |
| 696 |
"The description in the following paragraphs explains the details for " |
| 697 |
"I<uid_map>; I<gid_map> is exactly the same, but each instance of \"user ID\" " |
| 698 |
"is replaced by \"group ID\"." |
| 699 |
msgstr "" |
| 700 |
"Les paragraphes suivants décrivent I<uid_map> en détails. I<gid_map> est " |
| 701 |
"parfaitement analogue, chaque instance de « identifiant utilisateur » étant " |
| 702 |
"remplacée par « identifiant groupe »." |
| 703 |
|
| 704 |
#. type: Plain text |
| 705 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 706 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 707 |
msgid "" |
| 708 |
"The I<uid_map> file exposes the mapping of user IDs from the user namespace " |
| 709 |
"of the process I<pid> to the user namespace of the process that opened " |
| 710 |
"I<uid_map> (but see a qualification to this point below). In other words, " |
| 711 |
"processes that are in different user namespaces will potentially see " |
| 712 |
"different values when reading from a particular I<uid_map> file, depending " |
| 713 |
"on the user ID mappings for the user namespaces of the reading processes." |
| 714 |
msgstr "" |
| 715 |
"Le fichier I<uid_map> présente le mappage entre les identifiants utilisateur " |
| 716 |
"de l'espace de noms utilisateur du processus I<pid> et ceux de l'espace de " |
| 717 |
"noms utilisateur du processus qui a ouvert I<uid_map> (mais consultez la " |
| 718 |
"réserve concernant ce point exposée ci-dessous). En d'autres termes, des " |
| 719 |
"processus qui se trouvent dans différents espaces de noms verront des " |
| 720 |
"valeurs différentes lors de la lecture d'un fichier I<uid_map> selon les " |
| 721 |
"mappages des identifiants utilisateur pour l'espace de noms utilisateur du " |
| 722 |
"processus qui effectue la lecture." |
| 723 |
|
| 724 |
#. type: Plain text |
| 725 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 726 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 727 |
msgid "" |
| 728 |
"Each line in the I<uid_map> file specifies a 1-to-1 mapping of a range of " |
| 729 |
"contiguous user IDs between two user namespaces. (When a user namespace is " |
| 730 |
"first created, this file is empty.) The specification in each line takes " |
| 731 |
"the form of three numbers delimited by white space. The first two numbers " |
| 732 |
"specify the starting user ID in each of the two user namespaces. The third " |
| 733 |
"number specifies the size of the mapped range. In detail, the fields are " |
| 734 |
"interpreted as follows:" |
| 735 |
msgstr "" |
| 736 |
"Chaque ligne du fichier I<uid_map> affiche un mappage un-pour-un d'un " |
| 737 |
"intervalle d'identifiants utilisateur contigus de deux espaces de noms " |
| 738 |
"utilisateur. Lorsqu'un espace de noms utilisateur vient d'être créé, ce " |
| 739 |
"fichier est vide. Chaque ligne contient trois nombres délimités par des " |
| 740 |
"espaces. Les deux premiers nombres indiquent les premiers identifiants " |
| 741 |
"utilisateur de chacun des deux espaces de noms. Le troisième nombre indique " |
| 742 |
"la taille de l'intervalle de mappage. Plus précisément, les champs sont " |
| 743 |
"interprétés de la façon suivante :" |
| 744 |
|
| 745 |
#. type: IP |
| 746 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 747 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 748 |
#, no-wrap |
| 749 |
msgid "(1)" |
| 750 |
msgstr "(1)" |
| 751 |
|
| 752 |
#. type: Plain text |
| 753 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 754 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 755 |
msgid "" |
| 756 |
"The start of the range of user IDs in the user namespace of the process " |
| 757 |
"I<pid>." |
| 758 |
msgstr "" |
| 759 |
"Le début de l'intervalle d'identifiants utilisateur dans l'espace de noms " |
| 760 |
"utilisateur du processus I<pid>." |
| 761 |
|
| 762 |
#. type: IP |
| 763 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 764 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 765 |
#, no-wrap |
| 766 |
msgid "(2)" |
| 767 |
msgstr "(2)" |
| 768 |
|
| 769 |
#. type: Plain text |
| 770 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 771 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 772 |
msgid "" |
| 773 |
"The start of the range of user IDs to which the user IDs specified by field " |
| 774 |
"one map. How field two is interpreted depends on whether the process that " |
| 775 |
"opened I<uid_map> and the process I<pid> are in the same user namespace, as " |
| 776 |
"follows:" |
| 777 |
msgstr "" |
| 778 |
"Le début de l'intervalle d'identifiants utilisateur auquel mappe " |
| 779 |
"l'identifiant utilisateur indiqué dans le premier champ. Selon que le " |
| 780 |
"processus qui a ouvert le fichier I<uid_map> et le processus I<pid> sont ou " |
| 781 |
"non dans le même espace de noms, le deuxième champ est interprété de l'une " |
| 782 |
"des façons suivantes :" |
| 783 |
|
| 784 |
#. type: IP |
| 785 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 786 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 787 |
#, no-wrap |
| 788 |
msgid "(a)" |
| 789 |
msgstr "(a)" |
| 790 |
|
| 791 |
#. type: Plain text |
| 792 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 793 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 794 |
msgid "" |
| 795 |
"If the two processes are in different user namespaces: field two is the " |
| 796 |
"start of a range of user IDs in the user namespace of the process that " |
| 797 |
"opened I<uid_map>." |
| 798 |
msgstr "" |
| 799 |
"Si les deux processus sont dans différents espaces de noms utilisateur : le " |
| 800 |
"deuxième champ est le début de l'intervalle d'identifiants utilisateur dans " |
| 801 |
"l'espace de noms utilisateur du processus qui a ouvert I<uid_map>." |
| 802 |
|
| 803 |
#. type: IP |
| 804 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 805 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 806 |
#, no-wrap |
| 807 |
msgid "(b)" |
| 808 |
msgstr "(b)" |
| 809 |
|
| 810 |
#. type: Plain text |
| 811 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 812 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 813 |
msgid "" |
| 814 |
"If the two processes are in the same user namespace: field two is the start " |
| 815 |
"of the range of user IDs in the parent user namespace of the process " |
| 816 |
"I<pid>. This case enables the opener of I<uid_map> (the common case here is " |
| 817 |
"opening I</proc/self/uid_map>) to see the mapping of user IDs into the user " |
| 818 |
"namespace of the process that created this user namespace." |
| 819 |
msgstr "" |
| 820 |
"Si les deux processus sont dans le même espace de noms utilisateur : le " |
| 821 |
"second champ correspond au début de la séquence d'identifiants utilisateur " |
| 822 |
"dans l'espace de noms utilisateur parent du processus I<pid>. Cela permet au " |
| 823 |
"processus qui a ouvert I<uid_map> (généralement, le processus ouvre I</proc/" |
| 824 |
"self/uid_map>) de voir le mappage des identifiants utilisateur dans l'espace " |
| 825 |
"de noms utilisateur du processus qui a créé cet espace de noms utilisateur." |
| 826 |
|
| 827 |
#. type: IP |
| 828 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 829 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 830 |
#, no-wrap |
| 831 |
msgid "(3)" |
| 832 |
msgstr "(3)" |
| 833 |
|
| 834 |
#. type: Plain text |
| 835 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 836 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 837 |
msgid "" |
| 838 |
"The size of the range of user IDs that is mapped between the two user " |
| 839 |
"namespaces." |
| 840 |
msgstr "" |
| 841 |
"La taille de l'intervalle des identifiants utilisateur qui est mappé entre " |
| 842 |
"les deux espaces de noms utilisateur." |
| 843 |
|
| 844 |
#. type: Plain text |
| 845 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 846 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 847 |
msgid "" |
| 848 |
"System calls that return user IDs (group IDs)\\[em]for example, " |
| 849 |
"B<getuid>(2), B<getgid>(2), and the credential fields in the structure " |
| 850 |
"returned by B<stat>(2)\\[em]return the user ID (group ID) mapped into the " |
| 851 |
"caller's user namespace." |
| 852 |
msgstr "" |
| 853 |
"Les appels système qui renvoient des identifiants utilisateur (des " |
| 854 |
"identifiant de groupes) \\[em] comme par exemple, B<getuid>(2), " |
| 855 |
"B<getgid>(2), et les champs relatifs aux droits dans la structure renvoyée " |
| 856 |
"par B<stat>(2) \\[em] affichent la valeur de l'identifiant utilisateur " |
| 857 |
"(l'identifiant de groupe) mappé dans l'espace de noms utilisateur de " |
| 858 |
"l'appelant." |
| 859 |
|
| 860 |
#. type: Plain text |
| 861 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 862 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 863 |
msgid "" |
| 864 |
"When a process accesses a file, its user and group IDs are mapped into the " |
| 865 |
"initial user namespace for the purpose of permission checking and assigning " |
| 866 |
"IDs when creating a file. When a process retrieves file user and group IDs " |
| 867 |
"via B<stat>(2), the IDs are mapped in the opposite direction, to produce " |
| 868 |
"values relative to the process user and group ID mappings." |
| 869 |
msgstr "" |
| 870 |
"Lorsqu'un processus accède à un fichier, ses identifiant utilisateur et " |
| 871 |
"groupe sont mappés dans l’espace de noms utilisateur initial pour pouvoir " |
| 872 |
"vérifier les droits ou pour assigner des identifiants lors de la création " |
| 873 |
"d'un fichier. Lorsqu'un processus obtient les identifiants utilisateur et " |
| 874 |
"groupe d'un fichier par la commande B<stat>(2), les identifiants sont " |
| 875 |
"évalués dans le sens inverse, afin de renvoyer les valeurs relatives aux " |
| 876 |
"mappages des ID utilisateur et de groupe du processus." |
| 877 |
|
| 878 |
#. type: Plain text |
| 879 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 880 |
#: opensuse-tumbleweed |
| 881 |
msgid "" |
| 882 |
"The initial user namespace has no parent namespace, but, for consistency, " |
| 883 |
"the kernel provides dummy user and group ID mapping files for this " |
| 884 |
"namespace. Looking at the I<uid_map> file (I<gid_map> is the same) from a " |
| 885 |
"shell in the initial namespace shows:" |
| 886 |
msgstr "" |
| 887 |
"L'espace de noms utilisateur initial n'a pas d'espace de noms parent, mais " |
| 888 |
"pour conserver la cohérence, le noyau lui attribue des fichiers de mappage " |
| 889 |
"d'identifiants utilisateur et groupe factices pour cet espace de noms. Si " |
| 890 |
"l'on consulte le fichier I<uid_map> (ou I<gid_map> de la même façon) depuis " |
| 891 |
"une invite de commande dans l'espace de noms initial, on peut voir : " |
| 892 |
|
| 893 |
#. type: Plain text |
| 894 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 895 |
#: opensuse-tumbleweed |
| 896 |
#, no-wrap |
| 897 |
msgid "" |
| 898 |
"$B< cat /proc/$$/uid_map>;\n" |
| 899 |
" 0 0 4294967295\n" |
| 900 |
msgstr "" |
| 901 |
"$ B<cat /proc/$$/uid_map>;\n" |
| 902 |
" 0 0 4294967295\n" |
| 903 |
|
| 904 |
# |
| 905 |
#. ============================================================ |
| 906 |
#. type: Plain text |
| 907 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 908 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 909 |
#, fuzzy |
| 910 |
#| msgid "" |
| 911 |
#| "This mapping tells us that the range starting at user ID 0 in this " |
| 912 |
#| "namespace maps to a range starting at 0 in the (nonexistent) parent " |
| 913 |
#| "namespace, and the size of the range is the largest 32-bit unsigned " |
| 914 |
#| "integer. This leaves 4294967295 (the 32-bit signed -1 value) unmapped. " |
| 915 |
#| "This is deliberate: I<(uid_t)\\ -1> is used in several interfaces (e.g., " |
| 916 |
#| "B<setreuid>(2)) as a way to specify \"no user ID\". Leaving I<(uid_t)\\ " |
| 917 |
#| "-1> unmapped and unusable guarantees that there will be no confusion when " |
| 918 |
#| "using these interfaces." |
| 919 |
msgid "" |
| 920 |
"This mapping tells us that the range starting at user ID 0 in this namespace " |
| 921 |
"maps to a range starting at 0 in the (nonexistent) parent namespace, and the " |
| 922 |
"size of the range is the largest 32-bit unsigned integer. This leaves " |
| 923 |
"4294967295 (the 32-bit signed -1 value) unmapped. This is deliberate: " |
| 924 |
"I<(uid_t)\\ -1> is used in several interfaces (e.g., B<setreuid>(2)) as a " |
| 925 |
"way to specify \"no user ID\". Leaving I<(uid_t)\\ -1> unmapped and " |
| 926 |
"unusable guarantees that there will be no confusion when using these " |
| 927 |
"interfaces." |
| 928 |
msgstr "" |
| 929 |
"Ce mappage nous indique que l'intervalle commençant avec l'identifiant " |
| 930 |
"utilisateur 0 dans cet espace de noms mappe avec un intervalle commençant " |
| 931 |
"à 0 dans l'espace de noms parent (qui n'existe pas), et que la taille de cet " |
| 932 |
"intervalle est la valeur du plus grand entier 32 bits non signé. Cela laisse " |
| 933 |
"4294967295 (la valeur 32 bits signé moins 1) non mappé. Cela est voulu : " |
| 934 |
"I<(uid_t)\\~-1> est utilisé dans plusieurs interfaces (par exemple, " |
| 935 |
"B<setreuid>(2)) comme façon d’indiquer « pas d’ID utilisateur ». Laisser " |
| 936 |
"I<(uid_t)\\~-1> non mappé et inutilisable garantit qu’il n’y aura aucune " |
| 937 |
"confusion lors de l’utilisation de ces interfaces." |
| 938 |
|
| 939 |
#. type: SS |
| 940 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 941 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 942 |
#, no-wrap |
| 943 |
msgid "Defining user and group ID mappings: writing to uid_map and gid_map" |
| 944 |
msgstr "Création des mappages d'ID utilisateur et groupe : écriture dans uid_map et gid_map" |
| 945 |
|
| 946 |
#. type: Plain text |
| 947 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 948 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 949 |
msgid "" |
| 950 |
"After the creation of a new user namespace, the I<uid_map> file of I<one> of " |
| 951 |
"the processes in the namespace may be written to I<once> to define the " |
| 952 |
"mapping of user IDs in the new user namespace. An attempt to write more " |
| 953 |
"than once to a I<uid_map> file in a user namespace fails with the error " |
| 954 |
"B<EPERM>. Similar rules apply for I<gid_map> files." |
| 955 |
msgstr "" |
| 956 |
"Après la création d'un nouvel espace de noms utilisateur, le fichier " |
| 957 |
"I<uid_map> de l'I<un> des processus de l'espace de noms peut être ouvert en " |
| 958 |
"écriture I<une seule fois> pour y consigner le mappage des identifiants " |
| 959 |
"utilisateur dans le nouvel espace de noms utilisateur. Toute tentative " |
| 960 |
"d'écrire plus d'une fois dans un fichier I<uid_map> se solde par un échec " |
| 961 |
"qui renvoie l'erreur B<EPERM>. Des règles analogues s'appliquent aux " |
| 962 |
"fichiers I<gid_map>." |
| 963 |
|
| 964 |
#. type: Plain text |
| 965 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 966 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 967 |
msgid "" |
| 968 |
"The lines written to I<uid_map> (I<gid_map>) must conform to the following " |
| 969 |
"validity rules:" |
| 970 |
msgstr "" |
| 971 |
"Les lignes inscrites dans I<uid_map> (I<gid_map>) doivent suivre les règles " |
| 972 |
"de validité suivantes :" |
| 973 |
|
| 974 |
#. type: Plain text |
| 975 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 976 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 977 |
msgid "" |
| 978 |
"The three fields must be valid numbers, and the last field must be greater " |
| 979 |
"than 0." |
| 980 |
msgstr "" |
| 981 |
"Les trois champs doivent être des nombres valables et le dernier champ doit " |
| 982 |
"être strictement positif." |
| 983 |
|
| 984 |
#. type: Plain text |
| 985 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 986 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 987 |
msgid "Lines are terminated by newline characters." |
| 988 |
msgstr "Les lignes doivent se terminer par un saut de ligne." |
| 989 |
|
| 990 |
#. 5*12-byte records could fit in a 64B cache line |
| 991 |
#. commit 6397fac4915ab3002dc15aae751455da1a852f25 |
| 992 |
#. type: Plain text |
| 993 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 994 |
#: opensuse-tumbleweed |
| 995 |
msgid "" |
| 996 |
"There is a limit on the number of lines in the file. Up to Linux 4.14, this " |
| 997 |
"limit was (arbitrarily) set at 5 lines. Since Linux 4.16, the limit is 340 " |
| 998 |
"lines. In addition, the number of bytes written to the file must be less " |
| 999 |
"than the system page size, and the write must be performed at the start of " |
| 1000 |
"the file (i.e., B<lseek>(2) and B<pwrite>(2) can't be used to write to " |
| 1001 |
"nonzero offsets in the file)." |
| 1002 |
msgstr "" |
| 1003 |
"Il y a une limite (arbitraire) du nombre de lignes que peut contenir le " |
| 1004 |
"fichier. Jusqu'à Linux 4.14, la limite est (arbitrairement) de 5 lignes. " |
| 1005 |
"Depuis Linux 4.15, la limite est de 340 lignes. En outre, le nombre d'octets " |
| 1006 |
"inscrits dans le fichier doit être inférieur à la taille d'une page du " |
| 1007 |
"système, et l'écriture doit être réalisée au début du fichier (c’est-à-dire " |
| 1008 |
"B<lseek>(2) et B<pwrite>(2) ne peuvent être utilisées pour écrire dans le " |
| 1009 |
"fichier avec un décalage non nul)." |
| 1010 |
|
| 1011 |
#. commit 0bd14b4fd72afd5df41e9fd59f356740f22fceba |
| 1012 |
#. type: Plain text |
| 1013 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1014 |
#: opensuse-tumbleweed |
| 1015 |
msgid "" |
| 1016 |
"The range of user IDs (group IDs) specified in each line cannot overlap " |
| 1017 |
"with the ranges in any other lines. In the initial implementation (Linux " |
| 1018 |
"3.8), this requirement was satisfied by a simplistic implementation that " |
| 1019 |
"imposed the further requirement that the values in both field 1 and field 2 " |
| 1020 |
"of successive lines must be in ascending numerical order, which prevented " |
| 1021 |
"some otherwise valid maps from being created. Since Linux 3.9, this " |
| 1022 |
"limitation has been removed, allowing any valid set of nonoverlapping maps." |
| 1023 |
msgstr "" |
| 1024 |
"L'intervalle d'identifiants utilisateur (ou de groupe) indiqué dans chaque " |
| 1025 |
"ligne ne peut recouvrir les intervalles des autres lignes. Dans " |
| 1026 |
"l'implémentation initiale (Linux 3.8), cette règle était assurée par une " |
| 1027 |
"implémentation plus sommaire qui comprenait une contrainte supplémentaire : " |
| 1028 |
"les deux premiers champs de chaque ligne devaient apparaître en ordre " |
| 1029 |
"croissant. Cela empêchait cependant la création de mappages valables. Depuis " |
| 1030 |
"Linux 3.9 cette limitation a été supprimée, et toutes les combinaisons " |
| 1031 |
"valables de mappages non recouvrantes sont désormais acceptées." |
| 1032 |
|
| 1033 |
#. type: Plain text |
| 1034 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1035 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1036 |
msgid "At least one line must be written to the file." |
| 1037 |
msgstr "Au moins une ligne doit être inscrite dans le fichier." |
| 1038 |
|
| 1039 |
#. type: Plain text |
| 1040 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1041 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1042 |
msgid "Writes that violate the above rules fail with the error B<EINVAL>." |
| 1043 |
msgstr "" |
| 1044 |
"Les opérations d'écritures qui ne respectent pas les règles énoncées " |
| 1045 |
"précédemment échouent en renvoyant l'erreur B<EINVAL>." |
| 1046 |
|
| 1047 |
#. type: Plain text |
| 1048 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1049 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1050 |
msgid "" |
| 1051 |
"In order for a process to write to the I</proc/>pidI</uid_map> (I</proc/" |
| 1052 |
">pidI</gid_map>) file, all of the following permission requirements must be " |
| 1053 |
"met:" |
| 1054 |
msgstr "" |
| 1055 |
"Un processus ne peut écrire dans le fichier I</proc/>pidI</uid_map> (I</proc/" |
| 1056 |
">pidI</gid_map>) qu'à la condition de respecter les contraintes suivantes :" |
| 1057 |
|
| 1058 |
#. type: Plain text |
| 1059 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1060 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1061 |
msgid "" |
| 1062 |
"The writing process must have the B<CAP_SETUID> (B<CAP_SETGID>) capability " |
| 1063 |
"in the user namespace of the process I<pid>." |
| 1064 |
msgstr "" |
| 1065 |
"Le processus réalisant l'écriture doit disposer de la capacité B<CAP_SETUID> " |
| 1066 |
"(B<CAP_SETGID>) dans l'espace de noms utilisateur du processus I<pid>." |
| 1067 |
|
| 1068 |
#. type: Plain text |
| 1069 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1070 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1071 |
msgid "" |
| 1072 |
"The writing process must either be in the user namespace of the process " |
| 1073 |
"I<pid> or be in the parent user namespace of the process I<pid>." |
| 1074 |
msgstr "" |
| 1075 |
"Le processus réalisant l'écriture doit se trouver soit dans l'espace de noms " |
| 1076 |
"utilisateur du processus I<pid>, soit dans l'espace de noms utilisateur " |
| 1077 |
"parent du processus I<pid>." |
| 1078 |
|
| 1079 |
#. type: Plain text |
| 1080 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1081 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1082 |
msgid "" |
| 1083 |
"The mapped user IDs (group IDs) must in turn have a mapping in the parent " |
| 1084 |
"user namespace." |
| 1085 |
msgstr "" |
| 1086 |
"Les identifiants utilisateur (ou groupe) mappés doivent, en retour, avoir un " |
| 1087 |
"mappage dans l'espace de noms utilisateur parent." |
| 1088 |
|
| 1089 |
#. type: Plain text |
| 1090 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1091 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1092 |
msgid "" |
| 1093 |
"If updating I</proc/>pidI</uid_map> to create a mapping that maps UID 0 in " |
| 1094 |
"the parent namespace, then one of the following must be true:" |
| 1095 |
msgstr "" |
| 1096 |
"Pour une mise à jour de I</proc/>pidI</uid_map> pour créer un mappage pour " |
| 1097 |
"l’UID\\ 0 dans l’espace de noms parent, une des propositions suivantes doit " |
| 1098 |
"être vraie\\ :" |
| 1099 |
|
| 1100 |
#. type: Plain text |
| 1101 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1102 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1103 |
msgid "" |
| 1104 |
"if writing process is in the parent user namespace, then it must have the " |
| 1105 |
"B<CAP_SETFCAP> capability in that user namespace; or" |
| 1106 |
msgstr "" |
| 1107 |
"si le processus écrivain est dans l’espace de noms utilisateur parent, il " |
| 1108 |
"doit disposer de la capacité B<CAP_SETUID>\\ ;" |
| 1109 |
|
| 1110 |
#. type: Plain text |
| 1111 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1112 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1113 |
msgid "" |
| 1114 |
"if the writing process is in the child user namespace, then the process that " |
| 1115 |
"created the user namespace must have had the B<CAP_SETFCAP> capability when " |
| 1116 |
"the namespace was created." |
| 1117 |
msgstr "" |
| 1118 |
"si le processus écrivain est dans l’espace de noms enfant, alors le " |
| 1119 |
"processus ayant créé l’espace de noms utilisateur doit avoir la capacité " |
| 1120 |
"B<CAP_SETFCAP> lors de la création de l’espace de noms." |
| 1121 |
|
| 1122 |
#. commit db2e718a47984b9d71ed890eb2ea36ecf150de18 |
| 1123 |
#. type: Plain text |
| 1124 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1125 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1126 |
msgid "" |
| 1127 |
"This rule has been in place since Linux 5.12. It eliminates an earlier " |
| 1128 |
"security bug whereby a UID 0 process that lacks the B<CAP_SETFCAP> " |
| 1129 |
"capability, which is needed to create a binary with namespaced file " |
| 1130 |
"capabilities (as described in B<capabilities>(7)), could nevertheless create " |
| 1131 |
"such a binary, by the following steps:" |
| 1132 |
msgstr "" |
| 1133 |
"Cette règle a été mise en place depuis Linux\\ 5.12. Elle supprime un bogue " |
| 1134 |
"de sécurité précédent à cause duquel un processus d’UID\\ 0 n’ayant pas la " |
| 1135 |
"capacité B<CAP_SETFCAP>, qui est nécessaire pour créer un binaire avec les " |
| 1136 |
"capacités de fichier d’un certain espace de noms (comme décrit dans " |
| 1137 |
"B<capabilities>(7)), pouvait néanmoins créer un tel binaire en effectuant " |
| 1138 |
"les étapes suivantes\\ :" |
| 1139 |
|
| 1140 |
#. type: Plain text |
| 1141 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1142 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1143 |
msgid "" |
| 1144 |
"Create a new user namespace with the identity mapping (i.e., UID 0 in the " |
| 1145 |
"new user namespace maps to UID 0 in the parent namespace), so that UID 0 in " |
| 1146 |
"both namespaces is equivalent to the same root user ID." |
| 1147 |
msgstr "" |
| 1148 |
"Créer un nouvel espace de noms utilisateur avec le mappage d’identifiant " |
| 1149 |
"(c’est-à-dire, UID\\ 0 dans le nouvel espace de noms utilisateur correspond " |
| 1150 |
"à l’UID\\ 0 dans l’espace de noms parent), ainsi cet UID\\ 0 dans les deux " |
| 1151 |
"espaces de noms est équivalent au même ID de superutilisateur." |
| 1152 |
|
| 1153 |
#. type: Plain text |
| 1154 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1155 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1156 |
msgid "" |
| 1157 |
"Since the child process has the B<CAP_SETFCAP> capability, it could create a " |
| 1158 |
"binary with namespaced file capabilities that would then be effective in the " |
| 1159 |
"parent user namespace (because the root user IDs are the same in the two " |
| 1160 |
"namespaces)." |
| 1161 |
msgstr "" |
| 1162 |
"Puisque le processus enfant a la capacité B<CAP_SETFCAP>, il peut créer un " |
| 1163 |
"binaire avec les capacités de fichier d’un certain espace de noms qui serait " |
| 1164 |
"alors disponible dans l’espace de noms parent (parce que les ID du " |
| 1165 |
"superutilisateur sont les mêmes dans les deux espaces de noms)." |
| 1166 |
|
| 1167 |
#. type: Plain text |
| 1168 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1169 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1170 |
msgid "One of the following two cases applies:" |
| 1171 |
msgstr "L'un des deux points suivants est vérifié :" |
| 1172 |
|
| 1173 |
#. type: Plain text |
| 1174 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1175 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1176 |
msgid "" |
| 1177 |
"I<Either> the writing process has the B<CAP_SETUID> (B<CAP_SETGID>) " |
| 1178 |
"capability in the I<parent> user namespace." |
| 1179 |
msgstr "" |
| 1180 |
"I<soit> le processus réalisant l'écriture doit disposer de la capacité " |
| 1181 |
"B<CAP_SETUID> ( B<CAP_SETGID>) dans l'espace de noms utilisateur I<parent>." |
| 1182 |
|
| 1183 |
#. type: Plain text |
| 1184 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1185 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1186 |
msgid "" |
| 1187 |
"No further restrictions apply: the process can make mappings to arbitrary " |
| 1188 |
"user IDs (group IDs) in the parent user namespace." |
| 1189 |
msgstr "" |
| 1190 |
"Aucune autre restriction, le processus peut établir des mappages vers les ID " |
| 1191 |
"utilisateur (groupe) dans l’espace de noms parent." |
| 1192 |
|
| 1193 |
#. type: Plain text |
| 1194 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1195 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1196 |
msgid "I<Or> otherwise all of the following restrictions apply:" |
| 1197 |
msgstr "I<Ou> sinon toutes les restrictions suivantes s’appliquent :" |
| 1198 |
|
| 1199 |
#. type: Plain text |
| 1200 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1201 |
#: opensuse-tumbleweed |
| 1202 |
msgid "" |
| 1203 |
"The data written to I<uid_map> (I<gid_map>) must consist of a single line " |
| 1204 |
"that maps the writing process's effective user ID (group ID) in the parent " |
| 1205 |
"user namespace to a user ID (group ID) in the user namespace." |
| 1206 |
msgstr "" |
| 1207 |
"Les données inscrites dans I<uid_map> (I<gid_map>) doivent consister en une " |
| 1208 |
"seule ligne qui mappe l'identifiant utilisateur effectif (groupe) du " |
| 1209 |
"processus écrivant dans l’espace de noms utilisateur parent à un ID " |
| 1210 |
"utilisateur (groupe) dans l’espace de noms utilisateur." |
| 1211 |
|
| 1212 |
#. type: Plain text |
| 1213 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1214 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1215 |
msgid "" |
| 1216 |
"The writing process must have the same effective user ID as the process that " |
| 1217 |
"created the user namespace." |
| 1218 |
msgstr "" |
| 1219 |
"Le processus réalisant l'écriture doit avoir le même ID utilisateur effectif " |
| 1220 |
"que le processus ayant créé l’espace de noms utilisateur." |
| 1221 |
|
| 1222 |
#. type: Plain text |
| 1223 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1224 |
#: opensuse-tumbleweed |
| 1225 |
msgid "" |
| 1226 |
"In the case of I<gid_map>, use of the B<setgroups>(2) system call must " |
| 1227 |
"first be denied by writing \\[dq]I<deny>\\[dq] to the I</proc/>pidI</" |
| 1228 |
"setgroups> file (see below) before writing to I<gid_map>." |
| 1229 |
msgstr "" |
| 1230 |
"Dans le cas de I<gid_map>, l’utilisation de l’appel système B<setgroups>(2) " |
| 1231 |
"doit être d’abord interdit en écrivant « I<deny> » dans le fichier I</proc/" |
| 1232 |
">pidI</setgroups> (voir ci-dessous) avant d’écrire dans I<gid_map>." |
| 1233 |
|
| 1234 |
# |
| 1235 |
#. ============================================================ |
| 1236 |
#. type: Plain text |
| 1237 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1238 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1239 |
msgid "Writes that violate the above rules fail with the error B<EPERM>." |
| 1240 |
msgstr "Les écritures violant ces règles échouent avec l’erreur B<EPERM>." |
| 1241 |
|
| 1242 |
#. type: SS |
| 1243 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1244 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1245 |
#, no-wrap |
| 1246 |
msgid "Project ID mappings: projid_map" |
| 1247 |
msgstr "Mappages d’ID de projet : projid_map" |
| 1248 |
|
| 1249 |
#. type: Plain text |
| 1250 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1251 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1252 |
msgid "" |
| 1253 |
"Similarly to user and group ID mappings, it is possible to create project ID " |
| 1254 |
"mappings for a user namespace. (Project IDs are used for disk quotas; see " |
| 1255 |
"B<setquota>(8) and B<quotactl>(2).)" |
| 1256 |
msgstr "" |
| 1257 |
"De la même manière que pour les mappages d’ID d’utilisateur et de groupe, il " |
| 1258 |
"est possible de créer des mappages d’ID de projet pour un espace de noms " |
| 1259 |
"utilisateur (les ID de projets sont utilisés pour des quotas de disque, " |
| 1260 |
"consulter B<setquota>(8) et B<quotactl>(2))." |
| 1261 |
|
| 1262 |
#. commit f76d207a66c3a53defea67e7d36c3eb1b7d6d61d |
| 1263 |
#. type: Plain text |
| 1264 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1265 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1266 |
msgid "" |
| 1267 |
"Project ID mappings are defined by writing to the I</proc/>pidI</projid_map> " |
| 1268 |
"file (present since Linux 3.7)." |
| 1269 |
msgstr "" |
| 1270 |
"Les mappages d’ID de projet sont définis par des écritures dans le fichier " |
| 1271 |
"I</proc/>pidI</projid_map> (présent depuis Linux\\ 3.7)." |
| 1272 |
|
| 1273 |
#. type: Plain text |
| 1274 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1275 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1276 |
msgid "" |
| 1277 |
"The validity rules for writing to the I</proc/>pidI</projid_map> file are as " |
| 1278 |
"for writing to the I<uid_map> file; violation of these rules causes " |
| 1279 |
"B<write>(2) to fail with the error B<EINVAL>." |
| 1280 |
msgstr "" |
| 1281 |
"Les règles de validité pour écrire dans le fichier I</proc/>pidI</" |
| 1282 |
"projid_map> sont les mêmes que pour le fichier I<uid_map>. Une violation de " |
| 1283 |
"ces règles provoque l'échec de B<write>(2) avec l’erreur B<EINVAL>." |
| 1284 |
|
| 1285 |
#. type: Plain text |
| 1286 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1287 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1288 |
msgid "" |
| 1289 |
"The permission rules for writing to the I</proc/>pidI</projid_map> file are " |
| 1290 |
"as follows:" |
| 1291 |
msgstr "" |
| 1292 |
"Les règles de permission pour écrire dans le fichier I</proc/>pidI</" |
| 1293 |
"projid_map> sont les suivantes\\ :" |
| 1294 |
|
| 1295 |
#. type: Plain text |
| 1296 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1297 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1298 |
msgid "" |
| 1299 |
"The mapped project IDs must in turn have a mapping in the parent user " |
| 1300 |
"namespace." |
| 1301 |
msgstr "" |
| 1302 |
"Les ID de projet mappés doivent, en retour, avoir un mappage dans l'espace " |
| 1303 |
"de noms utilisateur parent." |
| 1304 |
|
| 1305 |
# |
| 1306 |
#. ============================================================ |
| 1307 |
#. type: Plain text |
| 1308 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1309 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1310 |
msgid "" |
| 1311 |
"Violation of these rules causes B<write>(2) to fail with the error B<EPERM>." |
| 1312 |
msgstr "" |
| 1313 |
"La violation de ces règles provoque l'échec de B<write>(2) avec l’erreur " |
| 1314 |
"B<EPERM>." |
| 1315 |
|
| 1316 |
#. type: SS |
| 1317 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1318 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1319 |
#, no-wrap |
| 1320 |
msgid "Interaction with system calls that change process UIDs or GIDs" |
| 1321 |
msgstr "Interaction avec les appels système qui modifient les UID ou les GID" |
| 1322 |
|
| 1323 |
#. type: Plain text |
| 1324 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1325 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1326 |
msgid "" |
| 1327 |
"In a user namespace where the I<uid_map> file has not been written, the " |
| 1328 |
"system calls that change user IDs will fail. Similarly, if the I<gid_map> " |
| 1329 |
"file has not been written, the system calls that change group IDs will " |
| 1330 |
"fail. After the I<uid_map> and I<gid_map> files have been written, only the " |
| 1331 |
"mapped values may be used in system calls that change user and group IDs." |
| 1332 |
msgstr "" |
| 1333 |
"Dans un espace de noms utilisateur où aucun fichier I<uid_map> n’a été " |
| 1334 |
"écrit, les appels système qui modifient l’ID utilisateur échoueront. De la " |
| 1335 |
"même manière, si le fichier I<gid_map> n’a pas été écrit, les appels système " |
| 1336 |
"modifiant les ID de groupe échoueront. Après que les fichiers I<uid_map> et " |
| 1337 |
"I<gid_map> aient été écrits, seules les valeurs mappées peuvent être " |
| 1338 |
"utilisées dans les appels système modifiant les ID utilisateur et groupe." |
| 1339 |
|
| 1340 |
#. type: Plain text |
| 1341 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1342 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1343 |
msgid "" |
| 1344 |
"For user IDs, the relevant system calls include B<setuid>(2), " |
| 1345 |
"B<setfsuid>(2), B<setreuid>(2), and B<setresuid>(2). For group IDs, the " |
| 1346 |
"relevant system calls include B<setgid>(2), B<setfsgid>(2), B<setregid>(2), " |
| 1347 |
"B<setresgid>(2), and B<setgroups>(2)." |
| 1348 |
msgstr "" |
| 1349 |
"Pour les ID utilisateur, les appels système concernés incluent B<setuid>(2), " |
| 1350 |
"B<setfsuid>(2), B<setreuid>(2) et B<setresuid>(2). Pour les ID de groupe, " |
| 1351 |
"les appels système concernés incluent B<setgid>(2), B<setfsgid>(2), " |
| 1352 |
"B<setregid>(2), B<setresgid>(2) et B<setgroups>(2)." |
| 1353 |
|
| 1354 |
# |
| 1355 |
#. Things changed in Linux 3.19 |
| 1356 |
#. commit 9cc46516ddf497ea16e8d7cb986ae03a0f6b92f8 |
| 1357 |
#. commit 66d2f338ee4c449396b6f99f5e75cd18eb6df272 |
| 1358 |
#. http://lwn.net/Articles/626665/ |
| 1359 |
#. ============================================================ |
| 1360 |
#. type: Plain text |
| 1361 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1362 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1363 |
msgid "" |
| 1364 |
"Writing \\[dq]I<deny>\\[dq] to the I</proc/>pidI</setgroups> file before " |
| 1365 |
"writing to I</proc/>pidI</gid_map> will permanently disable B<setgroups>(2) " |
| 1366 |
"in a user namespace and allow writing to I</proc/>pidI</gid_map> without " |
| 1367 |
"having the B<CAP_SETGID> capability in the parent user namespace." |
| 1368 |
msgstr "" |
| 1369 |
"Écrire « I<deny> » dans le fichier I</proc/>pidI</setgroups> avant d’écrire " |
| 1370 |
"dans I</proc/>pidI</gid_map> désactivera de manière permanente " |
| 1371 |
"B<setgroups>(2) dans un espace de noms utilisateur et permettra d’écrire " |
| 1372 |
"dans I</proc/>pidI</gid_map> sans avoir la capacité B<CAP_SETGID> dans " |
| 1373 |
"l’espace de noms utilisateur parent." |
| 1374 |
|
| 1375 |
#. type: SS |
| 1376 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1377 |
#: opensuse-tumbleweed |
| 1378 |
#, no-wrap |
| 1379 |
msgid "The \\f[I]/proc/\\fBpid\\f[I]/setgroups\\fB file" |
| 1380 |
msgstr "Le fichier \\f[I]/proc/\\fBpid\\f[I]/setgroups\\fB" |
| 1381 |
|
| 1382 |
# |
| 1383 |
#. commit 9cc46516ddf497ea16e8d7cb986ae03a0f6b92f8 |
| 1384 |
#. commit 66d2f338ee4c449396b6f99f5e75cd18eb6df272 |
| 1385 |
#. http://lwn.net/Articles/626665/ |
| 1386 |
#. http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-8989 |
| 1387 |
#. type: Plain text |
| 1388 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1389 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1390 |
msgid "" |
| 1391 |
"The I</proc/>pidI</setgroups> file displays the string \\[dq]I<allow>\\[dq] " |
| 1392 |
"if processes in the user namespace that contains the process I<pid> are " |
| 1393 |
"permitted to employ the B<setgroups>(2) system call; it displays \\" |
| 1394 |
"[dq]I<deny>\\[dq] if B<setgroups>(2) is not permitted in that user " |
| 1395 |
"namespace. Note that regardless of the value in the I</proc/>pidI</" |
| 1396 |
"setgroups> file (and regardless of the process's capabilities), calls to " |
| 1397 |
"B<setgroups>(2) are also not permitted if I</proc/>pidI</gid_map> has not " |
| 1398 |
"yet been set." |
| 1399 |
msgstr "" |
| 1400 |
"Le fichier I</proc/>pidI</setgroups> affichera la chaîne « I<allow> » si les " |
| 1401 |
"processus dans l’espace de noms utilisateur qui contient le processus I<pid> " |
| 1402 |
"sont autorisés à employer l’appel système B<setgroups>(2). Il affichera " |
| 1403 |
"« I<deny> » si B<setgroups>(2) n’est pas autorisé dans cet espace de noms " |
| 1404 |
"utilisateur. Remarquez que quelle que soit la valeur dans le fichier I</proc/" |
| 1405 |
">pidI</setgroups> (et quelles que soient les capacités du processus), les " |
| 1406 |
"appels à B<setgroups>(2) ne sont en outre pas permis si I</proc/" |
| 1407 |
">pidI<gid_map> n’a pas encore été défini." |
| 1408 |
|
| 1409 |
#. type: Plain text |
| 1410 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1411 |
#: opensuse-tumbleweed |
| 1412 |
msgid "" |
| 1413 |
"A privileged process (one with the B<CAP_SYS_ADMIN> capability in the " |
| 1414 |
"namespace) may write either of the strings \\[dq]I<allow>\\[dq] or \\" |
| 1415 |
"[dq]I<deny>\\[dq] to this file I<before> writing a group ID mapping for this " |
| 1416 |
"user namespace to the file I</proc/>pidI</gid_map>. Writing the string \\" |
| 1417 |
"[dq]I<deny>\\[dq] prevents any process in the user namespace from employing " |
| 1418 |
"B<setgroups>(2)." |
| 1419 |
msgstr "" |
| 1420 |
"Un processus privilégié (un avec la capacité B<CAP_SYS_ADMIN> dans l’espace " |
| 1421 |
"de noms) peut écrire une des chaînes « I<allow> » ou « I<deny> » dans ce " |
| 1422 |
"fichier I<avant> d’écrire un mappage d’ID de groupe pour cet espace de noms " |
| 1423 |
"utilisateur dans le fichier I</proc/>pidI</gid_map>. Écrire la chaîne " |
| 1424 |
"« I<deny> » empêche tout processus dans l’espace de noms utilisateur " |
| 1425 |
"d’employer B<setgroups>(2)." |
| 1426 |
|
| 1427 |
#. type: Plain text |
| 1428 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1429 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1430 |
msgid "" |
| 1431 |
"The essence of the restrictions described in the preceding paragraph is that " |
| 1432 |
"it is permitted to write to I</proc/>pidI</setgroups> only so long as " |
| 1433 |
"calling B<setgroups>(2) is disallowed because I</proc/>pidI</gid_map> has " |
| 1434 |
"not been set. This ensures that a process cannot transition from a state " |
| 1435 |
"where B<setgroups>(2) is allowed to a state where B<setgroups>(2) is " |
| 1436 |
"denied; a process can transition only from B<setgroups>(2) being disallowed " |
| 1437 |
"to B<setgroups>(2) being allowed." |
| 1438 |
msgstr "" |
| 1439 |
"L’idée de ces restrictions décrites dans le paragraphe précédent est qu’il " |
| 1440 |
"n'est permis d’écrire dans I</proc/>pidI</setgroups> que sil’appel à " |
| 1441 |
"B<setgroups>(2) est désactivé parce que I</proc/>pidI</gid_map> n’a pas été " |
| 1442 |
"défini. Cela garantit qu’un processus ne peut transiter d’un état dans " |
| 1443 |
"lequel B<setgroups>(2) est autorisé vers un état dans lequel B<setgroups>(2) " |
| 1444 |
"est interdit. Un processus peut transiter seulement de B<setgroups>(2) " |
| 1445 |
"interdit vers B<setgroups>(2) autorisé." |
| 1446 |
|
| 1447 |
#. type: Plain text |
| 1448 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1449 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1450 |
msgid "" |
| 1451 |
"The default value of this file in the initial user namespace is \\" |
| 1452 |
"[dq]I<allow>\\[dq]." |
| 1453 |
msgstr "" |
| 1454 |
"La valeur par défaut dans ce fichier dans l’espace de noms utilisateur " |
| 1455 |
"initial est « I<allow> »." |
| 1456 |
|
| 1457 |
#. type: Plain text |
| 1458 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1459 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1460 |
msgid "" |
| 1461 |
"Once I</proc/>pidI</gid_map> has been written to (which has the effect of " |
| 1462 |
"enabling B<setgroups>(2) in the user namespace), it is no longer possible " |
| 1463 |
"to disallow B<setgroups>(2) by writing \\[dq]I<deny>\\[dq] to I</proc/" |
| 1464 |
">pidI</setgroups> (the write fails with the error B<EPERM>)." |
| 1465 |
msgstr "" |
| 1466 |
"Une fois que I</proc/>pidI</gid_map> a été écrit (ce qui a pour effet " |
| 1467 |
"d’activer B<setgroups>(2) dans l’espace de noms utilisateur), il n’est plus " |
| 1468 |
"possible de désactiver B<setgroups>(2) en écrivant « I<deny> » dans I</proc/" |
| 1469 |
">pidI</setgroups> (l’écriture échoue avec l’erreur B<EPERM>)." |
| 1470 |
|
| 1471 |
#. type: Plain text |
| 1472 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1473 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1474 |
msgid "" |
| 1475 |
"A child user namespace inherits the I</proc/>pidI</setgroups> setting from " |
| 1476 |
"its parent." |
| 1477 |
msgstr "" |
| 1478 |
"Un espace de noms utilisateur enfant hérite du réglage I</proc/>pidI</" |
| 1479 |
"setgroups> de son parent." |
| 1480 |
|
| 1481 |
#. type: Plain text |
| 1482 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1483 |
#: opensuse-tumbleweed |
| 1484 |
msgid "" |
| 1485 |
"If the I<setgroups> file has the value \\[dq]I<deny>\\[dq], then the " |
| 1486 |
"B<setgroups>(2) system call can't subsequently be reenabled (by writing \\" |
| 1487 |
"[dq]I<allow>\\[dq] to the file) in this user namespace. (Attempts to do so " |
| 1488 |
"fail with the error B<EPERM>.) This restriction also propagates down to all " |
| 1489 |
"child user namespaces of this user namespace." |
| 1490 |
msgstr "" |
| 1491 |
"Si le fichier I<setgroups> a la valeur « I<deny> », alors l’appel système " |
| 1492 |
"B<setgroups>(2) ne peut pas par la suite être réactivé (en écrivant " |
| 1493 |
"« I<allow> » dans le fichier) dans cet espace de noms utilisateur (toute " |
| 1494 |
"tentative échouera avec l’erreur B<EPERM>). Cette restriction se propage " |
| 1495 |
"vers les espaces de noms utilisateur enfant de cet espace de noms " |
| 1496 |
"utilisateur." |
| 1497 |
|
| 1498 |
# |
| 1499 |
# |
| 1500 |
# |
| 1501 |
# |
| 1502 |
#. /proc/PID/setgroups |
| 1503 |
#. [allow == setgroups() is allowed, "deny" == setgroups() is disallowed] |
| 1504 |
#. * Can write if have CAP_SYS_ADMIN in NS |
| 1505 |
#. * Must write BEFORE writing to /proc/PID/gid_map |
| 1506 |
#. setgroups() |
| 1507 |
#. * Must already have written to gid_map |
| 1508 |
#. * /proc/PID/setgroups must be "allow" |
| 1509 |
#. /proc/PID/gid_map -- writing |
| 1510 |
#. * Must already have written "deny" to /proc/PID/setgroups |
| 1511 |
#. ============================================================ |
| 1512 |
#. type: Plain text |
| 1513 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1514 |
#: opensuse-tumbleweed |
| 1515 |
msgid "" |
| 1516 |
"The I</proc/>pidI</setgroups> file was added in Linux 3.19, but was " |
| 1517 |
"backported to many earlier stable kernel series, because it addresses a " |
| 1518 |
"security issue. The issue concerned files with permissions such as \"rwx---" |
| 1519 |
"rwx\". Such files give fewer permissions to \"group\" than they do to " |
| 1520 |
"\"other\". This means that dropping groups using B<setgroups>(2) might " |
| 1521 |
"allow a process file access that it did not formerly have. Before the " |
| 1522 |
"existence of user namespaces this was not a concern, since only a privileged " |
| 1523 |
"process (one with the B<CAP_SETGID> capability) could call " |
| 1524 |
"B<setgroups>(2). However, with the introduction of user namespaces, it " |
| 1525 |
"became possible for an unprivileged process to create a new namespace in " |
| 1526 |
"which the user had all privileges. This then allowed formerly unprivileged " |
| 1527 |
"users to drop groups and thus gain file access that they did not previously " |
| 1528 |
"have. The I</proc/>pidI</setgroups> file was added to address this security " |
| 1529 |
"issue, by denying any pathway for an unprivileged process to drop groups " |
| 1530 |
"with B<setgroups>(2)." |
| 1531 |
msgstr "" |
| 1532 |
"Le fichier I</proc/>pidI</setgroups> a été ajouté dans Linux 3.19, mais a " |
| 1533 |
"été rétroporté vers plusieurs séries stables du noyau car il corrige un " |
| 1534 |
"problème de sécurité. Cela concernait les fichiers avec les permissions " |
| 1535 |
"telles que « rwx---rwx ». De tels fichiers accordent moins de permissions au " |
| 1536 |
"« group » qu’elles ne donnent à « other ». Cela signifie qu’abandonner les " |
| 1537 |
"groupes utilisant B<setgroups>(2) peut permettre un accès au fichier du " |
| 1538 |
"processus que celui-ci n’avait pas auparavant. Avant l’existence des espaces " |
| 1539 |
"de noms utilisateur cela n’était pas un problème, puisque seul un processus " |
| 1540 |
"privilégié (un avec la capacité B<CAP_SETGID>) pouvait appeler " |
| 1541 |
"B<setgroups>(2). Cependant, avec l’introduction des espaces de noms " |
| 1542 |
"utilisateur, il est devenu possible pour un processus non privilégié de " |
| 1543 |
"créer un nouvel espace de noms dans lequel l’utilisateur a tous les " |
| 1544 |
"privilèges. Cela permet alors à des utilisateurs anciennement non " |
| 1545 |
"privilégiés d’abandonner les groupes et donc obtenir l’accès à des fichiers " |
| 1546 |
"auxquels ils ne pouvaient pas accéder. Le fichier I</proc/>pidI</setgroups> " |
| 1547 |
"a été ajouté pour résoudre le problème de sécurité en refusant à tout chemin " |
| 1548 |
"pour un processus non privilégié d’abandonner les groupes avec " |
| 1549 |
"B<setgroups>(2)." |
| 1550 |
|
| 1551 |
#. type: SS |
| 1552 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1553 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1554 |
#, no-wrap |
| 1555 |
msgid "Unmapped user and group IDs" |
| 1556 |
msgstr "ID utilisateur et groupe non mappés" |
| 1557 |
|
| 1558 |
#. from_kuid_munged(), from_kgid_munged() |
| 1559 |
#. type: Plain text |
| 1560 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1561 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1562 |
msgid "" |
| 1563 |
"There are various places where an unmapped user ID (group ID) may be " |
| 1564 |
"exposed to user space. For example, the first process in a new user " |
| 1565 |
"namespace may call B<getuid>(2) before a user ID mapping has been defined " |
| 1566 |
"for the namespace. In most such cases, an unmapped user ID is converted to " |
| 1567 |
"the overflow user ID (group ID); the default value for the overflow user ID " |
| 1568 |
"(group ID) is 65534. See the descriptions of I</proc/sys/kernel/" |
| 1569 |
"overflowuid> and I</proc/sys/kernel/overflowgid> in B<proc>(5)." |
| 1570 |
msgstr "" |
| 1571 |
"Il existe différentes situations dans lesquelles un identifiant utilisateur " |
| 1572 |
"(ou de groupe) non mappé peut être exposé dans un espace de noms " |
| 1573 |
"utilisateur. Par exemple, le premier processus d'un nouvel espace de noms " |
| 1574 |
"utilisateur peut appeler B<getuid>() avant que le mappage des identifiants " |
| 1575 |
"utilisateur ait été défini pour l'espace de noms. Dans la plupart de ces " |
| 1576 |
"cas, l'identifiant utilisateur non mappé est converti en un identifiant " |
| 1577 |
"utilisateur (groupe) au-delà de la limite de débordement ; la valeur par " |
| 1578 |
"défaut au delà de cette limite pour un identifiant utilisateur (ou groupe) " |
| 1579 |
"est 65534. Consultez les descriptions de I</proc/sys/kernel/overflowuid> et " |
| 1580 |
"de I</proc/sys/kernel/overflowgid> dans B<proc>(5)." |
| 1581 |
|
| 1582 |
#. also SO_PEERCRED |
| 1583 |
#. type: Plain text |
| 1584 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1585 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1586 |
msgid "" |
| 1587 |
"The cases where unmapped IDs are mapped in this fashion include system calls " |
| 1588 |
"that return user IDs (B<getuid>(2), B<getgid>(2), and similar), credentials " |
| 1589 |
"passed over a UNIX domain socket, credentials returned by B<stat>(2), " |
| 1590 |
"B<waitid>(2), and the System V IPC \"ctl\" B<IPC_STAT> operations, " |
| 1591 |
"credentials exposed by I</proc/>pidI</status> and the files in I</proc/" |
| 1592 |
"sysvipc/*>, credentials returned via the I<si_uid> field in the I<siginfo_t> " |
| 1593 |
"received with a signal (see B<sigaction>(2)), credentials written to the " |
| 1594 |
"process accounting file (see B<acct>(5)), and credentials returned with " |
| 1595 |
"POSIX message queue notifications (see B<mq_notify>(3))." |
| 1596 |
msgstr "" |
| 1597 |
"Les situations dans lesquelles des identifiants non mappés sont transformés " |
| 1598 |
"de cette façon comprennent les cas des appels système qui renvoient des " |
| 1599 |
"identifiants utilisateur (B<getuid>(2), B<getgid>(2) et les appels " |
| 1600 |
"similaires), les accréditations passées à l’aide d’un socket de domaine " |
| 1601 |
"UNIX, les accréditations renvoyées par B<stat>(2), B<waitid>(2) et les " |
| 1602 |
"autres opérations IPC « ctl » B<IPC_STAT> de System V, les accréditations " |
| 1603 |
"présentées par I</proc/>pidI</status> et les fichiers I</proc/sysvipc/*>, " |
| 1604 |
"les accréditations renvoyées par le champ I<si_uid> de I<siginfo_t> reçues " |
| 1605 |
"avec un signal (consultez B<sigaction>(2)), les accréditations écrites dans " |
| 1606 |
"le fichier du processus de tenue des comptes (consultez B<acct>(5)) et les " |
| 1607 |
"accréditations renvoyées avec des notifications de files de messages POSIX " |
| 1608 |
"(consultez B<mq_notify>(3))." |
| 1609 |
|
| 1610 |
# |
| 1611 |
#. from_kuid(), from_kgid() |
| 1612 |
#. Also F_GETOWNER_UIDS is an exception |
| 1613 |
#. ============================================================ |
| 1614 |
#. type: Plain text |
| 1615 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1616 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1617 |
msgid "" |
| 1618 |
"There is one notable case where unmapped user and group IDs are I<not> " |
| 1619 |
"converted to the corresponding overflow ID value. When viewing a I<uid_map> " |
| 1620 |
"or I<gid_map> file in which there is no mapping for the second field, that " |
| 1621 |
"field is displayed as 4294967295 (-1 as an unsigned integer)." |
| 1622 |
msgstr "" |
| 1623 |
"Il est un cas notable où des identifiants d'utilisateur et de groupe non " |
| 1624 |
"mappés I<ne sont pas> convertis en des valeurs d’ID correspondantes au-delà " |
| 1625 |
"de la limite. Lors de la consultation d'un fichier I<uid_map> ou I<gid_map> " |
| 1626 |
"dans lequel il n'y a pas de mappage pour le second champ, ce champ apparaît " |
| 1627 |
"comme 4294967295 (-1 représenté comme un entier non signé)." |
| 1628 |
|
| 1629 |
#. type: SS |
| 1630 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1631 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1632 |
#, no-wrap |
| 1633 |
msgid "Accessing files" |
| 1634 |
msgstr "Accession aux fichiers" |
| 1635 |
|
| 1636 |
# |
| 1637 |
#. ============================================================ |
| 1638 |
#. type: Plain text |
| 1639 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1640 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1641 |
msgid "" |
| 1642 |
"In order to determine permissions when an unprivileged process accesses a " |
| 1643 |
"file, the process credentials (UID, GID) and the file credentials are in " |
| 1644 |
"effect mapped back to what they would be in the initial user namespace and " |
| 1645 |
"then compared to determine the permissions that the process has on the " |
| 1646 |
"file. The same is also true of other objects that employ the credentials " |
| 1647 |
"plus permissions mask accessibility model, such as System V IPC objects." |
| 1648 |
msgstr "" |
| 1649 |
"Dans le but de déterminer les permissions quand un processus non privilégié " |
| 1650 |
"accède à un fichier, les accréditations du processus (UID, GID) et les " |
| 1651 |
"accréditations du fichier sont en réalité mappées vers ce qu’elles seraient " |
| 1652 |
"dans l’espace de noms utilisateur initial et alors comparées pour déterminer " |
| 1653 |
"les permissions que le processus possède sur le fichier. La même chose est " |
| 1654 |
"valable pour les autres objets qui emploient les accréditations plus le " |
| 1655 |
"modèle d’accessibilité avec le masque de permission, tels que les objets IPC " |
| 1656 |
"de System V." |
| 1657 |
|
| 1658 |
#. type: SS |
| 1659 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1660 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1661 |
#, no-wrap |
| 1662 |
msgid "Operation of file-related capabilities" |
| 1663 |
msgstr "Opérations sur les capacités relatives aux fichiers" |
| 1664 |
|
| 1665 |
#. type: Plain text |
| 1666 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1667 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1668 |
msgid "" |
| 1669 |
"Certain capabilities allow a process to bypass various kernel-enforced " |
| 1670 |
"restrictions when performing operations on files owned by other users or " |
| 1671 |
"groups. These capabilities are: B<CAP_CHOWN>, B<CAP_DAC_OVERRIDE>, " |
| 1672 |
"B<CAP_DAC_READ_SEARCH>, B<CAP_FOWNER>, and B<CAP_FSETID>." |
| 1673 |
msgstr "" |
| 1674 |
"Certaines capacités permettent à un processus de contourner diverses " |
| 1675 |
"restrictions imposées par le noyau lors d’opérations sur des fichiers " |
| 1676 |
"possédés par d’autres utilisateurs ou groupes. Ce sont B<CAP_CHOWN>, " |
| 1677 |
"B<CAP_DAC_OVERRIDE>, B<CAP_DAC_READ_SEARCH>, B<CAP_FOWNER> et B<CAP_FSETID>." |
| 1678 |
|
| 1679 |
#. type: Plain text |
| 1680 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1681 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1682 |
msgid "" |
| 1683 |
"Within a user namespace, these capabilities allow a process to bypass the " |
| 1684 |
"rules if the process has the relevant capability over the file, meaning that:" |
| 1685 |
msgstr "" |
| 1686 |
"Dans un espace de noms utilisateur, ces capacités permettent à un processus " |
| 1687 |
"de contourner les règles si le processus possède la capacité adéquate sur le " |
| 1688 |
"fichier, signifiant que :" |
| 1689 |
|
| 1690 |
#. type: Plain text |
| 1691 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1692 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1693 |
msgid "" |
| 1694 |
"the process has the relevant effective capability in its user namespace; and" |
| 1695 |
msgstr "" |
| 1696 |
"le processus a la capacité effective adéquate dans son espace de noms " |
| 1697 |
"utilisateur;" |
| 1698 |
|
| 1699 |
#. type: Plain text |
| 1700 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1701 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1702 |
msgid "" |
| 1703 |
"the file's user ID and group ID both have valid mappings in the user " |
| 1704 |
"namespace." |
| 1705 |
msgstr "" |
| 1706 |
"les ID utilisateur et groupe du fichier ont tous les deux des mappages " |
| 1707 |
"valables dans l’espace de noms utilisateur." |
| 1708 |
|
| 1709 |
# |
| 1710 |
#. #-#-#-#-# archlinux: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 1711 |
#. These are the checks performed by the kernel function |
| 1712 |
#. inode_owner_or_capable(). There is one exception to the exception: |
| 1713 |
#. overriding the directory sticky permission bit requires that |
| 1714 |
#. the file has a valid mapping for both its UID and GID. |
| 1715 |
#. ============================================================ |
| 1716 |
#. type: Plain text |
| 1717 |
#. #-#-#-#-# debian-trixie: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 1718 |
#. These are the checks performed by the kernel function |
| 1719 |
#. inode_owner_or_capable(). There is one exception to the exception: |
| 1720 |
#. overriding the directory sticky permission bit requires that |
| 1721 |
#. the file has a valid mapping for both its UID and GID. |
| 1722 |
#. ============================================================ |
| 1723 |
#. type: Plain text |
| 1724 |
#. #-#-#-#-# debian-unstable: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 1725 |
#. These are the checks performed by the kernel function |
| 1726 |
#. inode_owner_or_capable(). There is one exception to the exception: |
| 1727 |
#. overriding the directory sticky permission bit requires that |
| 1728 |
#. the file has a valid mapping for both its UID and GID. |
| 1729 |
#. ============================================================ |
| 1730 |
#. type: Plain text |
| 1731 |
#. #-#-#-#-# fedora-44: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 1732 |
#. These are the checks performed by the kernel function |
| 1733 |
#. inode_owner_or_capable(). There is one exception to the exception: |
| 1734 |
#. overriding the directory sticky permission bit requires that |
| 1735 |
#. the file has a valid mapping for both its UID and GID. |
| 1736 |
#. ============================================================ |
| 1737 |
#. type: Plain text |
| 1738 |
#. #-#-#-#-# fedora-rawhide: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 1739 |
#. These are the checks performed by the kernel function |
| 1740 |
#. inode_owner_or_capable(). There is one exception to the exception: |
| 1741 |
#. overriding the directory sticky permission bit requires that |
| 1742 |
#. the file has a valid mapping for both its UID and GID. |
| 1743 |
#. ============================================================ |
| 1744 |
#. type: Plain text |
| 1745 |
#. #-#-#-#-# mageia-cauldron: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 1746 |
#. These are the checks performed by the kernel function |
| 1747 |
#. inode_owner_or_capable(). There is one exception to the exception: |
| 1748 |
#. overriding the directory sticky permission bit requires that |
| 1749 |
#. the file has a valid mapping for both its UID and GID. |
| 1750 |
#. ============================================================ |
| 1751 |
#. type: Plain text |
| 1752 |
#. #-#-#-#-# opensuse-leap-16-1: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 1753 |
#. These are the checks performed by the kernel function |
| 1754 |
#. inode_owner_or_capable(). There is one exception to the exception: |
| 1755 |
#. overriding the directory sticky permission bit requires that |
| 1756 |
#. the file has a valid mapping for both its UID and GID. |
| 1757 |
#. ============================================================ |
| 1758 |
#. type: Plain text |
| 1759 |
#. #-#-#-#-# opensuse-tumbleweed: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 1760 |
#. These are the checks performed by the kernel function |
| 1761 |
#. inode_owner_or_capable(). There is one exception to the exception: |
| 1762 |
#. overriding the directory sticky permission bit requires that |
| 1763 |
#. the file has a valid mapping for both its UID and GID. |
| 1764 |
#. ============================================================ |
| 1765 |
#. type: Plain text |
| 1766 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1767 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1768 |
msgid "" |
| 1769 |
"The B<CAP_FOWNER> capability is treated somewhat exceptionally: it allows a " |
| 1770 |
"process to bypass the corresponding rules so long as at least the file's " |
| 1771 |
"user ID has a mapping in the user namespace (i.e., the file's group ID does " |
| 1772 |
"not need to have a valid mapping)." |
| 1773 |
msgstr "" |
| 1774 |
"La capacité B<CAP_FOWNER> est traitée de manière quelque peu exceptionnelle. " |
| 1775 |
"Elle permet à un processus de contourner les règles correspondantes à " |
| 1776 |
"condition qu’au moins l’ID utilisateur du fichier possède un mappage dans " |
| 1777 |
"l’espace de noms utilisateur (c’est-à-dire que l’ID de groupe du fichier n’a " |
| 1778 |
"nul besoin d’avoir un mappage valable)." |
| 1779 |
|
| 1780 |
#. type: SS |
| 1781 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1782 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1783 |
#, no-wrap |
| 1784 |
msgid "Set-user-ID and set-group-ID programs" |
| 1785 |
msgstr "Programmes set-user-ID et set-group-ID" |
| 1786 |
|
| 1787 |
# |
| 1788 |
#. ============================================================ |
| 1789 |
#. type: Plain text |
| 1790 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1791 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1792 |
msgid "" |
| 1793 |
"When a process inside a user namespace executes a set-user-ID (set-group-ID) " |
| 1794 |
"program, the process's effective user (group) ID inside the namespace is " |
| 1795 |
"changed to whatever value is mapped for the user (group) ID of the file. " |
| 1796 |
"However, if either the user I<or> the group ID of the file has no mapping " |
| 1797 |
"inside the namespace, the set-user-ID (set-group-ID) bit is silently " |
| 1798 |
"ignored: the new program is executed, but the process's effective user " |
| 1799 |
"(group) ID is left unchanged. (This mirrors the semantics of executing a " |
| 1800 |
"set-user-ID or set-group-ID program that resides on a filesystem that was " |
| 1801 |
"mounted with the B<MS_NOSUID> flag, as described in B<mount>(2).)" |
| 1802 |
msgstr "" |
| 1803 |
"Lorsqu'un processus appartenant à un espace de noms exécute un programme set-" |
| 1804 |
"user-ID (set-group-ID), l'identifiant utilisateur (groupe) effectif du " |
| 1805 |
"processus dans l'espace de noms est changé à n’importe quelle valeur mappée " |
| 1806 |
"pour l’identifiant utilisateur (groupe) du fichier. Cependant, si " |
| 1807 |
"l'identifiant utilisateur I<ou> groupe n'a pas de mappage dans l'espace de " |
| 1808 |
"noms, le bit set-user-ID (set-group-ID) est ignoré silencieusement : le " |
| 1809 |
"nouveau programme est exécuté, mais l'identifiant utilisateur (groupe) " |
| 1810 |
"effectif n’est pas modifié. Cela reproduit la sémantique d'exécution d'un " |
| 1811 |
"programme set-user-ID ou set-group-ID qui se trouve dans un système de " |
| 1812 |
"fichiers monté avec l'indicateur B<MS_NOSUID>, comme indiqué dans " |
| 1813 |
"B<mount>(2)." |
| 1814 |
|
| 1815 |
#. type: SS |
| 1816 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1817 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1818 |
#, no-wrap |
| 1819 |
msgid "Miscellaneous" |
| 1820 |
msgstr "Divers" |
| 1821 |
|
| 1822 |
#. type: Plain text |
| 1823 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1824 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1825 |
msgid "" |
| 1826 |
"When a process's user and group IDs are passed over a UNIX domain socket to " |
| 1827 |
"a process in a different user namespace (see the description of " |
| 1828 |
"B<SCM_CREDENTIALS> in B<unix>(7)), they are translated into the " |
| 1829 |
"corresponding values as per the receiving process's user and group ID " |
| 1830 |
"mappings." |
| 1831 |
msgstr "" |
| 1832 |
"Lorsque les identifiants utilisateur et groupe d'un processus sont transmis " |
| 1833 |
"à l’aide d’un socket de domaine UNIX à un processus d'un autre espace de " |
| 1834 |
"noms (consultez la description de B<SCM_CREDENTIALS> dans B<unix>(7)), ils " |
| 1835 |
"sont transformés en leur valeur correspondante suivant les mappages des " |
| 1836 |
"identifiants utilisateur et groupe du processus réceptionnaire." |
| 1837 |
|
| 1838 |
#. type: SH |
| 1839 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1840 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1841 |
#, no-wrap |
| 1842 |
msgid "STANDARDS" |
| 1843 |
msgstr "NORMES" |
| 1844 |
|
| 1845 |
#. type: Plain text |
| 1846 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1847 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1848 |
msgid "Linux." |
| 1849 |
msgstr "Linux." |
| 1850 |
|
| 1851 |
#. type: SH |
| 1852 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1853 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1854 |
#, no-wrap |
| 1855 |
msgid "NOTES" |
| 1856 |
msgstr "NOTES" |
| 1857 |
|
| 1858 |
# |
| 1859 |
#. ============================================================ |
| 1860 |
#. type: Plain text |
| 1861 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1862 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1863 |
msgid "" |
| 1864 |
"Over the years, there have been a lot of features that have been added to " |
| 1865 |
"the Linux kernel that have been made available only to privileged users " |
| 1866 |
"because of their potential to confuse set-user-ID-root applications. In " |
| 1867 |
"general, it becomes safe to allow the root user in a user namespace to use " |
| 1868 |
"those features because it is impossible, while in a user namespace, to gain " |
| 1869 |
"more privilege than the root user of a user namespace has." |
| 1870 |
msgstr "" |
| 1871 |
"Au fil des ans, de nombreuses fonctionnalités ont été ajoutées au noyau " |
| 1872 |
"Linux mais réservées aux utilisateurs disposant de privilèges du fait de la " |
| 1873 |
"confusion qu'elles peuvent induire dans les applications set-user-ID-root. " |
| 1874 |
"En général, il n'est pas dangereux d'autoriser un superutilisateur d'un " |
| 1875 |
"espace de noms à utiliser ces fonctionnalités parce qu'il est impossible, " |
| 1876 |
"dans un espace de noms utilisateur, d'obtenir plus de droits que ce que peut " |
| 1877 |
"obtenir le superutilisateur d’un espace de noms utilisateur." |
| 1878 |
|
| 1879 |
#. type: SS |
| 1880 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1881 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1882 |
#, no-wrap |
| 1883 |
msgid "Global root" |
| 1884 |
msgstr "Superutilisateur global" |
| 1885 |
|
| 1886 |
# |
| 1887 |
#. ============================================================ |
| 1888 |
#. type: Plain text |
| 1889 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1890 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1891 |
msgid "" |
| 1892 |
"The term \"global root\" is sometimes used as a shorthand for user ID 0 in " |
| 1893 |
"the initial user namespace." |
| 1894 |
msgstr "" |
| 1895 |
"Le terme de « superutilisateur global » (global root) est parfois utilisé " |
| 1896 |
"comme un raccourci pour l’ID 0 dans l’espace de noms utilisateur initial." |
| 1897 |
|
| 1898 |
#. type: SS |
| 1899 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1900 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1901 |
#, no-wrap |
| 1902 |
msgid "Availability" |
| 1903 |
msgstr "Disponibilité" |
| 1904 |
|
| 1905 |
#. type: Plain text |
| 1906 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1907 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1908 |
msgid "" |
| 1909 |
"Use of user namespaces requires a kernel that is configured with the " |
| 1910 |
"B<CONFIG_USER_NS> option. User namespaces require support in a range of " |
| 1911 |
"subsystems across the kernel. When an unsupported subsystem is configured " |
| 1912 |
"into the kernel, it is not possible to configure user namespaces support." |
| 1913 |
msgstr "" |
| 1914 |
"Le noyau doit avoir été configuré avec l'option B<CONFIG_USER_NS> pour " |
| 1915 |
"permettre l'utilisation des espaces de noms utilisateur. Ces espaces doivent " |
| 1916 |
"également être pris en charge par un ensemble de sous-systèmes du noyau. Si " |
| 1917 |
"un sous-système non pris en charge est activé dans le noyau, il n'est pas " |
| 1918 |
"possible de configurer la prise en charge des espaces de noms." |
| 1919 |
|
| 1920 |
#. commit d6970d4b726cea6d7a9bc4120814f95c09571fc3 |
| 1921 |
#. type: Plain text |
| 1922 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1923 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1924 |
msgid "" |
| 1925 |
"As at Linux 3.8, most relevant subsystems supported user namespaces, but a " |
| 1926 |
"number of filesystems did not have the infrastructure needed to map user and " |
| 1927 |
"group IDs between user namespaces. Linux 3.9 added the required " |
| 1928 |
"infrastructure support for many of the remaining unsupported filesystems " |
| 1929 |
"(Plan 9 (9P), Andrew File System (AFS), Ceph, CIFS, CODA, NFS, and OCFS2). " |
| 1930 |
"Linux 3.12 added support for the last of the unsupported major filesystems, " |
| 1931 |
"XFS." |
| 1932 |
msgstr "" |
| 1933 |
"Depuis Linux 3.8, la plupart des principaux sous-systèmes prennent en charge " |
| 1934 |
"les espaces de noms utilisateur, mais certains systèmes de fichiers n'ont " |
| 1935 |
"pas l'infrastructure nécessaire pour mapper les identifiants utilisateur et " |
| 1936 |
"groupe entre les espaces de noms utilisateur. Linux 3.9 a fourni " |
| 1937 |
"l'infrastructure nécessaire à la prise en charge de nombreux systèmes de " |
| 1938 |
"fichiers restants (Plan 9 (9P), Andrew File System (AFS), Ceph, CIFS, CODA, " |
| 1939 |
"NFS et OCFS2). Linux 3.12 a apporté la prise en charge du dernier des " |
| 1940 |
"principaux systèmes de fichiers non encore géré, XFS." |
| 1941 |
|
| 1942 |
#. type: SH |
| 1943 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1944 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1945 |
#, no-wrap |
| 1946 |
msgid "EXAMPLES" |
| 1947 |
msgstr "EXEMPLES" |
| 1948 |
|
| 1949 |
#. type: Plain text |
| 1950 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1951 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1952 |
msgid "" |
| 1953 |
"The program below is designed to allow experimenting with user namespaces, " |
| 1954 |
"as well as other types of namespaces. It creates namespaces as specified by " |
| 1955 |
"command-line options and then executes a command inside those namespaces. " |
| 1956 |
"The comments and I<usage>() function inside the program provide a full " |
| 1957 |
"explanation of the program. The following shell session demonstrates its " |
| 1958 |
"use." |
| 1959 |
msgstr "" |
| 1960 |
"Le programme suivant est conçu pour permettre de s'exercer avec les espaces " |
| 1961 |
"de noms utilisateur, comme avec d'autres espaces de noms. Il crée des " |
| 1962 |
"espaces de noms tels que définis dans les options de la ligne de commande et " |
| 1963 |
"exécute une commande dans ces espaces de noms. Les commentaires et la " |
| 1964 |
"fonction I<usage>() dans le programme fournissent une explication détaillée " |
| 1965 |
"du programme. La session shell suivante illustre son utilisation." |
| 1966 |
|
| 1967 |
#. type: Plain text |
| 1968 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1969 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1970 |
msgid "First, we look at the run-time environment:" |
| 1971 |
msgstr "Tout d'abord, regardons l'environnement d'exécution :" |
| 1972 |
|
| 1973 |
#. type: Plain text |
| 1974 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1975 |
#: opensuse-tumbleweed |
| 1976 |
#, no-wrap |
| 1977 |
msgid "" |
| 1978 |
"$B< uname -rs>; # Need Linux 3.8 or later\n" |
| 1979 |
"Linux 3.8.0\n" |
| 1980 |
"$B< id -u>; # Running as unprivileged user\n" |
| 1981 |
"1000\n" |
| 1982 |
"$B< id -g>;\n" |
| 1983 |
"1000\n" |
| 1984 |
msgstr "" |
| 1985 |
"$ B<uname -rs>; # à partir de Linux 3.8\n" |
| 1986 |
"Linux 3.8.0\n" |
| 1987 |
"$ B<id -u>; # exécuté comme utilisateur sans privilèges\n" |
| 1988 |
"1000\n" |
| 1989 |
"$ B<id -g>;\n" |
| 1990 |
"1000\n" |
| 1991 |
|
| 1992 |
#. type: Plain text |
| 1993 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1994 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1995 |
msgid "" |
| 1996 |
"Now start a new shell in new user (I<-U>), mount (I<-m>), and PID (I<-p>) " |
| 1997 |
"namespaces, with user ID (I<-M>) and group ID (I<-G>) 1000 mapped to 0 " |
| 1998 |
"inside the user namespace:" |
| 1999 |
msgstr "" |
| 2000 |
"Démarrons maintenant un nouveau shell dans les nouveaux espaces de noms " |
| 2001 |
"utilisateur (I<-U>), de montage (I<-m>) et de PID (I<-p>), avec " |
| 2002 |
"l'identifiant utilisateur (I<-M>) et groupe (I<-G>) 1000 mappés à 0 dans " |
| 2003 |
"l'espace de noms utilisateur :" |
| 2004 |
|
| 2005 |
#. type: Plain text |
| 2006 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2007 |
#: opensuse-tumbleweed |
| 2008 |
#, no-wrap |
| 2009 |
msgid "$B< ./userns_child_exec -p -m -U -M \\[aq]0 1000 1\\[aq] -G \\[aq]0 1000 1\\[aq] bash>;\n" |
| 2010 |
msgstr "$ B<./userns_child_exec -p -m -U -M \\[aq]0 1000 1\\[aq] -G \\[aq]0 1000 1\\[aq] bash>;\n" |
| 2011 |
|
| 2012 |
#. type: Plain text |
| 2013 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2014 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2015 |
msgid "" |
| 2016 |
"The shell has PID 1, because it is the first process in the new PID " |
| 2017 |
"namespace:" |
| 2018 |
msgstr "" |
| 2019 |
"Le shell a le PID 1 puisqu'il est le premier processus de l'espace de noms :" |
| 2020 |
|
| 2021 |
#. type: Plain text |
| 2022 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2023 |
#: opensuse-tumbleweed |
| 2024 |
#, no-wrap |
| 2025 |
msgid "" |
| 2026 |
"bash$B< echo $$>;\n" |
| 2027 |
"1\n" |
| 2028 |
msgstr "" |
| 2029 |
"bash$ B<echo $$>;\n" |
| 2030 |
"1\n" |
| 2031 |
|
| 2032 |
#. type: Plain text |
| 2033 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2034 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2035 |
msgid "" |
| 2036 |
"Mounting a new I</proc> filesystem and listing all of the processes visible " |
| 2037 |
"in the new PID namespace shows that the shell can't see any processes " |
| 2038 |
"outside the PID namespace:" |
| 2039 |
msgstr "" |
| 2040 |
"Lorsque l'on monte un nouveau système de fichiers I</proc> et que l'on " |
| 2041 |
"affiche tous les processus visibles dans le nouvel espace de noms PID, on " |
| 2042 |
"constate que le shell peut voir tous les processus qui se trouvent à " |
| 2043 |
"l'extérieur de l'espace de noms PID :" |
| 2044 |
|
| 2045 |
#. type: Plain text |
| 2046 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2047 |
#: opensuse-tumbleweed |
| 2048 |
#, no-wrap |
| 2049 |
msgid "" |
| 2050 |
"bash$B< mount -t proc proc /proc>;\n" |
| 2051 |
"bash$B< ps ax>;\n" |
| 2052 |
" PID TTY STAT TIME COMMAND\n" |
| 2053 |
" 1 pts/3 S 0:00 bash\n" |
| 2054 |
" 22 pts/3 R+ 0:00 ps ax\n" |
| 2055 |
msgstr "" |
| 2056 |
"bash$ B<mount -t proc proc /proc>;\n" |
| 2057 |
"bash$ B<ps ax>;\n" |
| 2058 |
" PID TTY STAT TIME COMMAND\n" |
| 2059 |
" 1 pts/3 S 0:00 bash\n" |
| 2060 |
" 22 pts/3 R+ 0:00 ps ax\n" |
| 2061 |
|
| 2062 |
#. type: Plain text |
| 2063 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2064 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2065 |
msgid "" |
| 2066 |
"Inside the user namespace, the shell has user and group ID 0, and a full set " |
| 2067 |
"of permitted and effective capabilities:" |
| 2068 |
msgstr "" |
| 2069 |
"Dans l'espace de noms utilisateur, le shell a les identifiants utilisateur " |
| 2070 |
"et groupe 0, ainsi qu'un ensemble complet de capacités autorisées et " |
| 2071 |
"effectives :" |
| 2072 |
|
| 2073 |
#. type: Plain text |
| 2074 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2075 |
#: opensuse-tumbleweed |
| 2076 |
#, no-wrap |
| 2077 |
msgid "" |
| 2078 |
"bash$B< cat /proc/$$/status | egrep \\[aq]\\[ha][UG]id\\[aq]>;\n" |
| 2079 |
"Uid:\t0\t0\t0\t0\n" |
| 2080 |
"Gid:\t0\t0\t0\t0\n" |
| 2081 |
"bash$B< cat /proc/$$/status | egrep \\[aq]\\[ha]Cap(Prm|Inh|Eff)\\[aq]>;\n" |
| 2082 |
"CapInh:\t0000000000000000\n" |
| 2083 |
"CapPrm:\t0000001fffffffff\n" |
| 2084 |
"CapEff:\t0000001fffffffff\n" |
| 2085 |
msgstr "" |
| 2086 |
"bash$ B<cat /proc/$$/status | egrep \\[aq]\\[ha][UG]id\\[aq]>;\n" |
| 2087 |
"Uid:\t0\t0\t0\t0\n" |
| 2088 |
"Gid:\t0\t0\t0\t0\n" |
| 2089 |
"bash$ B<cat /proc/$$/status | egrep \\[aq]\\[ha]Cap(Prm|Inh|Eff)\\[aq]>;\n" |
| 2090 |
"CapInh:\t0000000000000000\n" |
| 2091 |
"CapPrm:\t0000001fffffffff\n" |
| 2092 |
"CapEff:\t0000001fffffffff\n" |
| 2093 |
|
| 2094 |
#. type: SS |
| 2095 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2096 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2097 |
#, no-wrap |
| 2098 |
msgid "Program source" |
| 2099 |
msgstr "Source du programme" |
| 2100 |
|
| 2101 |
#. type: Plain text |
| 2102 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2103 |
#: opensuse-tumbleweed |
| 2104 |
#, no-wrap |
| 2105 |
msgid "" |
| 2106 |
"/* userns_child_exec.c\n" |
| 2107 |
"\\&\n" |
| 2108 |
" Licensed under GNU General Public License v2 or later\n" |
| 2109 |
"\\&\n" |
| 2110 |
" Create a child process that executes a shell command in new\n" |
| 2111 |
" namespace(s); allow UID and GID mappings to be specified when\n" |
| 2112 |
" creating a user namespace.\n" |
| 2113 |
"*/\n" |
| 2114 |
"#define _GNU_SOURCE\n" |
| 2115 |
"#include E<lt>err.hE<gt>\n" |
| 2116 |
"#include E<lt>sched.hE<gt>\n" |
| 2117 |
"#include E<lt>unistd.hE<gt>\n" |
| 2118 |
"#include E<lt>stdint.hE<gt>\n" |
| 2119 |
"#include E<lt>stdlib.hE<gt>\n" |
| 2120 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 2121 |
"#include E<lt>signal.hE<gt>\n" |
| 2122 |
"#include E<lt>fcntl.hE<gt>\n" |
| 2123 |
"#include E<lt>stdio.hE<gt>\n" |
| 2124 |
"#include E<lt>string.hE<gt>\n" |
| 2125 |
"#include E<lt>limits.hE<gt>\n" |
| 2126 |
"#include E<lt>errno.hE<gt>\n" |
| 2127 |
"\\&\n" |
| 2128 |
"struct child_args {\n" |
| 2129 |
" char **argv; /* Command to be executed by child, with args */\n" |
| 2130 |
" int pipe_fd[2]; /* Pipe used to synchronize parent and child */\n" |
| 2131 |
"};\n" |
| 2132 |
"\\&\n" |
| 2133 |
"static int verbose;\n" |
| 2134 |
"\\&\n" |
| 2135 |
"static void\n" |
| 2136 |
"usage(char *pname)\n" |
| 2137 |
"{\n" |
| 2138 |
" fprintf(stderr, \"Usage: %s [options] cmd [arg...]\\[rs]n\\[rs]n\", pname);\n" |
| 2139 |
" fprintf(stderr, \"Create a child process that executes a shell \"\n" |
| 2140 |
" \"command in a new user namespace,\\[rs]n\"\n" |
| 2141 |
" \"and possibly also other new namespace(s).\\[rs]n\\[rs]n\");\n" |
| 2142 |
" fprintf(stderr, \"Options can be:\\[rs]n\\[rs]n\");\n" |
| 2143 |
"#define fpe(str) fprintf(stderr, \" %s\", str);\n" |
| 2144 |
" fpe(\"-i New IPC namespace\\[rs]n\");\n" |
| 2145 |
" fpe(\"-m New mount namespace\\[rs]n\");\n" |
| 2146 |
" fpe(\"-n New network namespace\\[rs]n\");\n" |
| 2147 |
" fpe(\"-p New PID namespace\\[rs]n\");\n" |
| 2148 |
" fpe(\"-u New UTS namespace\\[rs]n\");\n" |
| 2149 |
" fpe(\"-U New user namespace\\[rs]n\");\n" |
| 2150 |
" fpe(\"-M uid_map Specify UID map for user namespace\\[rs]n\");\n" |
| 2151 |
" fpe(\"-G gid_map Specify GID map for user namespace\\[rs]n\");\n" |
| 2152 |
" fpe(\"-z Map user\\[aq]s UID and GID to 0 in user namespace\\[rs]n\");\n" |
| 2153 |
" fpe(\" (equivalent to: -M \\[aq]0 E<lt>uidE<gt> 1\\[aq] -G \\[aq]0 E<lt>gidE<gt> 1\\[aq])\\[rs]n\");\n" |
| 2154 |
" fpe(\"-v Display verbose messages\\[rs]n\");\n" |
| 2155 |
" fpe(\"\\[rs]n\");\n" |
| 2156 |
" fpe(\"If -z, -M, or -G is specified, -U is required.\\[rs]n\");\n" |
| 2157 |
" fpe(\"It is not permitted to specify both -z and either -M or -G.\\[rs]n\");\n" |
| 2158 |
" fpe(\"\\[rs]n\");\n" |
| 2159 |
" fpe(\"Map strings for -M and -G consist of records of the form:\\[rs]n\");\n" |
| 2160 |
" fpe(\"\\[rs]n\");\n" |
| 2161 |
" fpe(\" ID-inside-ns ID-outside-ns size\\[rs]n\");\n" |
| 2162 |
" fpe(\"\\[rs]n\");\n" |
| 2163 |
" fpe(\"A map string can contain multiple records, separated\"\n" |
| 2164 |
" \" by commas;\\[rs]n\");\n" |
| 2165 |
" fpe(\"the commas are replaced by newlines before writing\"\n" |
| 2166 |
" \" to map files.\\[rs]n\");\n" |
| 2167 |
"\\&\n" |
| 2168 |
" exit(EXIT_FAILURE);\n" |
| 2169 |
"}\n" |
| 2170 |
"\\&\n" |
| 2171 |
"/* Update the mapping file \\[aq]map_file\\[aq], with the value provided in\n" |
| 2172 |
" \\[aq]mapping\\[aq], a string that defines a UID or GID mapping. A UID or\n" |
| 2173 |
" GID mapping consists of one or more newline-delimited records\n" |
| 2174 |
" of the form:\n" |
| 2175 |
"\\&\n" |
| 2176 |
" ID_inside-ns ID-outside-ns size\n" |
| 2177 |
"\\&\n" |
| 2178 |
" Requiring the user to supply a string that contains newlines is\n" |
| 2179 |
" of course inconvenient for command-line use. Thus, we permit the\n" |
| 2180 |
" use of commas to delimit records in this string, and replace them\n" |
| 2181 |
" with newlines before writing the string to the file. */\n" |
| 2182 |
"\\&\n" |
| 2183 |
"static void\n" |
| 2184 |
"update_map(char *mapping, char *map_file)\n" |
| 2185 |
"{\n" |
| 2186 |
" int fd;\n" |
| 2187 |
" size_t map_len; /* Length of \\[aq]mapping\\[aq] */\n" |
| 2188 |
"\\&\n" |
| 2189 |
" /* Replace commas in mapping string with newlines. */\n" |
| 2190 |
"\\&\n" |
| 2191 |
" map_len = strlen(mapping);\n" |
| 2192 |
" for (size_t j = 0; j E<lt> map_len; j++)\n" |
| 2193 |
" if (mapping[j] == \\[aq],\\[aq])\n" |
| 2194 |
" mapping[j] = \\[aq]\\[rs]n\\[aq];\n" |
| 2195 |
"\\&\n" |
| 2196 |
" fd = open(map_file, O_RDWR);\n" |
| 2197 |
" if (fd == -1) {\n" |
| 2198 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", map_file,\n" |
| 2199 |
" strerror(errno));\n" |
| 2200 |
" exit(EXIT_FAILURE);\n" |
| 2201 |
" }\n" |
| 2202 |
"\\&\n" |
| 2203 |
" if (write(fd, mapping, map_len) != map_len) {\n" |
| 2204 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", map_file,\n" |
| 2205 |
" strerror(errno));\n" |
| 2206 |
" exit(EXIT_FAILURE);\n" |
| 2207 |
" }\n" |
| 2208 |
"\\&\n" |
| 2209 |
" close(fd);\n" |
| 2210 |
"}\n" |
| 2211 |
"\\&\n" |
| 2212 |
"/* Linux 3.19 made a change in the handling of setgroups(2) and\n" |
| 2213 |
" the \\[aq]gid_map\\[aq] file to address a security issue. The issue\n" |
| 2214 |
" allowed *unprivileged* users to employ user namespaces in\n" |
| 2215 |
" order to drop groups. The upshot of the 3.19 changes is that\n" |
| 2216 |
" in order to update the \\[aq]gid_maps\\[aq] file, use of the setgroups()\n" |
| 2217 |
" system call in this user namespace must first be disabled by\n" |
| 2218 |
" writing \"deny\" to one of the /proc/PID/setgroups files for\n" |
| 2219 |
" this namespace. That is the purpose of the following function. */\n" |
| 2220 |
"\\&\n" |
| 2221 |
"static void\n" |
| 2222 |
"proc_setgroups_write(pid_t child_pid, char *str)\n" |
| 2223 |
"{\n" |
| 2224 |
" char setgroups_path[PATH_MAX];\n" |
| 2225 |
" int fd;\n" |
| 2226 |
"\\&\n" |
| 2227 |
" snprintf(setgroups_path, PATH_MAX, \"/proc/%jd/setgroups\",\n" |
| 2228 |
" (intmax_t) child_pid);\n" |
| 2229 |
"\\&\n" |
| 2230 |
" fd = open(setgroups_path, O_RDWR);\n" |
| 2231 |
" if (fd == -1) {\n" |
| 2232 |
"\\&\n" |
| 2233 |
" /* We may be on a system that doesn\\[aq]t support\n" |
| 2234 |
" /proc/PID/setgroups. In that case, the file won\\[aq]t exist,\n" |
| 2235 |
" and the system won\\[aq]t impose the restrictions that Linux 3.19\n" |
| 2236 |
" added. That\\[aq]s fine: we don\\[aq]t need to do anything in order\n" |
| 2237 |
" to permit \\[aq]gid_map\\[aq] to be updated.\n" |
| 2238 |
"\\&\n" |
| 2239 |
" However, if the error from open() was something other than\n" |
| 2240 |
" the ENOENT error that is expected for that case, let the\n" |
| 2241 |
" user know. */\n" |
| 2242 |
"\\&\n" |
| 2243 |
" if (errno != ENOENT)\n" |
| 2244 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", setgroups_path,\n" |
| 2245 |
" strerror(errno));\n" |
| 2246 |
" return;\n" |
| 2247 |
" }\n" |
| 2248 |
"\\&\n" |
| 2249 |
" if (write(fd, str, strlen(str)) == -1)\n" |
| 2250 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", setgroups_path,\n" |
| 2251 |
" strerror(errno));\n" |
| 2252 |
"\\&\n" |
| 2253 |
" close(fd);\n" |
| 2254 |
"}\n" |
| 2255 |
"\\&\n" |
| 2256 |
"static int /* Start function for cloned child */\n" |
| 2257 |
"childFunc(void *arg)\n" |
| 2258 |
"{\n" |
| 2259 |
" struct child_args *args = arg;\n" |
| 2260 |
" char ch;\n" |
| 2261 |
"\\&\n" |
| 2262 |
" /* Wait until the parent has updated the UID and GID mappings.\n" |
| 2263 |
" See the comment in main(). We wait for end of file on a\n" |
| 2264 |
" pipe that will be closed by the parent process once it has\n" |
| 2265 |
" updated the mappings. */\n" |
| 2266 |
"\\&\n" |
| 2267 |
" close(args-E<gt>pipe_fd[1]); /* Close our descriptor for the write\n" |
| 2268 |
" end of the pipe so that we see EOF\n" |
| 2269 |
" when parent closes its descriptor. */\n" |
| 2270 |
" if (read(args-E<gt>pipe_fd[0], &ch, 1) != 0) {\n" |
| 2271 |
" fprintf(stderr,\n" |
| 2272 |
" \"Failure in child: read from pipe returned != 0\\[rs]n\");\n" |
| 2273 |
" exit(EXIT_FAILURE);\n" |
| 2274 |
" }\n" |
| 2275 |
"\\&\n" |
| 2276 |
" close(args-E<gt>pipe_fd[0]);\n" |
| 2277 |
"\\&\n" |
| 2278 |
" /* Execute a shell command. */\n" |
| 2279 |
"\\&\n" |
| 2280 |
" printf(\"About to exec %s\\[rs]n\", args-E<gt>argv[0]);\n" |
| 2281 |
" execvp(args-E<gt>argv[0], args-E<gt>argv);\n" |
| 2282 |
" err(EXIT_FAILURE, \"execvp\");\n" |
| 2283 |
"}\n" |
| 2284 |
"\\&\n" |
| 2285 |
"#define STACK_SIZE (1024 * 1024)\n" |
| 2286 |
"\\&\n" |
| 2287 |
"static char child_stack[STACK_SIZE]; /* Space for child\\[aq]s stack */\n" |
| 2288 |
"\\&\n" |
| 2289 |
"int\n" |
| 2290 |
"main(int argc, char *argv[])\n" |
| 2291 |
"{\n" |
| 2292 |
" int flags, opt, map_zero;\n" |
| 2293 |
" pid_t child_pid;\n" |
| 2294 |
" struct child_args args;\n" |
| 2295 |
" char *uid_map, *gid_map;\n" |
| 2296 |
" const int MAP_BUF_SIZE = 100;\n" |
| 2297 |
" char map_buf[MAP_BUF_SIZE];\n" |
| 2298 |
" char map_path[PATH_MAX];\n" |
| 2299 |
"\\&\n" |
| 2300 |
" /* Parse command-line options. The initial \\[aq]+\\[aq] character in\n" |
| 2301 |
" the final getopt() argument prevents GNU-style permutation\n" |
| 2302 |
" of command-line options. That\\[aq]s useful, since sometimes\n" |
| 2303 |
" the \\[aq]command\\[aq] to be executed by this program itself\n" |
| 2304 |
" has command-line options. We don\\[aq]t want getopt() to treat\n" |
| 2305 |
" those as options to this program. */\n" |
| 2306 |
"\\&\n" |
| 2307 |
" flags = 0;\n" |
| 2308 |
" verbose = 0;\n" |
| 2309 |
" gid_map = NULL;\n" |
| 2310 |
" uid_map = NULL;\n" |
| 2311 |
" map_zero = 0;\n" |
| 2312 |
" while ((opt = getopt(argc, argv, \"+imnpuUM:G:zv\")) != -1) {\n" |
| 2313 |
" switch (opt) {\n" |
| 2314 |
" case \\[aq]i\\[aq]: flags |= CLONE_NEWIPC; break;\n" |
| 2315 |
" case \\[aq]m\\[aq]: flags |= CLONE_NEWNS; break;\n" |
| 2316 |
" case \\[aq]n\\[aq]: flags |= CLONE_NEWNET; break;\n" |
| 2317 |
" case \\[aq]p\\[aq]: flags |= CLONE_NEWPID; break;\n" |
| 2318 |
" case \\[aq]u\\[aq]: flags |= CLONE_NEWUTS; break;\n" |
| 2319 |
" case \\[aq]v\\[aq]: verbose = 1; break;\n" |
| 2320 |
" case \\[aq]z\\[aq]: map_zero = 1; break;\n" |
| 2321 |
" case \\[aq]M\\[aq]: uid_map = optarg; break;\n" |
| 2322 |
" case \\[aq]G\\[aq]: gid_map = optarg; break;\n" |
| 2323 |
" case \\[aq]U\\[aq]: flags |= CLONE_NEWUSER; break;\n" |
| 2324 |
" default: usage(argv[0]);\n" |
| 2325 |
" }\n" |
| 2326 |
" }\n" |
| 2327 |
"\\&\n" |
| 2328 |
" /* -M or -G without -U is nonsensical */\n" |
| 2329 |
"\\&\n" |
| 2330 |
" if (((uid_map != NULL || gid_map != NULL || map_zero) &&\n" |
| 2331 |
" !(flags & CLONE_NEWUSER)) ||\n" |
| 2332 |
" (map_zero && (uid_map != NULL || gid_map != NULL)))\n" |
| 2333 |
" usage(argv[0]);\n" |
| 2334 |
"\\&\n" |
| 2335 |
" args.argv = &argv[optind];\n" |
| 2336 |
"\\&\n" |
| 2337 |
" /* We use a pipe to synchronize the parent and child, in order to\n" |
| 2338 |
" ensure that the parent sets the UID and GID maps before the child\n" |
| 2339 |
" calls execve(). This ensures that the child maintains its\n" |
| 2340 |
" capabilities during the execve() in the common case where we\n" |
| 2341 |
" want to map the child\\[aq]s effective user ID to 0 in the new user\n" |
| 2342 |
" namespace. Without this synchronization, the child would lose\n" |
| 2343 |
" its capabilities if it performed an execve() with nonzero\n" |
| 2344 |
" user IDs (see the capabilities(7) man page for details of the\n" |
| 2345 |
" transformation of a process\\[aq]s capabilities during execve()). */\n" |
| 2346 |
"\\&\n" |
| 2347 |
" if (pipe(args.pipe_fd) == -1)\n" |
| 2348 |
" err(EXIT_FAILURE, \"pipe\");\n" |
| 2349 |
"\\&\n" |
| 2350 |
" /* Create the child in new namespace(s). */\n" |
| 2351 |
"\\&\n" |
| 2352 |
" child_pid = clone(childFunc, child_stack + STACK_SIZE,\n" |
| 2353 |
" flags | SIGCHLD, &args);\n" |
| 2354 |
" if (child_pid == -1)\n" |
| 2355 |
" err(EXIT_FAILURE, \"clone\");\n" |
| 2356 |
"\\&\n" |
| 2357 |
" /* Parent falls through to here. */\n" |
| 2358 |
"\\&\n" |
| 2359 |
" if (verbose)\n" |
| 2360 |
" printf(\"%s: PID of child created by clone() is %jd\\[rs]n\",\n" |
| 2361 |
" argv[0], (intmax_t) child_pid);\n" |
| 2362 |
"\\&\n" |
| 2363 |
" /* Update the UID and GID maps in the child. */\n" |
| 2364 |
"\\&\n" |
| 2365 |
" if (uid_map != NULL || map_zero) {\n" |
| 2366 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/uid_map\",\n" |
| 2367 |
" (intmax_t) child_pid);\n" |
| 2368 |
" if (map_zero) {\n" |
| 2369 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %jd 1\",\n" |
| 2370 |
" (intmax_t) getuid());\n" |
| 2371 |
" uid_map = map_buf;\n" |
| 2372 |
" }\n" |
| 2373 |
" update_map(uid_map, map_path);\n" |
| 2374 |
" }\n" |
| 2375 |
"\\&\n" |
| 2376 |
" if (gid_map != NULL || map_zero) {\n" |
| 2377 |
" proc_setgroups_write(child_pid, \"deny\");\n" |
| 2378 |
"\\&\n" |
| 2379 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/gid_map\",\n" |
| 2380 |
" (intmax_t) child_pid);\n" |
| 2381 |
" if (map_zero) {\n" |
| 2382 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\",\n" |
| 2383 |
" (intmax_t) getgid());\n" |
| 2384 |
" gid_map = map_buf;\n" |
| 2385 |
" }\n" |
| 2386 |
" update_map(gid_map, map_path);\n" |
| 2387 |
" }\n" |
| 2388 |
"\\&\n" |
| 2389 |
" /* Close the write end of the pipe, to signal to the child that we\n" |
| 2390 |
" have updated the UID and GID maps. */\n" |
| 2391 |
"\\&\n" |
| 2392 |
" close(args.pipe_fd[1]);\n" |
| 2393 |
"\\&\n" |
| 2394 |
" if (waitpid(child_pid, NULL, 0) == -1) /* Wait for child */\n" |
| 2395 |
" err(EXIT_FAILURE, \"waitpid\");\n" |
| 2396 |
"\\&\n" |
| 2397 |
" if (verbose)\n" |
| 2398 |
" printf(\"%s: terminating\\[rs]n\", argv[0]);\n" |
| 2399 |
"\\&\n" |
| 2400 |
" exit(EXIT_SUCCESS);\n" |
| 2401 |
"}\n" |
| 2402 |
msgstr "" |
| 2403 |
|
| 2404 |
#. type: SH |
| 2405 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2406 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2407 |
#, no-wrap |
| 2408 |
msgid "SEE ALSO" |
| 2409 |
msgstr "VOIR AUSSI" |
| 2410 |
|
| 2411 |
#. From the shadow package |
| 2412 |
#. From the shadow package |
| 2413 |
#. From the shadow package |
| 2414 |
#. From the shadow package |
| 2415 |
#. type: Plain text |
| 2416 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2417 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2418 |
msgid "" |
| 2419 |
"B<newgidmap>(1), B<newuidmap>(1), B<clone>(2), B<ptrace>(2), B<setns>(2), " |
| 2420 |
"B<unshare>(2), B<proc>(5), B<subgid>(5), B<subuid>(5), B<capabilities>(7), " |
| 2421 |
"B<cgroup_namespaces>(7), B<credentials>(7), B<namespaces>(7), " |
| 2422 |
"B<pid_namespaces>(7)" |
| 2423 |
msgstr "" |
| 2424 |
"B<newgidmap>(1), B<newuidmap>(1), B<clone>(2), B<ptrace>(2), B<setns>(2), " |
| 2425 |
"B<unshare>(2), B<proc>(5), B<subgid>(5), B<subuid>(5), B<capabilities>(7), " |
| 2426 |
"B<cgroup_namespaces>(7), B<credentials>(7), B<namespaces>(7), " |
| 2427 |
"B<pid_namespaces>(7)" |
| 2428 |
|
| 2429 |
#. type: Plain text |
| 2430 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2431 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2432 |
msgid "" |
| 2433 |
"The kernel source file I<Documentation/admin-guide/namespaces/resource-" |
| 2434 |
"control.rst>." |
| 2435 |
msgstr "" |
| 2436 |
"Le fichier I<Documentation/admin-guide/namespaces/resource-control.rst> des " |
| 2437 |
"sources du noyau." |
| 2438 |
|
| 2439 |
#. type: TH |
| 2440 |
#: debian-trixie |
| 2441 |
#, no-wrap |
| 2442 |
msgid "2024-06-15" |
| 2443 |
msgstr "15 juin 2024" |
| 2444 |
|
| 2445 |
#. type: TH |
| 2446 |
#: debian-trixie |
| 2447 |
#, no-wrap |
| 2448 |
msgid "Linux man-pages 6.9.1" |
| 2449 |
msgstr "Pages du manuel de Linux 6.9.1" |
| 2450 |
|
| 2451 |
#. type: Plain text |
| 2452 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2453 |
msgid "" |
| 2454 |
"User namespaces can be nested; that is, each user namespace\\[em]except the " |
| 2455 |
"initial (\"root\") namespace\\[em]has a parent user namespace, and can have " |
| 2456 |
"zero or more child user namespaces. The parent user namespace is the user " |
| 2457 |
"namespace of the process that creates the user namespace via a call to " |
| 2458 |
"B<unshare>(2) or B<clone>(2) with the B<CLONE_NEWUSER> flag." |
| 2459 |
msgstr "" |
| 2460 |
"Les espaces de noms utilisateur peuvent être imbriqués. Cela signifie que " |
| 2461 |
"chaque espace de noms utilisateur \\[em]\\ à l'exception de l'espace de noms " |
| 2462 |
"initial (« root »)\\ \\[em] a un espace de noms parent et peut avoir " |
| 2463 |
"éventuellement un ou plusieurs espaces de noms utilisateur enfant. L'espace " |
| 2464 |
"de noms utilisateur parent est l'espace de noms du processus qui a créé " |
| 2465 |
"l'espace de noms utilisateur au moyen de B<unshare>(2) ou de B<clone>(2) " |
| 2466 |
"invoqué avec l'attribut B<CLONE_NEWUSER>." |
| 2467 |
|
| 2468 |
#. commit 8742f229b635bf1c1c84a3dfe5e47c814c20b5c8 |
| 2469 |
#. FIXME Explain the rationale for this limit. (What is the rationale?) |
| 2470 |
#. type: Plain text |
| 2471 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2472 |
msgid "" |
| 2473 |
"The kernel imposes (since Linux 3.11) a limit of 32 nested levels of user " |
| 2474 |
"namespaces. Calls to B<unshare>(2) or B<clone>(2) that would cause this " |
| 2475 |
"limit to be exceeded fail with the error B<EUSERS>." |
| 2476 |
msgstr "" |
| 2477 |
"Le noyau impose (à partir de Linux 3.11) une limite de 32 niveaux " |
| 2478 |
"d'imbrication pour les espaces de noms utilisateur. Si un appel à " |
| 2479 |
"B<unshare>(2) ou à B<clone>(2) provoque le dépassement de cette limite, la " |
| 2480 |
"commande échoue en renvoyant l'erreur B<EUSERS>." |
| 2481 |
|
| 2482 |
# |
| 2483 |
#. ============================================================ |
| 2484 |
#. type: Plain text |
| 2485 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2486 |
msgid "" |
| 2487 |
"A task that changes one of its effective IDs will have its dumpability reset " |
| 2488 |
"to the value in I</proc/sys/fs/suid_dumpable>. This may affect the " |
| 2489 |
"ownership of proc files of child processes and may thus cause the parent to " |
| 2490 |
"lack the permissions to write to mapping files of child processes running in " |
| 2491 |
"a new user namespace. In such cases making the parent process dumpable, " |
| 2492 |
"using B<PR_SET_DUMPABLE> in a call to B<prctl>(2), before creating a child " |
| 2493 |
"process in a new user namespace may rectify this problem. See B<prctl>(2) " |
| 2494 |
"and B<proc>(5) for details on how ownership is affected." |
| 2495 |
msgstr "" |
| 2496 |
|
| 2497 |
#. type: Plain text |
| 2498 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2499 |
msgid "" |
| 2500 |
"A call to B<clone>(2) or B<unshare>(2) using the B<CLONE_NEWUSER> flag or " |
| 2501 |
"a call to B<setns>(2) that moves the caller into another user namespace " |
| 2502 |
"sets the \"securebits\" flags (see B<capabilities>(7)) to their default " |
| 2503 |
"values (all flags disabled) in the child (for B<clone>(2)) or caller (for " |
| 2504 |
"B<unshare>(2) or B<setns>(2)). Note that because the caller no longer has " |
| 2505 |
"capabilities in its original user namespace after a call to B<setns>(2), it " |
| 2506 |
"is not possible for a process to reset its \"securebits\" flags while " |
| 2507 |
"retaining its user namespace membership by using a pair of B<setns>(2) " |
| 2508 |
"calls to move to another user namespace and then return to its original user " |
| 2509 |
"namespace." |
| 2510 |
msgstr "" |
| 2511 |
"Un appel à B<clone>(2) ou B<unshare>(2) en utilisant l'attribut " |
| 2512 |
"B<CLONE_NEWUSER> ou un appel à B<setns>(2) qui déplace l’appelant dans " |
| 2513 |
"d’autres jeux d’espaces de noms utilisateur positionne les indicateurs " |
| 2514 |
"« securebits » (consultez B<capabilities>(7)) à leurs valeurs par défaut " |
| 2515 |
"(tous les indicateurs désactivés) dans l’enfant (pour B<clone>(2)) ou " |
| 2516 |
"l’appelant (pour B<unshare>(2) ou B<setns>(2)). Remarquez que parce que " |
| 2517 |
"l’appelant n’a plus de capacités dans son espace de noms utilisateur après " |
| 2518 |
"un appel à B<setns>(2), il n’est pas possible à un processus de " |
| 2519 |
"réinitialiser ses indicateurs « securebits » tout en conservant son " |
| 2520 |
"appartenance à un espace de noms utilisateur en utilisant une paire d’appels " |
| 2521 |
"B<setns>(2) pour se déplacer vers un autre espace de noms utilisateur et " |
| 2522 |
"ensuite retourner vers son espace de noms utilisateur original." |
| 2523 |
|
| 2524 |
#. type: Plain text |
| 2525 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2526 |
msgid "" |
| 2527 |
"If a process has a capability in a user namespace, then it has that " |
| 2528 |
"capability in all child (and further removed descendant) namespaces as well." |
| 2529 |
msgstr "" |
| 2530 |
"Si un processus dispose d'une capacité dans un espace de noms utilisateur, " |
| 2531 |
"alors il a cette même capacité dans tous les espaces de noms enfant (et les " |
| 2532 |
"espaces descendants supprimés)." |
| 2533 |
|
| 2534 |
#. type: Plain text |
| 2535 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2536 |
msgid "" |
| 2537 |
"Having a capability inside a user namespace permits a process to perform " |
| 2538 |
"operations (that require privilege) only on resources governed by that " |
| 2539 |
"namespace. In other words, having a capability in a user namespace permits " |
| 2540 |
"a process to perform privileged operations on resources that are governed by " |
| 2541 |
"(nonuser) namespaces owned by (associated with) the user namespace (see the " |
| 2542 |
"next subsection)." |
| 2543 |
msgstr "" |
| 2544 |
"Un processus qui possède des capacités dans un espace de noms utilisateur a " |
| 2545 |
"la possibilité d'effectuer des opérations (nécessitant des privilèges) " |
| 2546 |
"seulement sur les ressources gérées par cet espace de noms. En d’autres " |
| 2547 |
"mots, avoir une capacité dans un espace de noms permet à un processus de " |
| 2548 |
"réaliser des opérations privilégiées sur des ressources gérées par des " |
| 2549 |
"espaces de noms (non utilisateur) possédés par (associés avec) l’espace de " |
| 2550 |
"noms utilisateur (consultez la sous-section suivante)." |
| 2551 |
|
| 2552 |
#. type: Plain text |
| 2553 |
#: debian-trixie |
| 2554 |
msgid "" |
| 2555 |
"Holding B<CAP_SYS_ADMIN> within the user namespace that owns a process's " |
| 2556 |
"cgroup namespace allows (since Linux 4.6) that process to the mount the " |
| 2557 |
"cgroup version 2 filesystem and cgroup version 1 named hierarchies (i.e., " |
| 2558 |
"cgroup filesystems mounted with the I<\\[dq]none,name=\\[dq]> option)." |
| 2559 |
msgstr "" |
| 2560 |
"Avoir B<CAP_SYS_ADMIN> dans l’espace de noms utilisateur qui possède un " |
| 2561 |
"espace de noms cgroup de processus permet (depuis Linux 4.6) à ce processus " |
| 2562 |
"de monter un système de fichiers cgroup version 2 ou cgroup version 1 " |
| 2563 |
"appelés hiérarchies (c’est-à-dire des systèmes de fichiers cgroup avec " |
| 2564 |
"l’option « I<none,name=> »)." |
| 2565 |
|
| 2566 |
# |
| 2567 |
#. ============================================================ |
| 2568 |
#. type: Plain text |
| 2569 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2570 |
msgid "" |
| 2571 |
"Note, however, that mounting block-based filesystems can be done only by a " |
| 2572 |
"process that holds B<CAP_SYS_ADMIN> in the initial user namespace." |
| 2573 |
msgstr "" |
| 2574 |
"Remarquez cependant que le montage de systèmes de fichiers basés sur les " |
| 2575 |
"blocs peut être réalisé seulement par un processus ayant B<CAP_SYS_ADMIN> " |
| 2576 |
"dans l’espace de noms utilisateur initial." |
| 2577 |
|
| 2578 |
#. type: Plain text |
| 2579 |
#: debian-trixie |
| 2580 |
msgid "" |
| 2581 |
"Starting in Linux 3.8, unprivileged processes can create user namespaces, " |
| 2582 |
"and the other types of namespaces can be created with just the " |
| 2583 |
"B<CAP_SYS_ADMIN> capability in the caller's user namespace." |
| 2584 |
msgstr "" |
| 2585 |
"À partir de Linux 3.8, les processus sans privilèges peuvent créer des " |
| 2586 |
"espaces de noms utilisateur et les autres espaces de noms peuvent être créés " |
| 2587 |
"avec simplement la capacité B<CAP_SYS_ADMIN> dans l'espace de noms " |
| 2588 |
"utilisateur de l'appelant." |
| 2589 |
|
| 2590 |
# |
| 2591 |
#. type: Plain text |
| 2592 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2593 |
msgid "" |
| 2594 |
"When a new namespace (other than a user namespace) is created via " |
| 2595 |
"B<clone>(2) or B<unshare>(2), the kernel records the user namespace of the " |
| 2596 |
"creating process as the owner of the new namespace. (This association can't " |
| 2597 |
"be changed.) When a process in the new namespace subsequently performs " |
| 2598 |
"privileged operations that operate on global resources isolated by the " |
| 2599 |
"namespace, the permission checks are performed according to the process's " |
| 2600 |
"capabilities in the user namespace that the kernel associated with the new " |
| 2601 |
"namespace. For example, suppose that a process attempts to change the " |
| 2602 |
"hostname (B<sethostname>(2)), a resource governed by the UTS namespace. In " |
| 2603 |
"this case, the kernel will determine which user namespace owns the process's " |
| 2604 |
"UTS namespace, and check whether the process has the required capability " |
| 2605 |
"(B<CAP_SYS_ADMIN>) in that user namespace." |
| 2606 |
msgstr "" |
| 2607 |
"Lorsqu'un nouvel espace de noms (autre qu’un espace de noms utilisateur) est " |
| 2608 |
"créé à l’aide de B<clone>(2) ou B<unshare>(2), le noyau enregistre l'espace " |
| 2609 |
"de noms utilisateur du processus créateur comme le propriétaire du nouvel " |
| 2610 |
"espace de noms. (Cette association ne peut pas être changée). Lorsqu'un " |
| 2611 |
"processus du nouvel espace de noms effectue ensuite une opération " |
| 2612 |
"privilégiée sur une ressource globale isolée par l'espace de noms, les " |
| 2613 |
"vérifications de permissions sont réalisées en fonction des capacités du " |
| 2614 |
"processus dans l'espace de noms utilisateur que le noyau a associé au nouvel " |
| 2615 |
"espace de noms. Par exemple, supposons qu’un processus essaie de modifier le " |
| 2616 |
"nom d’hôte (B<sethostname>(2)), une ressource régie par l’espace de noms " |
| 2617 |
"UTS. Dans ce cas le noyau déterminera quel espace de noms utilisateur " |
| 2618 |
"possède l’espace de noms UTS du processus et vérifiera si le processus à la " |
| 2619 |
"capacité requise (B<CAP_SYS_ADMIN>) dans cet espace de noms utilisateur." |
| 2620 |
|
| 2621 |
#. type: Plain text |
| 2622 |
#: debian-trixie |
| 2623 |
msgid "" |
| 2624 |
"Each line in the I<uid_map> file specifies a 1-to-1 mapping of a range of " |
| 2625 |
"contiguous user IDs between two user namespaces. (When a user namespace is " |
| 2626 |
"first created, this file is empty.) The specification in each line takes " |
| 2627 |
"the form of three numbers delimited by white space. The first two numbers " |
| 2628 |
"specify the starting user ID in each of the two user namespaces. The third " |
| 2629 |
"number specifies the length of the mapped range. In detail, the fields are " |
| 2630 |
"interpreted as follows:" |
| 2631 |
msgstr "" |
| 2632 |
"Chaque ligne du fichier I<uid_map> affiche un mappage un-pour-un d'un " |
| 2633 |
"intervalle d'identifiants utilisateur contigus de deux espaces de noms " |
| 2634 |
"utilisateur. Lorsqu'un espace de noms utilisateur vient d'être créé, ce " |
| 2635 |
"fichier est vide. Chaque ligne contient trois nombres délimités par des " |
| 2636 |
"espaces. Les deux premiers nombres indiquent les premiers identifiants " |
| 2637 |
"utilisateur de chacun des deux espaces de noms. Le troisième nombre indique " |
| 2638 |
"la longueur de l'intervalle de mappage. Plus précisément, les champs sont " |
| 2639 |
"interprétés de la façon suivante :" |
| 2640 |
|
| 2641 |
#. type: Plain text |
| 2642 |
#: debian-trixie |
| 2643 |
msgid "" |
| 2644 |
"The length of the range of user IDs that is mapped between the two user " |
| 2645 |
"namespaces." |
| 2646 |
msgstr "" |
| 2647 |
"La longueur de l'intervalle des identifiants utilisateur qui est mappé entre " |
| 2648 |
"les deux espaces de noms utilisateur." |
| 2649 |
|
| 2650 |
#. type: Plain text |
| 2651 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2652 |
msgid "" |
| 2653 |
"The initial user namespace has no parent namespace, but, for consistency, " |
| 2654 |
"the kernel provides dummy user and group ID mapping files for this " |
| 2655 |
"namespace. Looking at the I<uid_map> file (I<gid_map> is the same) from a " |
| 2656 |
"shell in the initial namespace shows:" |
| 2657 |
msgstr "" |
| 2658 |
"L'espace de noms utilisateur initial n'a pas d'espace de noms parent, mais " |
| 2659 |
"pour conserver la cohérence, le noyau lui attribue des fichiers de mappage " |
| 2660 |
"d'identifiants utilisateur et groupe factices pour cet espace de noms. Si " |
| 2661 |
"l'on consulte le fichier I<uid_map> (ou I<gid_map> de la même façon) depuis " |
| 2662 |
"une invite de commande dans l'espace de noms initial, on peut voir : " |
| 2663 |
|
| 2664 |
#. type: Plain text |
| 2665 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2666 |
#, no-wrap |
| 2667 |
msgid "" |
| 2668 |
"$ B<cat /proc/$$/uid_map>\n" |
| 2669 |
" 0 0 4294967295\n" |
| 2670 |
msgstr "" |
| 2671 |
"$ B<cat /proc/$$/uid_map>\n" |
| 2672 |
" 0 0 4294967295\n" |
| 2673 |
|
| 2674 |
# |
| 2675 |
#. ============================================================ |
| 2676 |
#. type: Plain text |
| 2677 |
#: debian-trixie |
| 2678 |
#, fuzzy |
| 2679 |
#| msgid "" |
| 2680 |
#| "This mapping tells us that the range starting at user ID 0 in this " |
| 2681 |
#| "namespace maps to a range starting at 0 in the (nonexistent) parent " |
| 2682 |
#| "namespace, and the length of the range is the largest 32-bit unsigned " |
| 2683 |
#| "integer. This leaves 4294967295 (the 32-bit signed -1 value) unmapped. " |
| 2684 |
#| "This is deliberate: I<(uid_t)\\ -1> is used in several interfaces (e.g., " |
| 2685 |
#| "B<setreuid>(2)) as a way to specify \"no user ID\". Leaving I<(uid_t)\\ " |
| 2686 |
#| "-1> unmapped and unusable guarantees that there will be no confusion when " |
| 2687 |
#| "using these interfaces." |
| 2688 |
msgid "" |
| 2689 |
"This mapping tells us that the range starting at user ID 0 in this namespace " |
| 2690 |
"maps to a range starting at 0 in the (nonexistent) parent namespace, and the " |
| 2691 |
"length of the range is the largest 32-bit unsigned integer. This leaves " |
| 2692 |
"4294967295 (the 32-bit signed -1 value) unmapped. This is deliberate: " |
| 2693 |
"I<(uid_t)\\ -1> is used in several interfaces (e.g., B<setreuid>(2)) as a " |
| 2694 |
"way to specify \"no user ID\". Leaving I<(uid_t)\\ -1> unmapped and " |
| 2695 |
"unusable guarantees that there will be no confusion when using these " |
| 2696 |
"interfaces." |
| 2697 |
msgstr "" |
| 2698 |
"Ce mappage nous indique que l'intervalle commençant avec l'identifiant " |
| 2699 |
"utilisateur 0 dans cet espace de noms mappe avec un intervalle commençant " |
| 2700 |
"à 0 dans l'espace de noms parent (qui n'existe pas), et que la longueur de " |
| 2701 |
"cet intervalle est la valeur du plus grand entier 32 bits non signé. Cela " |
| 2702 |
"laisse 4294967295 (la valeur 32 bits signé moins 1) non mappé. Cela est " |
| 2703 |
"voulu : I<(uid_t)\\ -1> est utilisé dans plusieurs interfaces (par exemple, " |
| 2704 |
"B<setreuid>(2)) comme façon d’indiquer « pas d’ID utilisateur ». Laisser " |
| 2705 |
"I<(uid_t)\\ -1> non mappé et inutilisable garantit qu’il n’y aura aucune " |
| 2706 |
"confusion lors de l’utilisation de ces interfaces." |
| 2707 |
|
| 2708 |
#. 5*12-byte records could fit in a 64B cache line |
| 2709 |
#. commit 6397fac4915ab3002dc15aae751455da1a852f25 |
| 2710 |
#. type: Plain text |
| 2711 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2712 |
msgid "" |
| 2713 |
"There is a limit on the number of lines in the file. In Linux 4.14 and " |
| 2714 |
"earlier, this limit was (arbitrarily) set at 5 lines. Since Linux 4.15, " |
| 2715 |
"the limit is 340 lines. In addition, the number of bytes written to the " |
| 2716 |
"file must be less than the system page size, and the write must be performed " |
| 2717 |
"at the start of the file (i.e., B<lseek>(2) and B<pwrite>(2) can't be used " |
| 2718 |
"to write to nonzero offsets in the file)." |
| 2719 |
msgstr "" |
| 2720 |
"Il y a une limite (arbitraire) du nombre de lignes que peut contenir le " |
| 2721 |
"fichier. Dans Linux 4.14 et précédents, la limite est (arbitrairement) de " |
| 2722 |
"5 lignes. Depuis Linux 4.15, la limite est de 340 lignes. En outre, le " |
| 2723 |
"nombre d'octets inscrits dans le fichier doit être inférieur à la taille " |
| 2724 |
"d'une page du système, et l'écriture doit être réalisée au début du fichier " |
| 2725 |
"(c’est-à-dire B<lseek>(2) et B<pwrite>(2) ne peuvent être utilisées pour " |
| 2726 |
"écrire dans le fichier avec un décalage non nul)." |
| 2727 |
|
| 2728 |
#. commit 0bd14b4fd72afd5df41e9fd59f356740f22fceba |
| 2729 |
#. type: Plain text |
| 2730 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2731 |
msgid "" |
| 2732 |
"The range of user IDs (group IDs) specified in each line cannot overlap " |
| 2733 |
"with the ranges in any other lines. In the initial implementation (Linux " |
| 2734 |
"3.8), this requirement was satisfied by a simplistic implementation that " |
| 2735 |
"imposed the further requirement that the values in both field 1 and field 2 " |
| 2736 |
"of successive lines must be in ascending numerical order, which prevented " |
| 2737 |
"some otherwise valid maps from being created. Linux 3.9 and later fix this " |
| 2738 |
"limitation, allowing any valid set of nonoverlapping maps." |
| 2739 |
msgstr "" |
| 2740 |
"L'intervalle d'identifiants utilisateur (ou de groupe) indiqué dans chaque " |
| 2741 |
"ligne ne peut recouvrir les intervalles des autres lignes. Dans " |
| 2742 |
"l'implémentation initiale (Linux 3.8), cette règle était assurée par une " |
| 2743 |
"implémentation plus sommaire qui comprenait une contrainte supplémentaire : " |
| 2744 |
"les deux premiers champs de chaque ligne devaient apparaître en ordre " |
| 2745 |
"croissant. Cela empêchait cependant la création de mappages valables. Ce " |
| 2746 |
"problème a été réglé dans Linux 3.9 et suivants, et toutes les combinaisons " |
| 2747 |
"valables de mappages non recouvrantes sont désormais acceptées." |
| 2748 |
|
| 2749 |
#. type: Plain text |
| 2750 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2751 |
msgid "" |
| 2752 |
"The data written to I<uid_map> (I<gid_map>) must consist of a single line " |
| 2753 |
"that maps the writing process's effective user ID (group ID) in the parent " |
| 2754 |
"user namespace to a user ID (group ID) in the user namespace." |
| 2755 |
msgstr "" |
| 2756 |
"Les données inscrites dans I<uid_map> (I<gid_map>) doivent consister en une " |
| 2757 |
"seule ligne qui mappe l'identifiant utilisateur effectif (groupe) du " |
| 2758 |
"processus écrivant dans l’espace de noms utilisateur parent à un ID " |
| 2759 |
"utilisateur (groupe) dans l’espace de noms utilisateur." |
| 2760 |
|
| 2761 |
#. type: Plain text |
| 2762 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2763 |
msgid "" |
| 2764 |
"In the case of I<gid_map>, use of the B<setgroups>(2) system call must " |
| 2765 |
"first be denied by writing \\[dq]I<deny>\\[dq] to the I</proc/>pidI</" |
| 2766 |
"setgroups> file (see below) before writing to I<gid_map>." |
| 2767 |
msgstr "" |
| 2768 |
"Dans le cas de I<gid_map>, l’utilisation de l’appel système B<setgroups>(2) " |
| 2769 |
"doit être d’abord interdit en écrivant « I<deny> » dans le fichier I</proc/" |
| 2770 |
">pidI</setgroups> (voir ci-dessous) avant d’écrire dans I<gid_map>." |
| 2771 |
|
| 2772 |
#. type: SS |
| 2773 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2774 |
#, no-wrap |
| 2775 |
msgid "The I</proc/>pidI</setgroups> file" |
| 2776 |
msgstr "Le fichier I</proc/>pidI</setgroups>" |
| 2777 |
|
| 2778 |
#. type: Plain text |
| 2779 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2780 |
msgid "" |
| 2781 |
"A privileged process (one with the B<CAP_SYS_ADMIN> capability in the " |
| 2782 |
"namespace) may write either of the strings \\[dq]I<allow>\\[dq] or \\" |
| 2783 |
"[dq]I<deny>\\[dq] to this file I<before> writing a group ID mapping for this " |
| 2784 |
"user namespace to the file I</proc/>pidI</gid_map>. Writing the string \\" |
| 2785 |
"[dq]I<deny>\\[dq] prevents any process in the user namespace from employing " |
| 2786 |
"B<setgroups>(2)." |
| 2787 |
msgstr "" |
| 2788 |
"Un processus privilégié (un avec la capacité B<CAP_SYS_ADMIN> dans l’espace " |
| 2789 |
"de noms) peut écrire une des chaînes « I<allow> » ou « I<deny> » dans ce " |
| 2790 |
"fichier I<avant> d’écrire un mappage d’ID de groupe pour cet espace de noms " |
| 2791 |
"utilisateur dans le fichier I</proc/>pidI</gid_map>. Écrire la chaîne " |
| 2792 |
"« I<deny> » empêche tout processus dans l’espace de noms utilisateur " |
| 2793 |
"d’employer B<setgroups>(2)." |
| 2794 |
|
| 2795 |
#. type: Plain text |
| 2796 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2797 |
msgid "" |
| 2798 |
"If the I<setgroups> file has the value \\[dq]I<deny>\\[dq], then the " |
| 2799 |
"B<setgroups>(2) system call can't subsequently be reenabled (by writing \\" |
| 2800 |
"[dq]I<allow>\\[dq] to the file) in this user namespace. (Attempts to do so " |
| 2801 |
"fail with the error B<EPERM>.) This restriction also propagates down to all " |
| 2802 |
"child user namespaces of this user namespace." |
| 2803 |
msgstr "" |
| 2804 |
"Si le fichier I<setgroups> a la valeur « I<deny> », alors l’appel système " |
| 2805 |
"B<setgroups>(2) ne peut pas par la suite être réactivé (en écrivant " |
| 2806 |
"« I<allow> » dans le fichier) dans cet espace de noms utilisateur (toute " |
| 2807 |
"tentative échouera avec l’erreur B<EPERM>). Cette restriction se propage " |
| 2808 |
"vers les espaces de noms utilisateur enfant de cet espace de noms " |
| 2809 |
"utilisateur." |
| 2810 |
|
| 2811 |
# |
| 2812 |
# |
| 2813 |
# |
| 2814 |
# |
| 2815 |
#. /proc/PID/setgroups |
| 2816 |
#. [allow == setgroups() is allowed, "deny" == setgroups() is disallowed] |
| 2817 |
#. * Can write if have CAP_SYS_ADMIN in NS |
| 2818 |
#. * Must write BEFORE writing to /proc/PID/gid_map |
| 2819 |
#. setgroups() |
| 2820 |
#. * Must already have written to gid_map |
| 2821 |
#. * /proc/PID/setgroups must be "allow" |
| 2822 |
#. /proc/PID/gid_map -- writing |
| 2823 |
#. * Must already have written "deny" to /proc/PID/setgroups |
| 2824 |
#. ============================================================ |
| 2825 |
#. type: Plain text |
| 2826 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2827 |
msgid "" |
| 2828 |
"The I</proc/>pidI</setgroups> file was added in Linux 3.19, but was " |
| 2829 |
"backported to many earlier stable kernel series, because it addresses a " |
| 2830 |
"security issue. The issue concerned files with permissions such as \"rwx---" |
| 2831 |
"rwx\". Such files give fewer permissions to \"group\" than they do to " |
| 2832 |
"\"other\". This means that dropping groups using B<setgroups>(2) might " |
| 2833 |
"allow a process file access that it did not formerly have. Before the " |
| 2834 |
"existence of user namespaces this was not a concern, since only a privileged " |
| 2835 |
"process (one with the B<CAP_SETGID> capability) could call B<setgroups>(2). " |
| 2836 |
"However, with the introduction of user namespaces, it became possible for an " |
| 2837 |
"unprivileged process to create a new namespace in which the user had all " |
| 2838 |
"privileges. This then allowed formerly unprivileged users to drop groups " |
| 2839 |
"and thus gain file access that they did not previously have. The I</proc/" |
| 2840 |
">pidI</setgroups> file was added to address this security issue, by denying " |
| 2841 |
"any pathway for an unprivileged process to drop groups with B<setgroups>(2)." |
| 2842 |
msgstr "" |
| 2843 |
"Le fichier I</proc/>pidI</setgroups> a été ajouté dans Linux 3.19, mais a " |
| 2844 |
"été rétroporté vers plusieurs séries stables du noyau car il corrige un " |
| 2845 |
"problème de sécurité. Cela concernait les fichiers avec les permissions " |
| 2846 |
"telles que « rwx---rwx ». De tels fichiers accordent moins de permissions au " |
| 2847 |
"« group » qu’elles ne donnent à « other ». Cela signifie qu’abandonner les " |
| 2848 |
"groupes utilisant B<setgroups>(2) peut permettre un accès au fichier du " |
| 2849 |
"processus que celui-ci n’avait pas auparavant. Avant l’existence des espaces " |
| 2850 |
"de noms utilisateur cela n’était pas un problème, puisque seul un processus " |
| 2851 |
"privilégié (un avec la capacité B<CAP_SETGID>) pouvait appeler " |
| 2852 |
"B<setgroups>(2). Cependant, avec l’introduction des espaces de noms " |
| 2853 |
"utilisateur, il est devenu possible pour un processus non privilégié de " |
| 2854 |
"créer un nouvel espace de noms dans lequel l’utilisateur a tous les " |
| 2855 |
"privilèges. Cela permet alors à des utilisateurs anciennement non " |
| 2856 |
"privilégiés d’abandonner les groupes et donc obtenir l’accès à des fichiers " |
| 2857 |
"auxquels ils ne pouvaient pas accéder. Le fichier I</proc/>pidI</setgroups> " |
| 2858 |
"a été ajouté pour résoudre le problème de sécurité en refusant à tout chemin " |
| 2859 |
"pour un processus non privilégié d’abandonner les groupes avec " |
| 2860 |
"B<setgroups>(2)." |
| 2861 |
|
| 2862 |
#. type: Plain text |
| 2863 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2864 |
#, no-wrap |
| 2865 |
msgid "" |
| 2866 |
"$ B<uname -rs> # Need Linux 3.8 or later\n" |
| 2867 |
"Linux 3.8.0\n" |
| 2868 |
"$ B<id -u> # Running as unprivileged user\n" |
| 2869 |
"1000\n" |
| 2870 |
"$ B<id -g>\n" |
| 2871 |
"1000\n" |
| 2872 |
msgstr "" |
| 2873 |
"$ B<uname -rs> # à partir de Linux 3.8\n" |
| 2874 |
"Linux 3.8.0\n" |
| 2875 |
"$ B<id -u> # exécuté comme utilisateur sans privilèges\n" |
| 2876 |
"1000\n" |
| 2877 |
"$ B<id -g>\n" |
| 2878 |
"1000\n" |
| 2879 |
|
| 2880 |
#. type: Plain text |
| 2881 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2882 |
#, no-wrap |
| 2883 |
msgid "$ B<./userns_child_exec -p -m -U -M \\[aq]0 1000 1\\[aq] -G \\[aq]0 1000 1\\[aq] bash>\n" |
| 2884 |
msgstr "$ B<./userns_child_exec -p -m -U -M \\[aq]0 1000 1\\[aq] -G \\[aq]0 1000 1\\[aq] bash>\n" |
| 2885 |
|
| 2886 |
#. type: Plain text |
| 2887 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2888 |
#, no-wrap |
| 2889 |
msgid "" |
| 2890 |
"bash$ B<echo $$>\n" |
| 2891 |
"1\n" |
| 2892 |
msgstr "" |
| 2893 |
"bash$ B<echo $$>\n" |
| 2894 |
"1\n" |
| 2895 |
|
| 2896 |
#. type: Plain text |
| 2897 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2898 |
#, no-wrap |
| 2899 |
msgid "" |
| 2900 |
"bash$ B<mount -t proc proc /proc>\n" |
| 2901 |
"bash$ B<ps ax>\n" |
| 2902 |
" PID TTY STAT TIME COMMAND\n" |
| 2903 |
" 1 pts/3 S 0:00 bash\n" |
| 2904 |
" 22 pts/3 R+ 0:00 ps ax\n" |
| 2905 |
msgstr "" |
| 2906 |
"bash$ B<mount -t proc proc /proc>\n" |
| 2907 |
"bash$ B<ps ax>\n" |
| 2908 |
" PID TTY STAT TIME COMMAND\n" |
| 2909 |
" 1 pts/3 S 0:00 bash\n" |
| 2910 |
" 22 pts/3 R+ 0:00 ps ax\n" |
| 2911 |
|
| 2912 |
#. type: Plain text |
| 2913 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2914 |
#, no-wrap |
| 2915 |
msgid "" |
| 2916 |
"bash$ B<cat /proc/$$/status | egrep \\[aq]\\[ha][UG]id\\[aq]>\n" |
| 2917 |
"Uid:\t0\t0\t0\t0\n" |
| 2918 |
"Gid:\t0\t0\t0\t0\n" |
| 2919 |
"bash$ B<cat /proc/$$/status | egrep \\[aq]\\[ha]Cap(Prm|Inh|Eff)\\[aq]>\n" |
| 2920 |
"CapInh:\t0000000000000000\n" |
| 2921 |
"CapPrm:\t0000001fffffffff\n" |
| 2922 |
"CapEff:\t0000001fffffffff\n" |
| 2923 |
msgstr "" |
| 2924 |
"bash$ B<cat /proc/$$/status | egrep \\[aq]\\[ha][UG]id\\[aq]>\n" |
| 2925 |
"Uid:\t0\t0\t0\t0\n" |
| 2926 |
"Gid:\t0\t0\t0\t0\n" |
| 2927 |
"bash$ B<cat /proc/$$/status | egrep \\[aq]\\[ha]Cap(Prm|Inh|Eff)\\[aq]>\n" |
| 2928 |
"CapInh:\t0000000000000000\n" |
| 2929 |
"CapPrm:\t0000001fffffffff\n" |
| 2930 |
"CapEff:\t0000001fffffffff\n" |
| 2931 |
|
| 2932 |
#. type: Plain text |
| 2933 |
#: debian-trixie |
| 2934 |
#, no-wrap |
| 2935 |
msgid "" |
| 2936 |
"/* userns_child_exec.c\n" |
| 2937 |
"\\&\n" |
| 2938 |
" Licensed under GNU General Public License v2 or later\n" |
| 2939 |
"\\&\n" |
| 2940 |
" Create a child process that executes a shell command in new\n" |
| 2941 |
" namespace(s); allow UID and GID mappings to be specified when\n" |
| 2942 |
" creating a user namespace.\n" |
| 2943 |
"*/\n" |
| 2944 |
"#define _GNU_SOURCE\n" |
| 2945 |
"#include E<lt>err.hE<gt>\n" |
| 2946 |
"#include E<lt>sched.hE<gt>\n" |
| 2947 |
"#include E<lt>unistd.hE<gt>\n" |
| 2948 |
"#include E<lt>stdint.hE<gt>\n" |
| 2949 |
"#include E<lt>stdlib.hE<gt>\n" |
| 2950 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 2951 |
"#include E<lt>signal.hE<gt>\n" |
| 2952 |
"#include E<lt>fcntl.hE<gt>\n" |
| 2953 |
"#include E<lt>stdio.hE<gt>\n" |
| 2954 |
"#include E<lt>string.hE<gt>\n" |
| 2955 |
"#include E<lt>limits.hE<gt>\n" |
| 2956 |
"#include E<lt>errno.hE<gt>\n" |
| 2957 |
"\\&\n" |
| 2958 |
"struct child_args {\n" |
| 2959 |
" char **argv; /* Command to be executed by child, with args */\n" |
| 2960 |
" int pipe_fd[2]; /* Pipe used to synchronize parent and child */\n" |
| 2961 |
"};\n" |
| 2962 |
"\\&\n" |
| 2963 |
"static int verbose;\n" |
| 2964 |
"\\&\n" |
| 2965 |
"static void\n" |
| 2966 |
"usage(char *pname)\n" |
| 2967 |
"{\n" |
| 2968 |
" fprintf(stderr, \"Usage: %s [options] cmd [arg...]\\[rs]n\\[rs]n\", pname);\n" |
| 2969 |
" fprintf(stderr, \"Create a child process that executes a shell \"\n" |
| 2970 |
" \"command in a new user namespace,\\[rs]n\"\n" |
| 2971 |
" \"and possibly also other new namespace(s).\\[rs]n\\[rs]n\");\n" |
| 2972 |
" fprintf(stderr, \"Options can be:\\[rs]n\\[rs]n\");\n" |
| 2973 |
"#define fpe(str) fprintf(stderr, \" %s\", str);\n" |
| 2974 |
" fpe(\"-i New IPC namespace\\[rs]n\");\n" |
| 2975 |
" fpe(\"-m New mount namespace\\[rs]n\");\n" |
| 2976 |
" fpe(\"-n New network namespace\\[rs]n\");\n" |
| 2977 |
" fpe(\"-p New PID namespace\\[rs]n\");\n" |
| 2978 |
" fpe(\"-u New UTS namespace\\[rs]n\");\n" |
| 2979 |
" fpe(\"-U New user namespace\\[rs]n\");\n" |
| 2980 |
" fpe(\"-M uid_map Specify UID map for user namespace\\[rs]n\");\n" |
| 2981 |
" fpe(\"-G gid_map Specify GID map for user namespace\\[rs]n\");\n" |
| 2982 |
" fpe(\"-z Map user\\[aq]s UID and GID to 0 in user namespace\\[rs]n\");\n" |
| 2983 |
" fpe(\" (equivalent to: -M \\[aq]0 E<lt>uidE<gt> 1\\[aq] -G \\[aq]0 E<lt>gidE<gt> 1\\[aq])\\[rs]n\");\n" |
| 2984 |
" fpe(\"-v Display verbose messages\\[rs]n\");\n" |
| 2985 |
" fpe(\"\\[rs]n\");\n" |
| 2986 |
" fpe(\"If -z, -M, or -G is specified, -U is required.\\[rs]n\");\n" |
| 2987 |
" fpe(\"It is not permitted to specify both -z and either -M or -G.\\[rs]n\");\n" |
| 2988 |
" fpe(\"\\[rs]n\");\n" |
| 2989 |
" fpe(\"Map strings for -M and -G consist of records of the form:\\[rs]n\");\n" |
| 2990 |
" fpe(\"\\[rs]n\");\n" |
| 2991 |
" fpe(\" ID-inside-ns ID-outside-ns len\\[rs]n\");\n" |
| 2992 |
" fpe(\"\\[rs]n\");\n" |
| 2993 |
" fpe(\"A map string can contain multiple records, separated\"\n" |
| 2994 |
" \" by commas;\\[rs]n\");\n" |
| 2995 |
" fpe(\"the commas are replaced by newlines before writing\"\n" |
| 2996 |
" \" to map files.\\[rs]n\");\n" |
| 2997 |
"\\&\n" |
| 2998 |
" exit(EXIT_FAILURE);\n" |
| 2999 |
"}\n" |
| 3000 |
"\\&\n" |
| 3001 |
"/* Update the mapping file \\[aq]map_file\\[aq], with the value provided in\n" |
| 3002 |
" \\[aq]mapping\\[aq], a string that defines a UID or GID mapping. A UID or\n" |
| 3003 |
" GID mapping consists of one or more newline-delimited records\n" |
| 3004 |
" of the form:\n" |
| 3005 |
"\\&\n" |
| 3006 |
" ID_inside-ns ID-outside-ns length\n" |
| 3007 |
"\\&\n" |
| 3008 |
" Requiring the user to supply a string that contains newlines is\n" |
| 3009 |
" of course inconvenient for command-line use. Thus, we permit the\n" |
| 3010 |
" use of commas to delimit records in this string, and replace them\n" |
| 3011 |
" with newlines before writing the string to the file. */\n" |
| 3012 |
"\\&\n" |
| 3013 |
"static void\n" |
| 3014 |
"update_map(char *mapping, char *map_file)\n" |
| 3015 |
"{\n" |
| 3016 |
" int fd;\n" |
| 3017 |
" size_t map_len; /* Length of \\[aq]mapping\\[aq] */\n" |
| 3018 |
"\\&\n" |
| 3019 |
" /* Replace commas in mapping string with newlines. */\n" |
| 3020 |
"\\&\n" |
| 3021 |
" map_len = strlen(mapping);\n" |
| 3022 |
" for (size_t j = 0; j E<lt> map_len; j++)\n" |
| 3023 |
" if (mapping[j] == \\[aq],\\[aq])\n" |
| 3024 |
" mapping[j] = \\[aq]\\[rs]n\\[aq];\n" |
| 3025 |
"\\&\n" |
| 3026 |
" fd = open(map_file, O_RDWR);\n" |
| 3027 |
" if (fd == -1) {\n" |
| 3028 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", map_file,\n" |
| 3029 |
" strerror(errno));\n" |
| 3030 |
" exit(EXIT_FAILURE);\n" |
| 3031 |
" }\n" |
| 3032 |
"\\&\n" |
| 3033 |
" if (write(fd, mapping, map_len) != map_len) {\n" |
| 3034 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", map_file,\n" |
| 3035 |
" strerror(errno));\n" |
| 3036 |
" exit(EXIT_FAILURE);\n" |
| 3037 |
" }\n" |
| 3038 |
"\\&\n" |
| 3039 |
" close(fd);\n" |
| 3040 |
"}\n" |
| 3041 |
"\\&\n" |
| 3042 |
"/* Linux 3.19 made a change in the handling of setgroups(2) and\n" |
| 3043 |
" the \\[aq]gid_map\\[aq] file to address a security issue. The issue\n" |
| 3044 |
" allowed *unprivileged* users to employ user namespaces in\n" |
| 3045 |
" order to drop groups. The upshot of the 3.19 changes is that\n" |
| 3046 |
" in order to update the \\[aq]gid_maps\\[aq] file, use of the setgroups()\n" |
| 3047 |
" system call in this user namespace must first be disabled by\n" |
| 3048 |
" writing \"deny\" to one of the /proc/PID/setgroups files for\n" |
| 3049 |
" this namespace. That is the purpose of the following function. */\n" |
| 3050 |
"\\&\n" |
| 3051 |
"static void\n" |
| 3052 |
"proc_setgroups_write(pid_t child_pid, char *str)\n" |
| 3053 |
"{\n" |
| 3054 |
" char setgroups_path[PATH_MAX];\n" |
| 3055 |
" int fd;\n" |
| 3056 |
"\\&\n" |
| 3057 |
" snprintf(setgroups_path, PATH_MAX, \"/proc/%jd/setgroups\",\n" |
| 3058 |
" (intmax_t) child_pid);\n" |
| 3059 |
"\\&\n" |
| 3060 |
" fd = open(setgroups_path, O_RDWR);\n" |
| 3061 |
" if (fd == -1) {\n" |
| 3062 |
"\\&\n" |
| 3063 |
" /* We may be on a system that doesn\\[aq]t support\n" |
| 3064 |
" /proc/PID/setgroups. In that case, the file won\\[aq]t exist,\n" |
| 3065 |
" and the system won\\[aq]t impose the restrictions that Linux 3.19\n" |
| 3066 |
" added. That\\[aq]s fine: we don\\[aq]t need to do anything in order\n" |
| 3067 |
" to permit \\[aq]gid_map\\[aq] to be updated.\n" |
| 3068 |
"\\&\n" |
| 3069 |
" However, if the error from open() was something other than\n" |
| 3070 |
" the ENOENT error that is expected for that case, let the\n" |
| 3071 |
" user know. */\n" |
| 3072 |
"\\&\n" |
| 3073 |
" if (errno != ENOENT)\n" |
| 3074 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", setgroups_path,\n" |
| 3075 |
" strerror(errno));\n" |
| 3076 |
" return;\n" |
| 3077 |
" }\n" |
| 3078 |
"\\&\n" |
| 3079 |
" if (write(fd, str, strlen(str)) == -1)\n" |
| 3080 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", setgroups_path,\n" |
| 3081 |
" strerror(errno));\n" |
| 3082 |
"\\&\n" |
| 3083 |
" close(fd);\n" |
| 3084 |
"}\n" |
| 3085 |
"\\&\n" |
| 3086 |
"static int /* Start function for cloned child */\n" |
| 3087 |
"childFunc(void *arg)\n" |
| 3088 |
"{\n" |
| 3089 |
" struct child_args *args = arg;\n" |
| 3090 |
" char ch;\n" |
| 3091 |
"\\&\n" |
| 3092 |
" /* Wait until the parent has updated the UID and GID mappings.\n" |
| 3093 |
" See the comment in main(). We wait for end of file on a\n" |
| 3094 |
" pipe that will be closed by the parent process once it has\n" |
| 3095 |
" updated the mappings. */\n" |
| 3096 |
"\\&\n" |
| 3097 |
" close(args-E<gt>pipe_fd[1]); /* Close our descriptor for the write\n" |
| 3098 |
" end of the pipe so that we see EOF\n" |
| 3099 |
" when parent closes its descriptor. */\n" |
| 3100 |
" if (read(args-E<gt>pipe_fd[0], &ch, 1) != 0) {\n" |
| 3101 |
" fprintf(stderr,\n" |
| 3102 |
" \"Failure in child: read from pipe returned != 0\\[rs]n\");\n" |
| 3103 |
" exit(EXIT_FAILURE);\n" |
| 3104 |
" }\n" |
| 3105 |
"\\&\n" |
| 3106 |
" close(args-E<gt>pipe_fd[0]);\n" |
| 3107 |
"\\&\n" |
| 3108 |
" /* Execute a shell command. */\n" |
| 3109 |
"\\&\n" |
| 3110 |
" printf(\"About to exec %s\\[rs]n\", args-E<gt>argv[0]);\n" |
| 3111 |
" execvp(args-E<gt>argv[0], args-E<gt>argv);\n" |
| 3112 |
" err(EXIT_FAILURE, \"execvp\");\n" |
| 3113 |
"}\n" |
| 3114 |
"\\&\n" |
| 3115 |
"#define STACK_SIZE (1024 * 1024)\n" |
| 3116 |
"\\&\n" |
| 3117 |
"static char child_stack[STACK_SIZE]; /* Space for child\\[aq]s stack */\n" |
| 3118 |
"\\&\n" |
| 3119 |
"int\n" |
| 3120 |
"main(int argc, char *argv[])\n" |
| 3121 |
"{\n" |
| 3122 |
" int flags, opt, map_zero;\n" |
| 3123 |
" pid_t child_pid;\n" |
| 3124 |
" struct child_args args;\n" |
| 3125 |
" char *uid_map, *gid_map;\n" |
| 3126 |
" const int MAP_BUF_SIZE = 100;\n" |
| 3127 |
" char map_buf[MAP_BUF_SIZE];\n" |
| 3128 |
" char map_path[PATH_MAX];\n" |
| 3129 |
"\\&\n" |
| 3130 |
" /* Parse command-line options. The initial \\[aq]+\\[aq] character in\n" |
| 3131 |
" the final getopt() argument prevents GNU-style permutation\n" |
| 3132 |
" of command-line options. That\\[aq]s useful, since sometimes\n" |
| 3133 |
" the \\[aq]command\\[aq] to be executed by this program itself\n" |
| 3134 |
" has command-line options. We don\\[aq]t want getopt() to treat\n" |
| 3135 |
" those as options to this program. */\n" |
| 3136 |
"\\&\n" |
| 3137 |
" flags = 0;\n" |
| 3138 |
" verbose = 0;\n" |
| 3139 |
" gid_map = NULL;\n" |
| 3140 |
" uid_map = NULL;\n" |
| 3141 |
" map_zero = 0;\n" |
| 3142 |
" while ((opt = getopt(argc, argv, \"+imnpuUM:G:zv\")) != -1) {\n" |
| 3143 |
" switch (opt) {\n" |
| 3144 |
" case \\[aq]i\\[aq]: flags |= CLONE_NEWIPC; break;\n" |
| 3145 |
" case \\[aq]m\\[aq]: flags |= CLONE_NEWNS; break;\n" |
| 3146 |
" case \\[aq]n\\[aq]: flags |= CLONE_NEWNET; break;\n" |
| 3147 |
" case \\[aq]p\\[aq]: flags |= CLONE_NEWPID; break;\n" |
| 3148 |
" case \\[aq]u\\[aq]: flags |= CLONE_NEWUTS; break;\n" |
| 3149 |
" case \\[aq]v\\[aq]: verbose = 1; break;\n" |
| 3150 |
" case \\[aq]z\\[aq]: map_zero = 1; break;\n" |
| 3151 |
" case \\[aq]M\\[aq]: uid_map = optarg; break;\n" |
| 3152 |
" case \\[aq]G\\[aq]: gid_map = optarg; break;\n" |
| 3153 |
" case \\[aq]U\\[aq]: flags |= CLONE_NEWUSER; break;\n" |
| 3154 |
" default: usage(argv[0]);\n" |
| 3155 |
" }\n" |
| 3156 |
" }\n" |
| 3157 |
"\\&\n" |
| 3158 |
" /* -M or -G without -U is nonsensical */\n" |
| 3159 |
"\\&\n" |
| 3160 |
" if (((uid_map != NULL || gid_map != NULL || map_zero) &&\n" |
| 3161 |
" !(flags & CLONE_NEWUSER)) ||\n" |
| 3162 |
" (map_zero && (uid_map != NULL || gid_map != NULL)))\n" |
| 3163 |
" usage(argv[0]);\n" |
| 3164 |
"\\&\n" |
| 3165 |
" args.argv = &argv[optind];\n" |
| 3166 |
"\\&\n" |
| 3167 |
" /* We use a pipe to synchronize the parent and child, in order to\n" |
| 3168 |
" ensure that the parent sets the UID and GID maps before the child\n" |
| 3169 |
" calls execve(). This ensures that the child maintains its\n" |
| 3170 |
" capabilities during the execve() in the common case where we\n" |
| 3171 |
" want to map the child\\[aq]s effective user ID to 0 in the new user\n" |
| 3172 |
" namespace. Without this synchronization, the child would lose\n" |
| 3173 |
" its capabilities if it performed an execve() with nonzero\n" |
| 3174 |
" user IDs (see the capabilities(7) man page for details of the\n" |
| 3175 |
" transformation of a process\\[aq]s capabilities during execve()). */\n" |
| 3176 |
"\\&\n" |
| 3177 |
" if (pipe(args.pipe_fd) == -1)\n" |
| 3178 |
" err(EXIT_FAILURE, \"pipe\");\n" |
| 3179 |
"\\&\n" |
| 3180 |
" /* Create the child in new namespace(s). */\n" |
| 3181 |
"\\&\n" |
| 3182 |
" child_pid = clone(childFunc, child_stack + STACK_SIZE,\n" |
| 3183 |
" flags | SIGCHLD, &args);\n" |
| 3184 |
" if (child_pid == -1)\n" |
| 3185 |
" err(EXIT_FAILURE, \"clone\");\n" |
| 3186 |
"\\&\n" |
| 3187 |
" /* Parent falls through to here. */\n" |
| 3188 |
"\\&\n" |
| 3189 |
" if (verbose)\n" |
| 3190 |
" printf(\"%s: PID of child created by clone() is %jd\\[rs]n\",\n" |
| 3191 |
" argv[0], (intmax_t) child_pid);\n" |
| 3192 |
"\\&\n" |
| 3193 |
" /* Update the UID and GID maps in the child. */\n" |
| 3194 |
"\\&\n" |
| 3195 |
" if (uid_map != NULL || map_zero) {\n" |
| 3196 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/uid_map\",\n" |
| 3197 |
" (intmax_t) child_pid);\n" |
| 3198 |
" if (map_zero) {\n" |
| 3199 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %jd 1\",\n" |
| 3200 |
" (intmax_t) getuid());\n" |
| 3201 |
" uid_map = map_buf;\n" |
| 3202 |
" }\n" |
| 3203 |
" update_map(uid_map, map_path);\n" |
| 3204 |
" }\n" |
| 3205 |
"\\&\n" |
| 3206 |
" if (gid_map != NULL || map_zero) {\n" |
| 3207 |
" proc_setgroups_write(child_pid, \"deny\");\n" |
| 3208 |
"\\&\n" |
| 3209 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/gid_map\",\n" |
| 3210 |
" (intmax_t) child_pid);\n" |
| 3211 |
" if (map_zero) {\n" |
| 3212 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\",\n" |
| 3213 |
" (intmax_t) getgid());\n" |
| 3214 |
" gid_map = map_buf;\n" |
| 3215 |
" }\n" |
| 3216 |
" update_map(gid_map, map_path);\n" |
| 3217 |
" }\n" |
| 3218 |
"\\&\n" |
| 3219 |
" /* Close the write end of the pipe, to signal to the child that we\n" |
| 3220 |
" have updated the UID and GID maps. */\n" |
| 3221 |
"\\&\n" |
| 3222 |
" close(args.pipe_fd[1]);\n" |
| 3223 |
"\\&\n" |
| 3224 |
" if (waitpid(child_pid, NULL, 0) == -1) /* Wait for child */\n" |
| 3225 |
" err(EXIT_FAILURE, \"waitpid\");\n" |
| 3226 |
"\\&\n" |
| 3227 |
" if (verbose)\n" |
| 3228 |
" printf(\"%s: terminating\\[rs]n\", argv[0]);\n" |
| 3229 |
"\\&\n" |
| 3230 |
" exit(EXIT_SUCCESS);\n" |
| 3231 |
"}\n" |
| 3232 |
msgstr "" |
| 3233 |
|
| 3234 |
#. type: TH |
| 3235 |
#: fedora-44 fedora-rawhide |
| 3236 |
#, no-wrap |
| 3237 |
msgid "2025-01-11" |
| 3238 |
msgstr "11 janvier 2025" |
| 3239 |
|
| 3240 |
#. type: TH |
| 3241 |
#: fedora-44 fedora-rawhide |
| 3242 |
#, no-wrap |
| 3243 |
msgid "Linux man-pages 6.13" |
| 3244 |
msgstr "Pages du manuel de Linux 6.13" |
| 3245 |
|
| 3246 |
#. type: Plain text |
| 3247 |
#: fedora-44 fedora-rawhide |
| 3248 |
#, no-wrap |
| 3249 |
msgid "" |
| 3250 |
"/* userns_child_exec.c\n" |
| 3251 |
"\\&\n" |
| 3252 |
" Licensed under GNU General Public License v2 or later\n" |
| 3253 |
"\\&\n" |
| 3254 |
" Create a child process that executes a shell command in new\n" |
| 3255 |
" namespace(s); allow UID and GID mappings to be specified when\n" |
| 3256 |
" creating a user namespace.\n" |
| 3257 |
"*/\n" |
| 3258 |
"#define _GNU_SOURCE\n" |
| 3259 |
"#include E<lt>err.hE<gt>\n" |
| 3260 |
"#include E<lt>sched.hE<gt>\n" |
| 3261 |
"#include E<lt>unistd.hE<gt>\n" |
| 3262 |
"#include E<lt>stdint.hE<gt>\n" |
| 3263 |
"#include E<lt>stdlib.hE<gt>\n" |
| 3264 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 3265 |
"#include E<lt>signal.hE<gt>\n" |
| 3266 |
"#include E<lt>fcntl.hE<gt>\n" |
| 3267 |
"#include E<lt>stdio.hE<gt>\n" |
| 3268 |
"#include E<lt>string.hE<gt>\n" |
| 3269 |
"#include E<lt>limits.hE<gt>\n" |
| 3270 |
"#include E<lt>errno.hE<gt>\n" |
| 3271 |
"\\&\n" |
| 3272 |
"struct child_args {\n" |
| 3273 |
" char **argv; /* Command to be executed by child, with args */\n" |
| 3274 |
" int pipe_fd[2]; /* Pipe used to synchronize parent and child */\n" |
| 3275 |
"};\n" |
| 3276 |
"\\&\n" |
| 3277 |
"static int verbose;\n" |
| 3278 |
"\\&\n" |
| 3279 |
"static void\n" |
| 3280 |
"usage(char *pname)\n" |
| 3281 |
"{\n" |
| 3282 |
" fprintf(stderr, \"Usage: %s [options] cmd [arg...]\\[rs]n\\[rs]n\", pname);\n" |
| 3283 |
" fprintf(stderr, \"Create a child process that executes a shell \"\n" |
| 3284 |
" \"command in a new user namespace,\\[rs]n\"\n" |
| 3285 |
" \"and possibly also other new namespace(s).\\[rs]n\\[rs]n\");\n" |
| 3286 |
" fprintf(stderr, \"Options can be:\\[rs]n\\[rs]n\");\n" |
| 3287 |
"#define fpe(str) fprintf(stderr, \" %s\", str);\n" |
| 3288 |
" fpe(\"-i New IPC namespace\\[rs]n\");\n" |
| 3289 |
" fpe(\"-m New mount namespace\\[rs]n\");\n" |
| 3290 |
" fpe(\"-n New network namespace\\[rs]n\");\n" |
| 3291 |
" fpe(\"-p New PID namespace\\[rs]n\");\n" |
| 3292 |
" fpe(\"-u New UTS namespace\\[rs]n\");\n" |
| 3293 |
" fpe(\"-U New user namespace\\[rs]n\");\n" |
| 3294 |
" fpe(\"-M uid_map Specify UID map for user namespace\\[rs]n\");\n" |
| 3295 |
" fpe(\"-G gid_map Specify GID map for user namespace\\[rs]n\");\n" |
| 3296 |
" fpe(\"-z Map user\\[aq]s UID and GID to 0 in user namespace\\[rs]n\");\n" |
| 3297 |
" fpe(\" (equivalent to: -M \\[aq]0 E<lt>uidE<gt> 1\\[aq] -G \\[aq]0 E<lt>gidE<gt> 1\\[aq])\\[rs]n\");\n" |
| 3298 |
" fpe(\"-v Display verbose messages\\[rs]n\");\n" |
| 3299 |
" fpe(\"\\[rs]n\");\n" |
| 3300 |
" fpe(\"If -z, -M, or -G is specified, -U is required.\\[rs]n\");\n" |
| 3301 |
" fpe(\"It is not permitted to specify both -z and either -M or -G.\\[rs]n\");\n" |
| 3302 |
" fpe(\"\\[rs]n\");\n" |
| 3303 |
" fpe(\"Map strings for -M and -G consist of records of the form:\\[rs]n\");\n" |
| 3304 |
" fpe(\"\\[rs]n\");\n" |
| 3305 |
" fpe(\" ID-inside-ns ID-outside-ns size\\[rs]n\");\n" |
| 3306 |
" fpe(\"\\[rs]n\");\n" |
| 3307 |
" fpe(\"A map string can contain multiple records, separated\"\n" |
| 3308 |
" \" by commas;\\[rs]n\");\n" |
| 3309 |
" fpe(\"the commas are replaced by newlines before writing\"\n" |
| 3310 |
" \" to map files.\\[rs]n\");\n" |
| 3311 |
"\\&\n" |
| 3312 |
" exit(EXIT_FAILURE);\n" |
| 3313 |
"}\n" |
| 3314 |
"\\&\n" |
| 3315 |
"/* Update the mapping file \\[aq]map_file\\[aq], with the value provided in\n" |
| 3316 |
" \\[aq]mapping\\[aq], a string that defines a UID or GID mapping. A UID or\n" |
| 3317 |
" GID mapping consists of one or more newline-delimited records\n" |
| 3318 |
" of the form:\n" |
| 3319 |
"\\&\n" |
| 3320 |
" ID_inside-ns ID-outside-ns size\n" |
| 3321 |
"\\&\n" |
| 3322 |
" Requiring the user to supply a string that contains newlines is\n" |
| 3323 |
" of course inconvenient for command-line use. Thus, we permit the\n" |
| 3324 |
" use of commas to delimit records in this string, and replace them\n" |
| 3325 |
" with newlines before writing the string to the file. */\n" |
| 3326 |
"\\&\n" |
| 3327 |
"static void\n" |
| 3328 |
"update_map(char *mapping, char *map_file)\n" |
| 3329 |
"{\n" |
| 3330 |
" int fd;\n" |
| 3331 |
" size_t map_len; /* Length of \\[aq]mapping\\[aq] */\n" |
| 3332 |
"\\&\n" |
| 3333 |
" /* Replace commas in mapping string with newlines. */\n" |
| 3334 |
"\\&\n" |
| 3335 |
" map_len = strlen(mapping);\n" |
| 3336 |
" for (size_t j = 0; j E<lt> map_len; j++)\n" |
| 3337 |
" if (mapping[j] == \\[aq],\\[aq])\n" |
| 3338 |
" mapping[j] = \\[aq]\\[rs]n\\[aq];\n" |
| 3339 |
"\\&\n" |
| 3340 |
" fd = open(map_file, O_RDWR);\n" |
| 3341 |
" if (fd == -1) {\n" |
| 3342 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", map_file,\n" |
| 3343 |
" strerror(errno));\n" |
| 3344 |
" exit(EXIT_FAILURE);\n" |
| 3345 |
" }\n" |
| 3346 |
"\\&\n" |
| 3347 |
" if (write(fd, mapping, map_len) != map_len) {\n" |
| 3348 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", map_file,\n" |
| 3349 |
" strerror(errno));\n" |
| 3350 |
" exit(EXIT_FAILURE);\n" |
| 3351 |
" }\n" |
| 3352 |
"\\&\n" |
| 3353 |
" close(fd);\n" |
| 3354 |
"}\n" |
| 3355 |
"\\&\n" |
| 3356 |
"/* Linux 3.19 made a change in the handling of setgroups(2) and\n" |
| 3357 |
" the \\[aq]gid_map\\[aq] file to address a security issue. The issue\n" |
| 3358 |
" allowed *unprivileged* users to employ user namespaces in\n" |
| 3359 |
" order to drop groups. The upshot of the 3.19 changes is that\n" |
| 3360 |
" in order to update the \\[aq]gid_maps\\[aq] file, use of the setgroups()\n" |
| 3361 |
" system call in this user namespace must first be disabled by\n" |
| 3362 |
" writing \"deny\" to one of the /proc/PID/setgroups files for\n" |
| 3363 |
" this namespace. That is the purpose of the following function. */\n" |
| 3364 |
"\\&\n" |
| 3365 |
"static void\n" |
| 3366 |
"proc_setgroups_write(pid_t child_pid, char *str)\n" |
| 3367 |
"{\n" |
| 3368 |
" char setgroups_path[PATH_MAX];\n" |
| 3369 |
" int fd;\n" |
| 3370 |
"\\&\n" |
| 3371 |
" snprintf(setgroups_path, PATH_MAX, \"/proc/%jd/setgroups\",\n" |
| 3372 |
" (intmax_t) child_pid);\n" |
| 3373 |
"\\&\n" |
| 3374 |
" fd = open(setgroups_path, O_RDWR);\n" |
| 3375 |
" if (fd == -1) {\n" |
| 3376 |
"\\&\n" |
| 3377 |
" /* We may be on a system that doesn\\[aq]t support\n" |
| 3378 |
" /proc/PID/setgroups. In that case, the file won\\[aq]t exist,\n" |
| 3379 |
" and the system won\\[aq]t impose the restrictions that Linux 3.19\n" |
| 3380 |
" added. That\\[aq]s fine: we don\\[aq]t need to do anything in order\n" |
| 3381 |
" to permit \\[aq]gid_map\\[aq] to be updated.\n" |
| 3382 |
"\\&\n" |
| 3383 |
" However, if the error from open() was something other than\n" |
| 3384 |
" the ENOENT error that is expected for that case, let the\n" |
| 3385 |
" user know. */\n" |
| 3386 |
"\\&\n" |
| 3387 |
" if (errno != ENOENT)\n" |
| 3388 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", setgroups_path,\n" |
| 3389 |
" strerror(errno));\n" |
| 3390 |
" return;\n" |
| 3391 |
" }\n" |
| 3392 |
"\\&\n" |
| 3393 |
" if (write(fd, str, strlen(str)) == -1)\n" |
| 3394 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", setgroups_path,\n" |
| 3395 |
" strerror(errno));\n" |
| 3396 |
"\\&\n" |
| 3397 |
" close(fd);\n" |
| 3398 |
"}\n" |
| 3399 |
"\\&\n" |
| 3400 |
"static int /* Start function for cloned child */\n" |
| 3401 |
"childFunc(void *arg)\n" |
| 3402 |
"{\n" |
| 3403 |
" struct child_args *args = arg;\n" |
| 3404 |
" char ch;\n" |
| 3405 |
"\\&\n" |
| 3406 |
" /* Wait until the parent has updated the UID and GID mappings.\n" |
| 3407 |
" See the comment in main(). We wait for end of file on a\n" |
| 3408 |
" pipe that will be closed by the parent process once it has\n" |
| 3409 |
" updated the mappings. */\n" |
| 3410 |
"\\&\n" |
| 3411 |
" close(args-E<gt>pipe_fd[1]); /* Close our descriptor for the write\n" |
| 3412 |
" end of the pipe so that we see EOF\n" |
| 3413 |
" when parent closes its descriptor. */\n" |
| 3414 |
" if (read(args-E<gt>pipe_fd[0], &ch, 1) != 0) {\n" |
| 3415 |
" fprintf(stderr,\n" |
| 3416 |
" \"Failure in child: read from pipe returned != 0\\[rs]n\");\n" |
| 3417 |
" exit(EXIT_FAILURE);\n" |
| 3418 |
" }\n" |
| 3419 |
"\\&\n" |
| 3420 |
" close(args-E<gt>pipe_fd[0]);\n" |
| 3421 |
"\\&\n" |
| 3422 |
" /* Execute a shell command. */\n" |
| 3423 |
"\\&\n" |
| 3424 |
" printf(\"About to exec %s\\[rs]n\", args-E<gt>argv[0]);\n" |
| 3425 |
" execvp(args-E<gt>argv[0], args-E<gt>argv);\n" |
| 3426 |
" err(EXIT_FAILURE, \"execvp\");\n" |
| 3427 |
"}\n" |
| 3428 |
"\\&\n" |
| 3429 |
"#define STACK_SIZE (1024 * 1024)\n" |
| 3430 |
"\\&\n" |
| 3431 |
"static char child_stack[STACK_SIZE]; /* Space for child\\[aq]s stack */\n" |
| 3432 |
"\\&\n" |
| 3433 |
"int\n" |
| 3434 |
"main(int argc, char *argv[])\n" |
| 3435 |
"{\n" |
| 3436 |
" int flags, opt, map_zero;\n" |
| 3437 |
" pid_t child_pid;\n" |
| 3438 |
" struct child_args args;\n" |
| 3439 |
" char *uid_map, *gid_map;\n" |
| 3440 |
" const int MAP_BUF_SIZE = 100;\n" |
| 3441 |
" char map_buf[MAP_BUF_SIZE];\n" |
| 3442 |
" char map_path[PATH_MAX];\n" |
| 3443 |
"\\&\n" |
| 3444 |
" /* Parse command-line options. The initial \\[aq]+\\[aq] character in\n" |
| 3445 |
" the final getopt() argument prevents GNU-style permutation\n" |
| 3446 |
" of command-line options. That\\[aq]s useful, since sometimes\n" |
| 3447 |
" the \\[aq]command\\[aq] to be executed by this program itself\n" |
| 3448 |
" has command-line options. We don\\[aq]t want getopt() to treat\n" |
| 3449 |
" those as options to this program. */\n" |
| 3450 |
"\\&\n" |
| 3451 |
" flags = 0;\n" |
| 3452 |
" verbose = 0;\n" |
| 3453 |
" gid_map = NULL;\n" |
| 3454 |
" uid_map = NULL;\n" |
| 3455 |
" map_zero = 0;\n" |
| 3456 |
" while ((opt = getopt(argc, argv, \"+imnpuUM:G:zv\")) != -1) {\n" |
| 3457 |
" switch (opt) {\n" |
| 3458 |
" case \\[aq]i\\[aq]: flags |= CLONE_NEWIPC; break;\n" |
| 3459 |
" case \\[aq]m\\[aq]: flags |= CLONE_NEWNS; break;\n" |
| 3460 |
" case \\[aq]n\\[aq]: flags |= CLONE_NEWNET; break;\n" |
| 3461 |
" case \\[aq]p\\[aq]: flags |= CLONE_NEWPID; break;\n" |
| 3462 |
" case \\[aq]u\\[aq]: flags |= CLONE_NEWUTS; break;\n" |
| 3463 |
" case \\[aq]v\\[aq]: verbose = 1; break;\n" |
| 3464 |
" case \\[aq]z\\[aq]: map_zero = 1; break;\n" |
| 3465 |
" case \\[aq]M\\[aq]: uid_map = optarg; break;\n" |
| 3466 |
" case \\[aq]G\\[aq]: gid_map = optarg; break;\n" |
| 3467 |
" case \\[aq]U\\[aq]: flags |= CLONE_NEWUSER; break;\n" |
| 3468 |
" default: usage(argv[0]);\n" |
| 3469 |
" }\n" |
| 3470 |
" }\n" |
| 3471 |
"\\&\n" |
| 3472 |
" /* -M or -G without -U is nonsensical */\n" |
| 3473 |
"\\&\n" |
| 3474 |
" if (((uid_map != NULL || gid_map != NULL || map_zero) &&\n" |
| 3475 |
" !(flags & CLONE_NEWUSER)) ||\n" |
| 3476 |
" (map_zero && (uid_map != NULL || gid_map != NULL)))\n" |
| 3477 |
" usage(argv[0]);\n" |
| 3478 |
"\\&\n" |
| 3479 |
" args.argv = &argv[optind];\n" |
| 3480 |
"\\&\n" |
| 3481 |
" /* We use a pipe to synchronize the parent and child, in order to\n" |
| 3482 |
" ensure that the parent sets the UID and GID maps before the child\n" |
| 3483 |
" calls execve(). This ensures that the child maintains its\n" |
| 3484 |
" capabilities during the execve() in the common case where we\n" |
| 3485 |
" want to map the child\\[aq]s effective user ID to 0 in the new user\n" |
| 3486 |
" namespace. Without this synchronization, the child would lose\n" |
| 3487 |
" its capabilities if it performed an execve() with nonzero\n" |
| 3488 |
" user IDs (see the capabilities(7) man page for details of the\n" |
| 3489 |
" transformation of a process\\[aq]s capabilities during execve()). */\n" |
| 3490 |
"\\&\n" |
| 3491 |
" if (pipe(args.pipe_fd) == -1)\n" |
| 3492 |
" err(EXIT_FAILURE, \"pipe\");\n" |
| 3493 |
"\\&\n" |
| 3494 |
" /* Create the child in new namespace(s). */\n" |
| 3495 |
"\\&\n" |
| 3496 |
" child_pid = clone(childFunc, child_stack + STACK_SIZE,\n" |
| 3497 |
" flags | SIGCHLD, &args);\n" |
| 3498 |
" if (child_pid == -1)\n" |
| 3499 |
" err(EXIT_FAILURE, \"clone\");\n" |
| 3500 |
"\\&\n" |
| 3501 |
" /* Parent falls through to here. */\n" |
| 3502 |
"\\&\n" |
| 3503 |
" if (verbose)\n" |
| 3504 |
" printf(\"%s: PID of child created by clone() is %jd\\[rs]n\",\n" |
| 3505 |
" argv[0], (intmax_t) child_pid);\n" |
| 3506 |
"\\&\n" |
| 3507 |
" /* Update the UID and GID maps in the child. */\n" |
| 3508 |
"\\&\n" |
| 3509 |
" if (uid_map != NULL || map_zero) {\n" |
| 3510 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/uid_map\",\n" |
| 3511 |
" (intmax_t) child_pid);\n" |
| 3512 |
" if (map_zero) {\n" |
| 3513 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %jd 1\",\n" |
| 3514 |
" (intmax_t) getuid());\n" |
| 3515 |
" uid_map = map_buf;\n" |
| 3516 |
" }\n" |
| 3517 |
" update_map(uid_map, map_path);\n" |
| 3518 |
" }\n" |
| 3519 |
"\\&\n" |
| 3520 |
" if (gid_map != NULL || map_zero) {\n" |
| 3521 |
" proc_setgroups_write(child_pid, \"deny\");\n" |
| 3522 |
"\\&\n" |
| 3523 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/gid_map\",\n" |
| 3524 |
" (intmax_t) child_pid);\n" |
| 3525 |
" if (map_zero) {\n" |
| 3526 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\",\n" |
| 3527 |
" (intmax_t) getgid());\n" |
| 3528 |
" gid_map = map_buf;\n" |
| 3529 |
" }\n" |
| 3530 |
" update_map(gid_map, map_path);\n" |
| 3531 |
" }\n" |
| 3532 |
"\\&\n" |
| 3533 |
" /* Close the write end of the pipe, to signal to the child that we\n" |
| 3534 |
" have updated the UID and GID maps. */\n" |
| 3535 |
"\\&\n" |
| 3536 |
" close(args.pipe_fd[1]);\n" |
| 3537 |
"\\&\n" |
| 3538 |
" if (waitpid(child_pid, NULL, 0) == -1) /* Wait for child */\n" |
| 3539 |
" err(EXIT_FAILURE, \"waitpid\");\n" |
| 3540 |
"\\&\n" |
| 3541 |
" if (verbose)\n" |
| 3542 |
" printf(\"%s: terminating\\[rs]n\", argv[0]);\n" |
| 3543 |
"\\&\n" |
| 3544 |
" exit(EXIT_SUCCESS);\n" |
| 3545 |
"}\n" |
| 3546 |
msgstr "" |
| 3547 |
|
| 3548 |
#. type: TH |
| 3549 |
#: mageia-cauldron |
| 3550 |
#, no-wrap |
| 3551 |
msgid "Linux man-pages 6.17" |
| 3552 |
msgstr "Pages du manuel de Linux 6.17" |
| 3553 |
|
| 3554 |
#. type: TH |
| 3555 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3556 |
#, no-wrap |
| 3557 |
msgid "Linux man-pages (unreleased)" |
| 3558 |
msgstr "Pages du manuel de Linux (non publiées)" |