| 1 |
# German translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# Helge Kreutzmann <[email protected]>, 2021,2023. |
| 5 |
msgid "" |
| 6 |
msgstr "" |
| 7 |
"Project-Id-Version: manpages-l10n 4.30.2\n" |
| 8 |
"POT-Creation-Date: 2026-06-05 06:50+0200\n" |
| 9 |
"PO-Revision-Date: 2026-06-06 10:38+0200\n" |
| 10 |
"Last-Translator: Helge Kreutzmann <[email protected]>\n" |
| 11 |
"Language-Team: German <[email protected]>\n" |
| 12 |
"Language: de\n" |
| 13 |
"MIME-Version: 1.0\n" |
| 14 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 15 |
"Content-Transfer-Encoding: 8bit\n" |
| 16 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
| 17 |
|
| 18 |
#. type: TH |
| 19 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 20 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 21 |
#, no-wrap |
| 22 |
msgid "user_namespaces" |
| 23 |
msgstr "user_namespaces" |
| 24 |
|
| 25 |
#. type: TH |
| 26 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 27 |
#: opensuse-tumbleweed |
| 28 |
#, no-wrap |
| 29 |
msgid "2026-02-08" |
| 30 |
msgstr "8. Februar 2026" |
| 31 |
|
| 32 |
#. type: TH |
| 33 |
#: archlinux debian-unstable |
| 34 |
#, no-wrap |
| 35 |
msgid "Linux man-pages 6.18" |
| 36 |
msgstr "Linux man-pages 6.18" |
| 37 |
|
| 38 |
#. type: SH |
| 39 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 40 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 41 |
#, no-wrap |
| 42 |
msgid "NAME" |
| 43 |
msgstr "BEZEICHNUNG" |
| 44 |
|
| 45 |
#. type: Plain text |
| 46 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 47 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 48 |
msgid "user_namespaces - overview of Linux user namespaces" |
| 49 |
msgstr "user_namespaces - Überblick über Benutzernamensräume in Linux" |
| 50 |
|
| 51 |
#. type: SH |
| 52 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 53 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 54 |
#, no-wrap |
| 55 |
msgid "DESCRIPTION" |
| 56 |
msgstr "BESCHREIBUNG" |
| 57 |
|
| 58 |
#. type: Plain text |
| 59 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 60 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 61 |
msgid "For an overview of namespaces, see B<namespaces>(7)." |
| 62 |
msgstr "Für einen Überblick über Namensräume, siehe B<namespaces>(7)." |
| 63 |
|
| 64 |
# |
| 65 |
#. #-#-#-#-# archlinux: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 66 |
#. FIXME: This page says very little about the interaction |
| 67 |
#. of user namespaces and keys. Add something on this topic. |
| 68 |
#. ============================================================ |
| 69 |
#. type: Plain text |
| 70 |
#. #-#-#-#-# debian-trixie: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 71 |
#. FIXME: This page says very little about the interaction |
| 72 |
#. of user namespaces and keys. Add something on this topic. |
| 73 |
#. ============================================================ |
| 74 |
#. type: Plain text |
| 75 |
#. #-#-#-#-# debian-unstable: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 76 |
#. FIXME: This page says very little about the interaction |
| 77 |
#. of user namespaces and keys. Add something on this topic. |
| 78 |
#. ============================================================ |
| 79 |
#. type: Plain text |
| 80 |
#. #-#-#-#-# fedora-44: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 81 |
#. FIXME: This page says very little about the interaction |
| 82 |
#. of user namespaces and keys. Add something on this topic. |
| 83 |
#. ============================================================ |
| 84 |
#. type: Plain text |
| 85 |
#. #-#-#-#-# fedora-rawhide: 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 |
#. #-#-#-#-# mageia-cauldron: 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 |
#. #-#-#-#-# opensuse-leap-16-1: 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 |
#. #-#-#-#-# opensuse-tumbleweed: 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 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 106 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 107 |
msgid "" |
| 108 |
"User namespaces isolate security-related identifiers and attributes, in " |
| 109 |
"particular, user IDs and group IDs (see B<credentials>(7)), the root " |
| 110 |
"directory, keys (see B<keyrings>(7)), and capabilities (see " |
| 111 |
"B<capabilities>(7)). A process's user and group IDs can be different inside " |
| 112 |
"and outside a user namespace. In particular, a process can have a normal " |
| 113 |
"unprivileged user ID outside a user namespace while at the same time having " |
| 114 |
"a user ID of 0 inside the namespace; in other words, the process has full " |
| 115 |
"privileges for operations inside the user namespace, but is unprivileged for " |
| 116 |
"operations outside the namespace." |
| 117 |
msgstr "" |
| 118 |
"Benutzernamensräume isolieren sicherheitsrelevante Kennzeichner und " |
| 119 |
"Attribute, insbesondere Benutzer- und Gruppenkennungen (siehe " |
| 120 |
"B<credentials>(7)), das Wurzelverzeichnis, Schlüssel (siehe B<keyrings>(7)) " |
| 121 |
"und Capabilitys (siehe B<capabilities>(7)). Die Benutzer- und Gruppenkennung " |
| 122 |
"eines Prozesses kann innerhalb und außerhalb eines Benutzernamensraums " |
| 123 |
"verschieden sein. Insbesondere kann ein Prozess eine normale, nicht " |
| 124 |
"privilegierte Benutzerkennung außerhalb eines Benutzernamensraums haben, " |
| 125 |
"während er gleichzeitig eine Benutzerkennung 0 innerhalb des Namensraums " |
| 126 |
"hat; mit anderen Worten, der Prozess hat volle Privilegien für Aktionen " |
| 127 |
"innerhalb des Benutzernamensraums, ist aber für Aktionen außerhalb des " |
| 128 |
"Namensraums nicht privilegiert." |
| 129 |
|
| 130 |
#. type: SS |
| 131 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 132 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 133 |
#, no-wrap |
| 134 |
msgid "Nested namespaces, namespace membership" |
| 135 |
msgstr "Verschachtelte Namensräume, Namensraum-Mitgliedschaft" |
| 136 |
|
| 137 |
#. type: Plain text |
| 138 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 139 |
#: opensuse-tumbleweed |
| 140 |
msgid "" |
| 141 |
"User namespaces can be nested; that is, each user namespace \\[em]except the " |
| 142 |
"initial (\"root\") namespace\\[em] has a parent user namespace, and can have " |
| 143 |
"zero or more child user namespaces. The parent user namespace is the user " |
| 144 |
"namespace of the process that creates the user namespace via a call to " |
| 145 |
"B<unshare>(2) or B<clone>(2) with the B<CLONE_NEWUSER> flag." |
| 146 |
msgstr "" |
| 147 |
"Benutzernamensräume können verschachtelt werden, das bedeutet, dass jeder " |
| 148 |
"Benutzernamensraum\\[en]außer dem anfänglichen (»Wurzel-«)Namensraum\\" |
| 149 |
"[en]über einen Vorgängernamensraum verfügt und keinen oder mehrere " |
| 150 |
"Nachfolgernamensräume haben kann. Der Vorgängernamensraum ist der " |
| 151 |
"Benutzernamensraum des Prozesses, der den Benutzernamensraum mittels eines " |
| 152 |
"Aufrufs von B<unshare>(2) oder B<clone>(2) mit dem Schalter B<CLONE_NEWUSER> " |
| 153 |
"erstellte." |
| 154 |
|
| 155 |
#. commit 8742f229b635bf1c1c84a3dfe5e47c814c20b5c8 |
| 156 |
#. FIXME Explain the rationale for this limit. (What is the rationale?) |
| 157 |
#. type: Plain text |
| 158 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 159 |
#: opensuse-tumbleweed |
| 160 |
msgid "" |
| 161 |
"The kernel imposes (since Linux 3.11) a limit of 32 nested levels of user " |
| 162 |
"namespaces. Calls to B<unshare>(2) or B<clone>(2) that would cause this " |
| 163 |
"limit to be exceeded fail with the error B<EUSERS>." |
| 164 |
msgstr "" |
| 165 |
"(Seit Linux 3.11) erzwingt der Kernel eine Begrenzung von 32 verschachtelten " |
| 166 |
"Stufen an Benutzernamensräumen. Aufrufe an B<unshare>(2) oder B<clone>(2), " |
| 167 |
"die zum Überschreiten dieser Begrenzung führen würden, schlagen mit dem " |
| 168 |
"Fehler B<EUSERS> fehl." |
| 169 |
|
| 170 |
#. type: Plain text |
| 171 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 172 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 173 |
msgid "" |
| 174 |
"Each process is a member of exactly one user namespace. A process created " |
| 175 |
"via B<fork>(2) or B<clone>(2) without the B<CLONE_NEWUSER> flag is a " |
| 176 |
"member of the same user namespace as its parent. A single-threaded process " |
| 177 |
"can join another user namespace with B<setns>(2) if it has the " |
| 178 |
"B<CAP_SYS_ADMIN> in that namespace; upon doing so, it gains a full set of " |
| 179 |
"capabilities in that namespace." |
| 180 |
msgstr "" |
| 181 |
"Jeder Prozess ist Mitglied in genau einem Benutzernamensraum. Ein mit " |
| 182 |
"B<fork>(2) oder B<clone>(2) ohne den Schalter B<CLONE_NEWUSER> erstellter " |
| 183 |
"Prozess ist ein Mitglied im gleichen Benutzernamensraum wie sein " |
| 184 |
"Elternprozess. Ein Prozess mit nur einem Thread kann einem anderen " |
| 185 |
"Benutzernamensraum mit B<setns>(2) beitreten, falls er über B<CAP_SYS_ADMIN> " |
| 186 |
"in diesem Namensraum verfügt; wenn er dies durchführt, erlangt er den " |
| 187 |
"vollständigen Satz an Capabilitys in diesem Namensraum." |
| 188 |
|
| 189 |
#. type: Plain text |
| 190 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 191 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 192 |
msgid "" |
| 193 |
"A call to B<clone>(2) or B<unshare>(2) with the B<CLONE_NEWUSER> flag " |
| 194 |
"makes the new child process (for B<clone>(2)) or the caller (for " |
| 195 |
"B<unshare>(2)) a member of the new user namespace created by the call." |
| 196 |
msgstr "" |
| 197 |
"Ein Aufruf von B<clone>(2) oder B<unshare>(2) mit dem Schalter " |
| 198 |
"B<CLONE_NEWUSER> führt dazu, dass der Kindprozess (für B<clone>(2)) oder der " |
| 199 |
"Aufrufende (für B<unshare>(2)) ein Mitglied des neuen, durch den Aufruf " |
| 200 |
"erstellten Benutzernamensraums wird." |
| 201 |
|
| 202 |
# |
| 203 |
#. type: Plain text |
| 204 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 205 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 206 |
msgid "" |
| 207 |
"The B<NS_GET_PARENT> B<ioctl>(2) operation can be used to discover the " |
| 208 |
"parental relationship between user namespaces; see B<ioctl_nsfs>(2)." |
| 209 |
msgstr "" |
| 210 |
"Die Aktion B<NS_GET_PARENT> B<ioctl>(2) kann zum Erkennen der Vorgänger-/" |
| 211 |
"Nachfolger-Beziehung von Benutzernamensräumen verwandt werden; siehe " |
| 212 |
"B<ioctl_nfs>(2)." |
| 213 |
|
| 214 |
# |
| 215 |
#. ============================================================ |
| 216 |
#. type: Plain text |
| 217 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 218 |
#: opensuse-tumbleweed |
| 219 |
msgid "" |
| 220 |
"A task that changes one of its effective IDs will have its dumpability reset " |
| 221 |
"to the value in I</proc/sys/fs/suid_dumpable>. This may affect the " |
| 222 |
"ownership of proc files of child processes and may thus cause the parent to " |
| 223 |
"lack the permissions to write to mapping files of child processes running in " |
| 224 |
"a new user namespace. In such cases, making the parent process dumpable, " |
| 225 |
"using B<PR_SET_DUMPABLE> in a call to B<prctl>(2), before creating a child " |
| 226 |
"process in a new user namespace may rectify this problem. See B<prctl>(2) " |
| 227 |
"and B<proc>(5) for details on how ownership is affected." |
| 228 |
msgstr "" |
| 229 |
"Ein Task, der eine seiner effektiven Kennungen ändert, bekommt sein " |
| 230 |
"»dumpable« auf den in I</proc/sys/fs/suid_dumpable> angegebenen Wert " |
| 231 |
"zurückgesetzt. Dies kann die Eigentümerschaft von Proc-Dateien von " |
| 232 |
"Kindprozessen betreffen und kann daher dazu führen, dass dem Elternprozess " |
| 233 |
"Berechtigungen fehlen, um in Mapping-Dateien des Kindprozesses, die in neuen " |
| 234 |
"Benutzernamensräumen ausgeführt werden, zu schreiben. Das Problem kann " |
| 235 |
"korrigiert werden, indem in diesen Fällen der Elternprozess mittels " |
| 236 |
"B<PR_SET_DUMPABLE> in einem Aufruf von B<prctl>(2) vor der Erstellung des " |
| 237 |
"Kindprozesses in einem neuen Benutzernamensraum »dumpable« gemacht wird. " |
| 238 |
"Siehe B<prctl>(2) und B<proc>(5) zu Details wie die Eigentümerschaft " |
| 239 |
"betroffen ist." |
| 240 |
|
| 241 |
#. type: SS |
| 242 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 243 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 244 |
#, no-wrap |
| 245 |
msgid "Capabilities" |
| 246 |
msgstr "Capabilitys" |
| 247 |
|
| 248 |
#. type: Plain text |
| 249 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 250 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 251 |
msgid "" |
| 252 |
"The child process created by B<clone>(2) with the B<CLONE_NEWUSER> flag " |
| 253 |
"starts out with a complete set of capabilities in the new user namespace. " |
| 254 |
"Likewise, a process that creates a new user namespace using B<unshare>(2) " |
| 255 |
"or joins an existing user namespace using B<setns>(2) gains a full set of " |
| 256 |
"capabilities in that namespace. On the other hand, that process has no " |
| 257 |
"capabilities in the parent (in the case of B<clone>(2)) or previous (in the " |
| 258 |
"case of B<unshare>(2) and B<setns>(2)) user namespace, even if the new " |
| 259 |
"namespace is created or joined by the root user (i.e., a process with user " |
| 260 |
"ID 0 in the root namespace)." |
| 261 |
msgstr "" |
| 262 |
"Der durch B<clone>(2) mit dem Schalter B<CLONE_NEWUSER> erstellte " |
| 263 |
"Kindprozess beginnt mit einem vollständigen Satz an Capabilitys in dem neuen " |
| 264 |
"Benutzernamensraum. Entsprechend erlangt ein Prozess, der einen neuen " |
| 265 |
"Benutzernamensraum mittels B<unshare>(2) erstellt oder ihm mittels " |
| 266 |
"B<setns>(2) beitritt, einen vollständigen Satz an Capabilitys in diesem " |
| 267 |
"Namensraum. Anderserseits hat dieser Prozess keine Capabilitys in dem " |
| 268 |
"Vorgänger- (im Falle von B<clone>(2)) oder vorhergehenden (im Falle von " |
| 269 |
"B<unshare>(2) und B<setns>(2)) Benutzernamensraum, selbst falls der neue " |
| 270 |
"Namensraum vom Benutzer root erstellt wird oder dieser ihm beitritt (d.h. " |
| 271 |
"einem Prozess mit der Benutzerkennung 0 im Wurzel-Namensraum)." |
| 272 |
|
| 273 |
#. type: Plain text |
| 274 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 275 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 276 |
msgid "" |
| 277 |
"Note that a call to B<execve>(2) will cause a process's capabilities to be " |
| 278 |
"recalculated in the usual way (see B<capabilities>(7)). Consequently, " |
| 279 |
"unless the process has a user ID of 0 within the namespace, or the " |
| 280 |
"executable file has a nonempty inheritable capabilities mask, the process " |
| 281 |
"will lose all capabilities. See the discussion of user and group ID " |
| 282 |
"mappings, below." |
| 283 |
msgstr "" |
| 284 |
"Beachten Sie, dass ein Aufruf von B<execve>(2) dazu führt, dass die " |
| 285 |
"Capabilitys eines Prozesses auf die normale Art und Weise erneut berechnet " |
| 286 |
"werden (siehe B<capabilities>(7)). Folglich wird der Prozess alle " |
| 287 |
"Capabilitys verlieren, außer er hat eine Benutzerkennung von 0 innerhalb des " |
| 288 |
"Namensraums oder die ausführbare Datei hat eine vererbbare Capability-Maske, " |
| 289 |
"die nicht leer ist. Siehe die nachfolgende Diskussion von Benutzer- und " |
| 290 |
"Gruppenkennungabbildung." |
| 291 |
|
| 292 |
#. type: Plain text |
| 293 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 294 |
#: opensuse-tumbleweed |
| 295 |
msgid "" |
| 296 |
"A call to B<clone>(2) or B<unshare>(2) using the B<CLONE_NEWUSER> flag or " |
| 297 |
"a call to B<setns>(2) that moves the caller into another user namespace " |
| 298 |
"sets the \"securebits\" flags (see B<capabilities>(7)) to their default " |
| 299 |
"values (all flags disabled) in the child (for B<clone>(2)) or caller (for " |
| 300 |
"B<unshare>(2) or B<setns>(2)). Note that because the caller no longer has " |
| 301 |
"capabilities in its original user namespace after a call to B<setns>(2), it " |
| 302 |
"is not possible for a process to reset its \"securebits\" flags while " |
| 303 |
"retaining its user namespace membership by using a pair of B<setns>(2) " |
| 304 |
"calls to move to another user namespace and then return to its original user " |
| 305 |
"namespace." |
| 306 |
msgstr "" |
| 307 |
"Ein Aufruf von B<clone>(2) oder B<unshare>(2) mit dem Schalter " |
| 308 |
"B<CLONE_NEWUSER> oder ein Aufruf von B<setns>(2), der den Aufrufenden in " |
| 309 |
"einen anderen Benutzernamensraum verschiebt, setzt die Schalter »securebits« " |
| 310 |
"(siehe B<capabilities>(7)) im Kind (für B<clone>(2)) oder dem Aufrufenden " |
| 311 |
"(für B<unshare>(2) oder B<setns>(2)) auf ihre Vorgabewerte (alle Schalter " |
| 312 |
"deaktiviert). Beachten Sie, dass der Aufrufende nach einem Aufruf von " |
| 313 |
"B<setns>(2) keine Capabilitys in seinem ursprünglichen Benutzernamensraum " |
| 314 |
"mehr hat und es daher für einen Prozess nicht möglich ist, seine Schalter " |
| 315 |
"»securebits« zurückzusetzen und gleichzeitig seine Mitgliedschaft im " |
| 316 |
"Benutzernamensraum zu erhalten, indem ein Paar von B<setns>(2)-Aufrufen " |
| 317 |
"verwandt wird, um sich in einen anderen Benutzernamensraum zu verschieben " |
| 318 |
"und dann zu seinem ursprünglichen Namensraum zurückzukehren." |
| 319 |
|
| 320 |
#. type: Plain text |
| 321 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 322 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 323 |
msgid "" |
| 324 |
"The rules for determining whether or not a process has a capability in a " |
| 325 |
"particular user namespace are as follows:" |
| 326 |
msgstr "" |
| 327 |
"Die Regeln zur Bestimmung, ob ein Prozess eine Capability in einem " |
| 328 |
"bestimmten Benutzernamensraum hat, sind wie folgt:" |
| 329 |
|
| 330 |
#. type: IP |
| 331 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 332 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 333 |
#, no-wrap |
| 334 |
msgid "\\[bu]" |
| 335 |
msgstr "\\[bu]" |
| 336 |
|
| 337 |
#. In the 3.8 sources, see security/commoncap.c::cap_capable(): |
| 338 |
#. type: Plain text |
| 339 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 340 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 341 |
msgid "" |
| 342 |
"A process has a capability inside a user namespace if it is a member of that " |
| 343 |
"namespace and it has the capability in its effective capability set. A " |
| 344 |
"process can gain capabilities in its effective capability set in various " |
| 345 |
"ways. For example, it may execute a set-user-ID program or an executable " |
| 346 |
"with associated file capabilities. In addition, a process may gain " |
| 347 |
"capabilities via the effect of B<clone>(2), B<unshare>(2), or B<setns>(2), " |
| 348 |
"as already described." |
| 349 |
msgstr "" |
| 350 |
"Ein Prozess hat eine Capability innerhalb eines Benutzernamensraums, falls " |
| 351 |
"er ein Mitglied dieses Namensraums ist und er die Capability in seiner " |
| 352 |
"effektiven Capability-Menge hat. Ein Prozess kann Capabilitys in seiner " |
| 353 |
"effektiven Capability-Menge auf verschiedene Arten erlangen. Beispielsweise " |
| 354 |
"könnte er ein set-user-ID-Programm oder eine ausführbare Datei mit " |
| 355 |
"zugeordneten Datei-Capabilitys ausführen. Zusätzlich könnte ein Prozess " |
| 356 |
"Capabilitys mittels der bereits beschriebenen Auswirkungen von B<clone>(2), " |
| 357 |
"B<unshare>(2) oder B<setns>(2) erlangen." |
| 358 |
|
| 359 |
# FIXME Ist »removed descendant« korrekt übersetzt? |
| 360 |
#. type: Plain text |
| 361 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 362 |
#: opensuse-tumbleweed |
| 363 |
msgid "" |
| 364 |
"If a process has a capability in a user namespace, then it has that " |
| 365 |
"capability in all child (and further removed descendant) namespaces as well." |
| 366 |
msgstr "" |
| 367 |
"Falls ein Prozess eine Capability in einem Benutzernamensraum hat, dann hat " |
| 368 |
"es diese Capability in allen nachfolgenden (und weiter entfernten " |
| 369 |
"Nachfolge-) Namensräumen ebenfalls." |
| 370 |
|
| 371 |
# |
| 372 |
#. * The owner of the user namespace in the parent of the |
| 373 |
#. * user namespace has all caps. |
| 374 |
#. (and likewise associates the effective group ID of the creating process |
| 375 |
#. with the namespace). |
| 376 |
#. See kernel commit 520d9eabce18edfef76a60b7b839d54facafe1f9 for a fix |
| 377 |
#. on this point |
| 378 |
#. This includes the case where the process executes a set-user-ID |
| 379 |
#. program that confers the effective UID of the creator of the namespace. |
| 380 |
#. ============================================================ |
| 381 |
#. type: Plain text |
| 382 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 383 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 384 |
msgid "" |
| 385 |
"When a user namespace is created, the kernel records the effective user ID " |
| 386 |
"of the creating process as being the \"owner\" of the namespace. A process " |
| 387 |
"that resides in the parent of the user namespace and whose effective user ID " |
| 388 |
"matches the owner of the namespace has all capabilities in the namespace. " |
| 389 |
"By virtue of the previous rule, this means that the process has all " |
| 390 |
"capabilities in all further removed descendant user namespaces as well. The " |
| 391 |
"B<NS_GET_OWNER_UID> B<ioctl>(2) operation can be used to discover the user " |
| 392 |
"ID of the owner of the namespace; see B<ioctl_nsfs>(2)." |
| 393 |
msgstr "" |
| 394 |
"Wenn ein Benutzernamensraum erstellt wird, zeichnet der Kernel die effektive " |
| 395 |
"Benutzerkennung des erstellenden Prozesses als »Eigentümer« des Namensraums " |
| 396 |
"auf. Ein Prozess, der sich im Vorgänger des Benutzernamensraums befindet und " |
| 397 |
"dessen effektive Benutzerkennung auf die des Eigentümers des Namensraums " |
| 398 |
"passt, hat alle Capabilitys in diesem Namensraum. Dank der vorherigen Regel " |
| 399 |
"bedeutet dies, dass der Prozess auch über alle Capabilitys in allen weiteren " |
| 400 |
"entfernten nachfolgenden Benutzerräumen verfügt. Die Aktion " |
| 401 |
"B<NS_GET_OWNER_UID> B<ioctl>(2) kann zum Ermitteln der Benutzerkennung des " |
| 402 |
"Eigentümers des Namensraums verwandt werden; siehe B<ioctl_nfs>(2)." |
| 403 |
|
| 404 |
#. type: SS |
| 405 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 406 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 407 |
#, no-wrap |
| 408 |
msgid "Effect of capabilities within a user namespace" |
| 409 |
msgstr "Auswirkungen von Capabilitys innerhalb eines Benutzernamensraums" |
| 410 |
|
| 411 |
#. type: Plain text |
| 412 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 413 |
#: opensuse-tumbleweed |
| 414 |
msgid "" |
| 415 |
"Having a capability inside a user namespace permits a process to perform " |
| 416 |
"operations (that require privilege) only on resources governed by that " |
| 417 |
"namespace. In other words, having a capability in a user namespace permits " |
| 418 |
"a process to perform privileged operations on resources that are governed by " |
| 419 |
"(nonuser) namespaces owned by (associated with) the user namespace (see the " |
| 420 |
"next subsection)." |
| 421 |
msgstr "" |
| 422 |
"Hat ein Prozess eine Capability innerhalb eines Benutzernamensraums, dann " |
| 423 |
"darf er Aktionen nur auf Ressourcen anwenden (die Privilegien benötigen), " |
| 424 |
"die durch diesen Namensraum reguliert werden. Mit anderen Worten erlaubt " |
| 425 |
"eine Capability in einem Benutzernamensraum einem Prozess, privilegierte " |
| 426 |
"Aktionen auf Ressourcen durchzuführen, die durch (Nichtbenutzer-)Namensräume " |
| 427 |
"gelenkt werden, die den Benutzernamensräumen gehören bzw. diesen zugeordnet " |
| 428 |
"sind (siehe den nächsten Unterabschnitt)." |
| 429 |
|
| 430 |
#. type: Plain text |
| 431 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 432 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 433 |
msgid "" |
| 434 |
"On the other hand, there are many privileged operations that affect " |
| 435 |
"resources that are not associated with any namespace type, for example, " |
| 436 |
"changing the system (i.e., calendar) time (governed by B<CAP_SYS_TIME>), " |
| 437 |
"loading a kernel module (governed by B<CAP_SYS_MODULE>), and creating a " |
| 438 |
"device (governed by B<CAP_MKNOD>). Only a process with privileges in the " |
| 439 |
"I<initial> user namespace can perform such operations." |
| 440 |
msgstr "" |
| 441 |
"Auf der anderen Seite gibt es viele privilegierte Aktionen, die Ressourcen " |
| 442 |
"betreffen, die keinem Namensraumtyp zugeordnet sind, beispielsweise dem " |
| 443 |
"Ändern der Systemzeit (z.B. Kalender) (wird durch B<CAP_SYS_TIME> " |
| 444 |
"reguliert), dem Laden eines Kernelmoduls (wird durch B<CAP_SYS_MODULE> " |
| 445 |
"reguliert) und dem Erstellen eines Gerätes (wird durch B<CAP_MKNOD> " |
| 446 |
"reguliert). Nur Prozesse, die über Privilegien in dem I<ursprünglichen> " |
| 447 |
"Benutzernamensraum verfügen, können solche Aktionen durchführen." |
| 448 |
|
| 449 |
#. fs_flags = FS_USERNS_MOUNT in kernel sources |
| 450 |
#. type: Plain text |
| 451 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 452 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 453 |
msgid "" |
| 454 |
"Holding B<CAP_SYS_ADMIN> within the user namespace that owns a process's " |
| 455 |
"mount namespace allows that process to create bind mounts and mount the " |
| 456 |
"following types of filesystems:" |
| 457 |
msgstr "" |
| 458 |
"Wenn ein Prozess B<CAP_SYS_ADMIN> innerhalb eines Namensraums hält, der den " |
| 459 |
"Einhängenamensraum des Prozesses besitzt, dann kann er Bind-Einhängungen " |
| 460 |
"erstellen und die folgenden Arten an Dateisystemen einhängen:" |
| 461 |
|
| 462 |
#. type: Plain text |
| 463 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 464 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 465 |
msgid "I</proc> (since Linux 3.8)" |
| 466 |
msgstr "I</proc> (seit Linux 3.8)" |
| 467 |
|
| 468 |
#. type: Plain text |
| 469 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 470 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 471 |
msgid "I</sys> (since Linux 3.8)" |
| 472 |
msgstr "I</sys> (seit Linux 3.8)" |
| 473 |
|
| 474 |
#. type: Plain text |
| 475 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 476 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 477 |
msgid "I<devpts> (since Linux 3.9)" |
| 478 |
msgstr "I<devpts> (seit Linux 3.9)" |
| 479 |
|
| 480 |
#. type: Plain text |
| 481 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 482 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 483 |
msgid "B<tmpfs>(5) (since Linux 3.9)" |
| 484 |
msgstr "B<tmpfs>(5) (seit Linux 3.9)" |
| 485 |
|
| 486 |
#. type: Plain text |
| 487 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 488 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 489 |
msgid "I<ramfs> (since Linux 3.9)" |
| 490 |
msgstr "I<ramfs> (seit Linux 3.9)" |
| 491 |
|
| 492 |
#. type: Plain text |
| 493 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 494 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 495 |
msgid "I<mqueue> (since Linux 3.9)" |
| 496 |
msgstr "I<mqueue> (seit Linux 3.9)" |
| 497 |
|
| 498 |
#. commit b2197755b2633e164a439682fb05a9b5ea48f706 |
| 499 |
#. type: Plain text |
| 500 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 501 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 502 |
msgid "I<bpf> (since Linux 4.4)" |
| 503 |
msgstr "I<bpf> (seit Linux 4.4)" |
| 504 |
|
| 505 |
#. commit 92dbc9dedccb9759c7f9f2f0ae6242396376988f |
| 506 |
#. commit 4cb2c00c43b3fe88b32f29df4f76da1b92c33224 |
| 507 |
#. type: Plain text |
| 508 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 509 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 510 |
msgid "I<overlayfs> (since Linux 5.11)" |
| 511 |
msgstr "I<overlayfs> (seit Linux 5.11)" |
| 512 |
|
| 513 |
#. type: Plain text |
| 514 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 515 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 516 |
msgid "" |
| 517 |
"Holding B<CAP_SYS_ADMIN> within the user namespace that owns a process's " |
| 518 |
"cgroup namespace allows (since Linux 4.6) that process to mount the cgroup " |
| 519 |
"version 2 filesystem and cgroup version 1 named hierarchies (i.e., cgroup " |
| 520 |
"filesystems mounted with the I<\\[dq]none,name=\\[dq]> option)." |
| 521 |
msgstr "" |
| 522 |
"Wenn ein Prozess B<CAP_SYS_ADMIN> innerhalb eines Namensraums hält, der den " |
| 523 |
"Cgroup-Namensraum des Prozesses besitzt, dann kann er (seit Linux 4.6) das " |
| 524 |
"Cgroup-Version-2-Dateisystem und die benannten Cgroup-Version-1-Hierarchien " |
| 525 |
"(d.h. Cgroup-Dateisysteme, die mit der Option I<»none,name=«> eingehängt " |
| 526 |
"sind) einhängen." |
| 527 |
|
| 528 |
#. type: Plain text |
| 529 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 530 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 531 |
msgid "" |
| 532 |
"Holding B<CAP_SYS_ADMIN> within the user namespace that owns a process's PID " |
| 533 |
"namespace allows (since Linux 3.8) that process to mount I</proc> " |
| 534 |
"filesystems." |
| 535 |
msgstr "" |
| 536 |
"Wenn ein Prozess B<CAP_SYS_ADMIN> innerhalb eines Namensraums hält, der den " |
| 537 |
"PID-Namensraum des Prozesses besitzt, dann kann er (seit Linux 3.8) I</proc>-" |
| 538 |
"Dateisysteme einhängen." |
| 539 |
|
| 540 |
# |
| 541 |
#. ============================================================ |
| 542 |
#. type: Plain text |
| 543 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 544 |
#: opensuse-tumbleweed |
| 545 |
msgid "" |
| 546 |
"However, mounting block-based filesystems can be done only by a process that " |
| 547 |
"holds B<CAP_SYS_ADMIN> in the initial user namespace." |
| 548 |
msgstr "" |
| 549 |
"Das Einhängen blockbasierter Dateisysteme kann allerdings nur von Prozessen " |
| 550 |
"erfolgen, die B<CAP_SYS_ADMIN> in dem anfänglichen Benutzernamensraum " |
| 551 |
"enthalten." |
| 552 |
|
| 553 |
#. type: SS |
| 554 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 555 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 556 |
#, no-wrap |
| 557 |
msgid "Interaction of user namespaces and other types of namespaces" |
| 558 |
msgstr "Wechselwirkung von Benutzernamensräumen und anderen Arten von Namensräumen" |
| 559 |
|
| 560 |
#. type: Plain text |
| 561 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 562 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 563 |
msgid "" |
| 564 |
"Since Linux 3.8, unprivileged processes can create user namespaces, and the " |
| 565 |
"other types of namespaces can be created with just the B<CAP_SYS_ADMIN> " |
| 566 |
"capability in the caller's user namespace." |
| 567 |
msgstr "" |
| 568 |
"Seit Linux 3.8 können nicht privilegierte Prozesse Benutzernamensräume " |
| 569 |
"erstellen und andere Arten von Namensräumen können nur mit der Capability " |
| 570 |
"B<CAP_SYS_ADMIN> im Benutzernamensraum des Aufrufenden erstellt werden." |
| 571 |
|
| 572 |
#. type: Plain text |
| 573 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 574 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 575 |
msgid "" |
| 576 |
"When a nonuser namespace is created, it is owned by the user namespace in " |
| 577 |
"which the creating process was a member at the time of the creation of the " |
| 578 |
"namespace. Privileged operations on resources governed by the nonuser " |
| 579 |
"namespace require that the process has the necessary capabilities in the " |
| 580 |
"user namespace that owns the nonuser namespace." |
| 581 |
msgstr "" |
| 582 |
"Wenn ein Nichtbenutzer-Namensraum erstellt wird, gehört er dem " |
| 583 |
"Benutzernamensraum, in dem der erstellende Prozess zum Erstellungszeitraum " |
| 584 |
"des Namensraums Mitglied war. Privilegierte Aktionen auf Ressourcen, die von " |
| 585 |
"einem Nichtbenutzer-Namensraum reguliert werden, benötigen, dass der Prozess " |
| 586 |
"über die notwendigen Capabilitys in dem Benutzernamensraum verfügt, der den " |
| 587 |
"Nichtbenutzer-Namensraum besitzt." |
| 588 |
|
| 589 |
#. type: Plain text |
| 590 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 591 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 592 |
msgid "" |
| 593 |
"If B<CLONE_NEWUSER> is specified along with other B<CLONE_NEW*> flags in a " |
| 594 |
"single B<clone>(2) or B<unshare>(2) call, the user namespace is guaranteed " |
| 595 |
"to be created first, giving the child (B<clone>(2)) or caller " |
| 596 |
"(B<unshare>(2)) privileges over the remaining namespaces created by the " |
| 597 |
"call. Thus, it is possible for an unprivileged caller to specify this " |
| 598 |
"combination of flags." |
| 599 |
msgstr "" |
| 600 |
"Falls B<CLONE_NEWUSER> zusammen mit anderen Schaltern B<CLONE_NEW*> in einem " |
| 601 |
"einzelnen Aufruf von B<clone>(2) oder B<unshare>(2) angegeben wird, wird " |
| 602 |
"garantiert, dass der Namensraum zuerst erstellt wird, und damit dem " |
| 603 |
"Kindprozess (B<clone>(2)) oder dem aufrufenden Prozess (B<unshare>(2)) " |
| 604 |
"Privilegien über den durch den Aufruf erstellten Namensraum gegeben wird. " |
| 605 |
"Daher ist es für einen nicht privilegierten Aufrufenden möglich, diese " |
| 606 |
"Schalterkombination festzulegen." |
| 607 |
|
| 608 |
#. type: Plain text |
| 609 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 610 |
#: opensuse-tumbleweed |
| 611 |
msgid "" |
| 612 |
"When a new namespace (other than a user namespace) is created via " |
| 613 |
"B<clone>(2) or B<unshare>(2), the kernel records the user namespace of the " |
| 614 |
"creating process as the owner of the new namespace. (This association can't " |
| 615 |
"be changed.) When a process in the new namespace subsequently performs " |
| 616 |
"privileged operations that operate on global resources isolated by the " |
| 617 |
"namespace, the permission checks are performed according to the process's " |
| 618 |
"capabilities in the user namespace that the kernel associated with the new " |
| 619 |
"namespace. For example, suppose that a process attempts to change the " |
| 620 |
"hostname (B<sethostname>(2)), a resource governed by the UTS namespace. In " |
| 621 |
"this case, the kernel will determine which user namespace owns the process's " |
| 622 |
"UTS namespace, and check whether the process has the required capability " |
| 623 |
"(B<CAP_SYS_ADMIN>) in that user namespace." |
| 624 |
msgstr "" |
| 625 |
"Wenn ein neuer Namensraum (der kein Benutzernamensraum ist) mittels " |
| 626 |
"B<clone>(2) oder B<unshare>(2) erstellt wird, zeichnet der Kernel den " |
| 627 |
"Benutzernamensraum des erstellenden Prozesses als Eigentümer des neuen " |
| 628 |
"Namensraums auf. (Diese Zuordnung kann nicht geändert werden). Wenn " |
| 629 |
"nachfolgend ein Prozess in dem neuen Namensraum eine privilegierte Aktion " |
| 630 |
"durchführt, die auf globalen Ressourcen agiert, die durch den Namensraum " |
| 631 |
"isoliert werden, dann erfolgen die Berechtigungsprüfungen gemäß der " |
| 632 |
"Capabilitys des Prozesses in dem Benutzernamensraum, den der Kernel dem " |
| 633 |
"neuen Namensraum zuordnet. Wird beispielsweise angenommen, dass ein Prozess " |
| 634 |
"versucht, den Rechnernamen, eine durch UTS-Namensräume regulierte Ressource, " |
| 635 |
"zu ändern (B<sethostname>(2)), dann wird der Kernel bestimmen, welchem " |
| 636 |
"Benutzernamensraum der UTS-Namensraum des Prozesses gehört und prüfen, ob " |
| 637 |
"der Prozess über die benötigte Capability (B<CAP_SYS_ADMIN>) in diesem " |
| 638 |
"Benutzernamensraum verfügt." |
| 639 |
|
| 640 |
# |
| 641 |
#. ============================================================ |
| 642 |
#. type: Plain text |
| 643 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 644 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 645 |
msgid "" |
| 646 |
"The B<NS_GET_USERNS> B<ioctl>(2) operation can be used to discover the user " |
| 647 |
"namespace that owns a nonuser namespace; see B<ioctl_nsfs>(2)." |
| 648 |
msgstr "" |
| 649 |
"Die Aktion B<NS_GET_USERNS> B<ioctl>(2) kann zum Erkennen des " |
| 650 |
"Benutzernamensraums verwandt werden, dem der Nichtbenutzer-Namensraum " |
| 651 |
"gehört; siehe B<ioctl_nfs>(2)." |
| 652 |
|
| 653 |
#. type: SS |
| 654 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 655 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 656 |
#, no-wrap |
| 657 |
msgid "User and group ID mappings: uid_map and gid_map" |
| 658 |
msgstr "Benutzer- und Gruppenkennungabbildungen: uid_map und gid_map" |
| 659 |
|
| 660 |
#. commit 22d917d80e842829d0ca0a561967d728eb1d6303 |
| 661 |
#. type: Plain text |
| 662 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 663 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 664 |
msgid "" |
| 665 |
"When a user namespace is created, it starts out without a mapping of user " |
| 666 |
"IDs (group IDs) to the parent user namespace. The I</proc/>pidI</uid_map> " |
| 667 |
"and I</proc/>pidI</gid_map> files (available since Linux 3.5) expose the " |
| 668 |
"mappings for user and group IDs inside the user namespace for the process " |
| 669 |
"I<pid>. These files can be read to view the mappings in a user namespace " |
| 670 |
"and written to (once) to define the mappings." |
| 671 |
msgstr "" |
| 672 |
"Wenn ein Benutzernamensraum erstellt wird, beginnt er mit einer Abbildung " |
| 673 |
"der Benutzerkennungen (Gruppenkennungen) auf die des Vorgängernamensraumes. " |
| 674 |
"Die Dateien I</proc/>PIDI</uid_map> und I</proc/>PIDI</gid_map> (verfügbar " |
| 675 |
"seit Linux 3.5) legen diese Abbildungen für die Benutzer- und " |
| 676 |
"Gruppenkennungen innerhalb des Benutzernamensraumes für den Prozess I<PID> " |
| 677 |
"offen. Diese Dateien können ausgelesen werden, um die Abbildungen innerhalb " |
| 678 |
"eines Benutzernamensraums zu betrachten und (einmal) beschrieben zu werden, " |
| 679 |
"um diese Abbildungen zu definieren." |
| 680 |
|
| 681 |
#. type: Plain text |
| 682 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 683 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 684 |
msgid "" |
| 685 |
"The description in the following paragraphs explains the details for " |
| 686 |
"I<uid_map>; I<gid_map> is exactly the same, but each instance of \"user ID\" " |
| 687 |
"is replaced by \"group ID\"." |
| 688 |
msgstr "" |
| 689 |
"Die Beschreibung in den folgenden Absätzen erklärt die Details für " |
| 690 |
"I<uid_map>; I<gid_map> ist vollständig identisch, sofern jedes Vorkommen von " |
| 691 |
"»Benutzerkennung« durch »Gruppenkennung« ersetzt wird." |
| 692 |
|
| 693 |
#. type: Plain text |
| 694 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 695 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 696 |
msgid "" |
| 697 |
"The I<uid_map> file exposes the mapping of user IDs from the user namespace " |
| 698 |
"of the process I<pid> to the user namespace of the process that opened " |
| 699 |
"I<uid_map> (but see a qualification to this point below). In other words, " |
| 700 |
"processes that are in different user namespaces will potentially see " |
| 701 |
"different values when reading from a particular I<uid_map> file, depending " |
| 702 |
"on the user ID mappings for the user namespaces of the reading processes." |
| 703 |
msgstr "" |
| 704 |
"Die Datei I<uid_map> legt die Abbildung der Benutzerkennung von dem " |
| 705 |
"Benutzernamensraum des Prozesses I<PID> in den Benutzernamensraum des " |
| 706 |
"Prozesses offen, der I<uid_map> öffnete (siehe aber auch die nachfolgende " |
| 707 |
"Qualifizierung dieses Punktes). Mit anderen Worten, Prozesse, die sich in " |
| 708 |
"verschiedenen Benutzernamensräumen befinden, werden möglicherweise andere " |
| 709 |
"Werte sehen, wenn sie aus einer bestimmten Datei I<uid_map> lesen, abhängig " |
| 710 |
"von der Benutzerkennungsabbildung für den Benutzernamensraum des lesenden " |
| 711 |
"Prozesses." |
| 712 |
|
| 713 |
#. type: Plain text |
| 714 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 715 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 716 |
msgid "" |
| 717 |
"Each line in the I<uid_map> file specifies a 1-to-1 mapping of a range of " |
| 718 |
"contiguous user IDs between two user namespaces. (When a user namespace is " |
| 719 |
"first created, this file is empty.) The specification in each line takes " |
| 720 |
"the form of three numbers delimited by white space. The first two numbers " |
| 721 |
"specify the starting user ID in each of the two user namespaces. The third " |
| 722 |
"number specifies the size of the mapped range. In detail, the fields are " |
| 723 |
"interpreted as follows:" |
| 724 |
msgstr "" |
| 725 |
"Jede Zeile der Datei I<uid_map> legt eine 1-zu-1-Abbildung des Bereichs " |
| 726 |
"fortlaufender Benutzerkennungen zwischen zwei Benutzernamensräumen fest. " |
| 727 |
"(Wenn ein Benutzernamensraum erstmalig erstellt wird, ist diese Datei leer.) " |
| 728 |
"Die Festlegung in jeder Zeile hat die Form von drei durch Leerraum " |
| 729 |
"getrennten Zahlen. Die ersten zwei Zahlen geben die am Anfang befindliche " |
| 730 |
"Benutzerkennung in jedem der zwei Benutzernamensräume an. Die dritte Zahl " |
| 731 |
"gibt die Größe des abgebildeten Bereichs an. Im Detail werden die Felder wie " |
| 732 |
"folgt interpretiert:" |
| 733 |
|
| 734 |
#. type: IP |
| 735 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 736 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 737 |
#, no-wrap |
| 738 |
msgid "(1)" |
| 739 |
msgstr "(1)" |
| 740 |
|
| 741 |
#. type: Plain text |
| 742 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 743 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 744 |
msgid "" |
| 745 |
"The start of the range of user IDs in the user namespace of the process " |
| 746 |
"I<pid>." |
| 747 |
msgstr "" |
| 748 |
"Der Anfang des Bereichs von Benutzerkennungen in dem Benutzernamensraum des " |
| 749 |
"Prozesses I<PID>." |
| 750 |
|
| 751 |
#. type: IP |
| 752 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 753 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 754 |
#, no-wrap |
| 755 |
msgid "(2)" |
| 756 |
msgstr "(2)" |
| 757 |
|
| 758 |
#. type: Plain text |
| 759 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 760 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 761 |
msgid "" |
| 762 |
"The start of the range of user IDs to which the user IDs specified by field " |
| 763 |
"one map. How field two is interpreted depends on whether the process that " |
| 764 |
"opened I<uid_map> and the process I<pid> are in the same user namespace, as " |
| 765 |
"follows:" |
| 766 |
msgstr "" |
| 767 |
"Der Anfang des Bereichs von Benutzerkennungen, auf die die Benutzerkennungen " |
| 768 |
"aus Feld eins abgebildet werden. Wie Feld zwei interpretiert wird, hängt " |
| 769 |
"davon ab, ob der Prozess, der I<uid_map> öffnete und der Prozess I<PID> sich " |
| 770 |
"in dem gleichen Benutzernamensraum befinden, wie folgt:" |
| 771 |
|
| 772 |
#. type: IP |
| 773 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 774 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 775 |
#, no-wrap |
| 776 |
msgid "(a)" |
| 777 |
msgstr "(a)" |
| 778 |
|
| 779 |
#. type: Plain text |
| 780 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 781 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 782 |
msgid "" |
| 783 |
"If the two processes are in different user namespaces: field two is the " |
| 784 |
"start of a range of user IDs in the user namespace of the process that " |
| 785 |
"opened I<uid_map>." |
| 786 |
msgstr "" |
| 787 |
"Falls sich die zwei Prozesse in verschiedenen Benutzernamensräumen befinden: " |
| 788 |
"Feld zwei ist der Anfang des Bereichs von Benutzerkennungen in dem " |
| 789 |
"Benutzernamensraum des Prozesses, der I<uid_map> öffnete." |
| 790 |
|
| 791 |
#. type: IP |
| 792 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 793 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 794 |
#, no-wrap |
| 795 |
msgid "(b)" |
| 796 |
msgstr "(b)" |
| 797 |
|
| 798 |
#. type: Plain text |
| 799 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 800 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 801 |
msgid "" |
| 802 |
"If the two processes are in the same user namespace: field two is the start " |
| 803 |
"of the range of user IDs in the parent user namespace of the process " |
| 804 |
"I<pid>. This case enables the opener of I<uid_map> (the common case here is " |
| 805 |
"opening I</proc/self/uid_map>) to see the mapping of user IDs into the user " |
| 806 |
"namespace of the process that created this user namespace." |
| 807 |
msgstr "" |
| 808 |
"Falls die zwei Prozesse im gleichen Benutzernamensraum sind: Feld zwei ist " |
| 809 |
"der Anfang des Bereichs von Benutzerkennungen in dem " |
| 810 |
"Vorgängerbenutzernamensraum des Prozesses I<PID>. Dieser Fall ermöglicht es " |
| 811 |
"dem Öffnenden von I<uid_map> (der typische Fall hier ist das Öffnen von I</" |
| 812 |
"proc/self/uid_map>) die Abbildung der Benutzerkennungen in den " |
| 813 |
"Benutzernamensraum des Prozesses, der diesen Benutzernamensraum erstellte, " |
| 814 |
"zu sehen." |
| 815 |
|
| 816 |
#. type: IP |
| 817 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 818 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 819 |
#, no-wrap |
| 820 |
msgid "(3)" |
| 821 |
msgstr "(3)" |
| 822 |
|
| 823 |
#. type: Plain text |
| 824 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 825 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 826 |
msgid "" |
| 827 |
"The size of the range of user IDs that is mapped between the two user " |
| 828 |
"namespaces." |
| 829 |
msgstr "" |
| 830 |
"Die Größe des Bereichs von Benutzerkennungen, die zwischen den zwei " |
| 831 |
"Benutzernamensräumen abgebildet wird." |
| 832 |
|
| 833 |
#. type: Plain text |
| 834 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 835 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 836 |
msgid "" |
| 837 |
"System calls that return user IDs (group IDs)\\[em]for example, " |
| 838 |
"B<getuid>(2), B<getgid>(2), and the credential fields in the structure " |
| 839 |
"returned by B<stat>(2)\\[em]return the user ID (group ID) mapped into the " |
| 840 |
"caller's user namespace." |
| 841 |
msgstr "" |
| 842 |
"Systemaufrufe, die Benutzerkennungen (Gruppenkennungen) zurückliefern\\" |
| 843 |
"[en]beispielsweise B<getuid>(2), B<getgid>(2) und die " |
| 844 |
"Berechtigungsdatenfelder in der durch B<stat>(2) zurückgelieferten Struktur\\" |
| 845 |
"[en]liefern die Benutzerkennung (Gruppenkennung) abgebildet auf den " |
| 846 |
"Benutzernamensraum des Aufrufenden zurück." |
| 847 |
|
| 848 |
#. type: Plain text |
| 849 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 850 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 851 |
msgid "" |
| 852 |
"When a process accesses a file, its user and group IDs are mapped into the " |
| 853 |
"initial user namespace for the purpose of permission checking and assigning " |
| 854 |
"IDs when creating a file. When a process retrieves file user and group IDs " |
| 855 |
"via B<stat>(2), the IDs are mapped in the opposite direction, to produce " |
| 856 |
"values relative to the process user and group ID mappings." |
| 857 |
msgstr "" |
| 858 |
"Wenn ein Prozess auf eine Datei zugreift, werden seine Benutzer- und " |
| 859 |
"Gruppenkennungen zum Zwecke der Zugriffsprüfung und der Zuweisungen von " |
| 860 |
"Kennungen beim Erstellen von Dateien auf die des anfänglichen " |
| 861 |
"Benutzernamensraumens abgebildet. Wenn ein Prozess die Dateibenutzer- und " |
| 862 |
"-gruppenkennungen über B<stat>(2) ermittelt, werden die Kennungen in die " |
| 863 |
"andere Richtung abgebildet, um Werte relativ zu den Prozessbenutzer- und " |
| 864 |
"-gruppenkennungsabildungen zu erstellen." |
| 865 |
|
| 866 |
#. type: Plain text |
| 867 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 868 |
#: opensuse-tumbleweed |
| 869 |
msgid "" |
| 870 |
"The initial user namespace has no parent namespace, but, for consistency, " |
| 871 |
"the kernel provides dummy user and group ID mapping files for this " |
| 872 |
"namespace. Looking at the I<uid_map> file (I<gid_map> is the same) from a " |
| 873 |
"shell in the initial namespace shows:" |
| 874 |
msgstr "" |
| 875 |
"Der anfängliche Benutzernamensraum hat keinen Vorgängernamensraum. Aus " |
| 876 |
"Konsistenzgründen stellt der Kernel Pseudo-Benutzer- und " |
| 877 |
"-Gruppenkennungsabbildungsdateien für diesen Namensraum bereit. Wird vom " |
| 878 |
"anfänglichen Namensraum aus auf die Datei I<uid_map> (I<gid_map> ist " |
| 879 |
"identisch) geschaut, ergibt sich:" |
| 880 |
|
| 881 |
#. type: Plain text |
| 882 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 883 |
#: opensuse-tumbleweed |
| 884 |
#, no-wrap |
| 885 |
msgid "" |
| 886 |
"$B< cat /proc/$$/uid_map>;\n" |
| 887 |
" 0 0 4294967295\n" |
| 888 |
msgstr "" |
| 889 |
"$B< cat /proc/$$/uid_map>;\n" |
| 890 |
" 0 0 4294967295\n" |
| 891 |
|
| 892 |
# |
| 893 |
#. ============================================================ |
| 894 |
#. type: Plain text |
| 895 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 896 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 897 |
msgid "" |
| 898 |
"This mapping tells us that the range starting at user ID 0 in this namespace " |
| 899 |
"maps to a range starting at 0 in the (nonexistent) parent namespace, and the " |
| 900 |
"size of the range is the largest 32-bit unsigned integer. This leaves " |
| 901 |
"4294967295 (the 32-bit signed -1 value) unmapped. This is deliberate: " |
| 902 |
"I<(uid_t)\\ -1> is used in several interfaces (e.g., B<setreuid>(2)) as a " |
| 903 |
"way to specify \"no user ID\". Leaving I<(uid_t)\\ -1> unmapped and " |
| 904 |
"unusable guarantees that there will be no confusion when using these " |
| 905 |
"interfaces." |
| 906 |
msgstr "" |
| 907 |
"Diese Abbildung teilt uns mit, dass der Bereich bei der Benutzerkennung 0 in " |
| 908 |
"diesem Namensraum auf den Bereich beginnend bei 0 in dem (nicht " |
| 909 |
"existierenden) Vorgängernamensraum abgebildet ist und die Größe des Bereichs " |
| 910 |
"die größte vorzeichenlose 32-bit-Ganzzahl ist. Dies lässt 4294967295 (der " |
| 911 |
"vorzeichenbehaftete 32-bit-Wert) nicht abgebildet. Dies ist absichtlich: " |
| 912 |
"I<(uid_t)\\ -1> wird von einer Reihe von Schnittstellen (z.B. " |
| 913 |
"B<setreuid>(2)) dazu verwandt, »keine Benutzerkennung« festzulegen. Da " |
| 914 |
"I<(uid_t)\\ -1> nicht abgebildet und unbenutzbar ist, wird sichergestellt, " |
| 915 |
"dass es keine Verwirrung bei der Verwendung dieser Schnittstellen gibt." |
| 916 |
|
| 917 |
#. type: SS |
| 918 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 919 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 920 |
#, no-wrap |
| 921 |
msgid "Defining user and group ID mappings: writing to uid_map and gid_map" |
| 922 |
msgstr "Definieren von Benutzer- und Gruppenkennungsabbildungen; Schreiben in uid_map und gid_map" |
| 923 |
|
| 924 |
#. type: Plain text |
| 925 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 926 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 927 |
msgid "" |
| 928 |
"After the creation of a new user namespace, the I<uid_map> file of I<one> of " |
| 929 |
"the processes in the namespace may be written to I<once> to define the " |
| 930 |
"mapping of user IDs in the new user namespace. An attempt to write more " |
| 931 |
"than once to a I<uid_map> file in a user namespace fails with the error " |
| 932 |
"B<EPERM>. Similar rules apply for I<gid_map> files." |
| 933 |
msgstr "" |
| 934 |
"Nach der Erstellung eines neuen Benutzernamensraumes kann die Datei " |
| 935 |
"I<uid_map> von I<einem> der Prozesse in dem Namensraum I<einmalig> " |
| 936 |
"geschrieben werden, um die Abbildung der Benutzerkennungen in dem neuen " |
| 937 |
"Benutzernamensraum zu definieren. Jeder Versuch, mehr als einmal in eine " |
| 938 |
"Datei I<uid_map> in einem Benutzernamensraum zu schreiben, schlägt mit dem " |
| 939 |
"Fehler B<EPERM> fehl. Ähnliche Regeln gelten für Dateien I<gid_map>." |
| 940 |
|
| 941 |
#. type: Plain text |
| 942 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 943 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 944 |
msgid "" |
| 945 |
"The lines written to I<uid_map> (I<gid_map>) must conform to the following " |
| 946 |
"validity rules:" |
| 947 |
msgstr "" |
| 948 |
"Die in I<uid_map> (I<gid_map>) geschriebenen Zeilen müssen die folgenden " |
| 949 |
"Gültigkeitsregeln erfüllen:" |
| 950 |
|
| 951 |
#. type: Plain text |
| 952 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 953 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 954 |
msgid "" |
| 955 |
"The three fields must be valid numbers, and the last field must be greater " |
| 956 |
"than 0." |
| 957 |
msgstr "" |
| 958 |
"Die drei Felder müssen gültige Zahlen sein und das letzte Feld muss größer " |
| 959 |
"als 0 sein." |
| 960 |
|
| 961 |
#. type: Plain text |
| 962 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 963 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 964 |
msgid "Lines are terminated by newline characters." |
| 965 |
msgstr "Zeilen werden durch einen Zeilenumbruch beendet." |
| 966 |
|
| 967 |
#. 5*12-byte records could fit in a 64B cache line |
| 968 |
#. commit 6397fac4915ab3002dc15aae751455da1a852f25 |
| 969 |
#. type: Plain text |
| 970 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 971 |
#: opensuse-tumbleweed |
| 972 |
msgid "" |
| 973 |
"There is a limit on the number of lines in the file. Up to Linux 4.14, this " |
| 974 |
"limit was (arbitrarily) set at 5 lines. Since Linux 4.16, the limit is 340 " |
| 975 |
"lines. In addition, the number of bytes written to the file must be less " |
| 976 |
"than the system page size, and the write must be performed at the start of " |
| 977 |
"the file (i.e., B<lseek>(2) and B<pwrite>(2) can't be used to write to " |
| 978 |
"nonzero offsets in the file)." |
| 979 |
msgstr "" |
| 980 |
"Es gibt eine Beschränkung bezüglich der Anzahl der Zeilen in der Datei. Bis " |
| 981 |
"Linux 4.14 war diese Beschränkung (willkürlich) auf 5 Zeilen gesetzt. Seit " |
| 982 |
"Linux 4.16 ist diese Beschränkung 340 Zeilen. Zusätzlich muss die Anzahl an " |
| 983 |
"in diese Datei geschriebenen Bytes kleiner als die Seitengröße des Systems " |
| 984 |
"sein und das Schreiben muss am Anfang der Datei beginnen (d.h. B<lseek>(2) " |
| 985 |
"und B<pwrite>(2) können nicht zum Schreiben an einen von Null verschiedenen " |
| 986 |
"Versatz in der Datei verwandt werden)." |
| 987 |
|
| 988 |
#. commit 0bd14b4fd72afd5df41e9fd59f356740f22fceba |
| 989 |
#. type: Plain text |
| 990 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 991 |
#: opensuse-tumbleweed |
| 992 |
msgid "" |
| 993 |
"The range of user IDs (group IDs) specified in each line cannot overlap " |
| 994 |
"with the ranges in any other lines. In the initial implementation (Linux " |
| 995 |
"3.8), this requirement was satisfied by a simplistic implementation that " |
| 996 |
"imposed the further requirement that the values in both field 1 and field 2 " |
| 997 |
"of successive lines must be in ascending numerical order, which prevented " |
| 998 |
"some otherwise valid maps from being created. Since Linux 3.9, this " |
| 999 |
"limitation has been removed, allowing any valid set of nonoverlapping maps." |
| 1000 |
msgstr "" |
| 1001 |
"Die Bereiche der Benutzerkennungen (Gruppenkennungen), die in den einzelnen " |
| 1002 |
"Zeilen angegeben sind, dürfen sich nicht gegenseitig überlappen. In der " |
| 1003 |
"anfänglichen Implementierung (Linux 3.8) wurde diese Anforderung durch eine " |
| 1004 |
"simplistische Implementierung erfüllt, die weitere Einschränkungen " |
| 1005 |
"auferlegte, dass die Werte sowohl in Feld 1 als auch Feld 2 von " |
| 1006 |
"aufeinanderfolgenden Zeilen in aufsteigender numerischer Reihenfolge sein " |
| 1007 |
"mussten, womit andernfalls gültige Abbildungen nicht erstellt werden " |
| 1008 |
"konnten. Seit Linux 3.9 ist diese Beschränkung entfernt und jeder gültige " |
| 1009 |
"Satz an nichtüberlappenden Abbildungen ist erlaubt." |
| 1010 |
|
| 1011 |
#. type: Plain text |
| 1012 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1013 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1014 |
msgid "At least one line must be written to the file." |
| 1015 |
msgstr "Mindestens eine Zeile muss in die Datei geschrieben werden." |
| 1016 |
|
| 1017 |
#. type: Plain text |
| 1018 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1019 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1020 |
msgid "Writes that violate the above rules fail with the error B<EINVAL>." |
| 1021 |
msgstr "" |
| 1022 |
"Schreibvorgänge, die die obigen Regeln verletzen, schlagen mit dem Fehler " |
| 1023 |
"B<EINVAL> fehl." |
| 1024 |
|
| 1025 |
#. type: Plain text |
| 1026 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1027 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1028 |
msgid "" |
| 1029 |
"In order for a process to write to the I</proc/>pidI</uid_map> (I</proc/" |
| 1030 |
">pidI</gid_map>) file, all of the following permission requirements must be " |
| 1031 |
"met:" |
| 1032 |
msgstr "" |
| 1033 |
"Damit ein Prozess in die Datei I</proc/>PIDI</uid_map> (I</proc/>PIDI</" |
| 1034 |
"gid_map>) schreiben kann, müssen alle der folgenden " |
| 1035 |
"Berechtigungsanforderungen erfüllt sein:" |
| 1036 |
|
| 1037 |
#. type: Plain text |
| 1038 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1039 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1040 |
msgid "" |
| 1041 |
"The writing process must have the B<CAP_SETUID> (B<CAP_SETGID>) capability " |
| 1042 |
"in the user namespace of the process I<pid>." |
| 1043 |
msgstr "" |
| 1044 |
"Der schreibende Prozess muss über die Capability B<CAP_SETUID> " |
| 1045 |
"(B<CAP_SETGID>) des Benutzernamensraums des Prozeses I<PID> verfügen." |
| 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 |
"The writing process must either be in the user namespace of the process " |
| 1052 |
"I<pid> or be in the parent user namespace of the process I<pid>." |
| 1053 |
msgstr "" |
| 1054 |
"Der schreibende Prozess muss entweder in dem Benutzernamensraum des " |
| 1055 |
"Prozesses I<PID> oder in dem Vorgängernamensraum des Prozesses I<PID> sein." |
| 1056 |
|
| 1057 |
#. type: Plain text |
| 1058 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1059 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1060 |
msgid "" |
| 1061 |
"The mapped user IDs (group IDs) must in turn have a mapping in the parent " |
| 1062 |
"user namespace." |
| 1063 |
msgstr "" |
| 1064 |
"Die abgebildeten Benutzerkennungen (Gruppenkennungen) müssen wiederum eine " |
| 1065 |
"Abbildung in dem Vorgänger-Benutzernamensraum haben." |
| 1066 |
|
| 1067 |
#. type: Plain text |
| 1068 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1069 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1070 |
msgid "" |
| 1071 |
"If updating I</proc/>pidI</uid_map> to create a mapping that maps UID 0 in " |
| 1072 |
"the parent namespace, then one of the following must be true:" |
| 1073 |
msgstr "" |
| 1074 |
"Falls die Aktualisierung von I</proc/>PIDI</uid_map> eine Abbildung " |
| 1075 |
"erstellt, die die UID 0 in dem Vorgängernamensraum abbildet, dann muss eine " |
| 1076 |
"der folgenden Bedingungen wahr sein:" |
| 1077 |
|
| 1078 |
#. type: Plain text |
| 1079 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1080 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1081 |
msgid "" |
| 1082 |
"if writing process is in the parent user namespace, then it must have the " |
| 1083 |
"B<CAP_SETFCAP> capability in that user namespace; or" |
| 1084 |
msgstr "" |
| 1085 |
"Falls der schreibende Prozess im Vorgänger-Benutzernamensraum liegt, dann " |
| 1086 |
"muss er über die Capability B<CAP_SETFCAP> in diesem Benutzernamensraum " |
| 1087 |
"verfügen; oder" |
| 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 the writing process is in the child user namespace, then the process that " |
| 1094 |
"created the user namespace must have had the B<CAP_SETFCAP> capability when " |
| 1095 |
"the namespace was created." |
| 1096 |
msgstr "" |
| 1097 |
"falls der schreibende Prozess in dem nachfolgenden Benutzernamensraum liegt, " |
| 1098 |
"dann muss der Prozess, der den Benutzernamensraum erstellte, über die " |
| 1099 |
"Capability B<CAP_SETFCAP> verfügen, als der Benutzernamensraum erstellt " |
| 1100 |
"wurde." |
| 1101 |
|
| 1102 |
#. commit db2e718a47984b9d71ed890eb2ea36ecf150de18 |
| 1103 |
#. type: Plain text |
| 1104 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1105 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1106 |
msgid "" |
| 1107 |
"This rule has been in place since Linux 5.12. It eliminates an earlier " |
| 1108 |
"security bug whereby a UID 0 process that lacks the B<CAP_SETFCAP> " |
| 1109 |
"capability, which is needed to create a binary with namespaced file " |
| 1110 |
"capabilities (as described in B<capabilities>(7)), could nevertheless create " |
| 1111 |
"such a binary, by the following steps:" |
| 1112 |
msgstr "" |
| 1113 |
"Diese Regel gibt es seit Linux 5.12. Sie beseitigt einen älteren " |
| 1114 |
"Sicherheitsfehler, durch den ein UID-0-Prozess ohne die Capability " |
| 1115 |
"B<CAP_SETFCAP> (die zum Erstellen eines Programms mit Datei-Capabilitys im " |
| 1116 |
"Namensraum benötigt wird, wie das in B<capabilities>(7) beschrieben ist), " |
| 1117 |
"trotzdem ein solches Programm erstellen konnte, indem es Folgendes " |
| 1118 |
"durchführte:" |
| 1119 |
|
| 1120 |
#. type: Plain text |
| 1121 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1122 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1123 |
msgid "" |
| 1124 |
"Create a new user namespace with the identity mapping (i.e., UID 0 in the " |
| 1125 |
"new user namespace maps to UID 0 in the parent namespace), so that UID 0 in " |
| 1126 |
"both namespaces is equivalent to the same root user ID." |
| 1127 |
msgstr "" |
| 1128 |
"Erstellung eines neuen Benutzernamensraums mit der Identitätsabbildung (d.h. " |
| 1129 |
"UID 0 in dem neuen Benutzernamensraum wird auf UID 0 im Vorgängernamensraum " |
| 1130 |
"abgebildet), so dass UID 0 in beiden Namensräumen äquivalent zu der gleichen " |
| 1131 |
"Root-Benutzerkennung ist." |
| 1132 |
|
| 1133 |
#. type: Plain text |
| 1134 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1135 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1136 |
msgid "" |
| 1137 |
"Since the child process has the B<CAP_SETFCAP> capability, it could create a " |
| 1138 |
"binary with namespaced file capabilities that would then be effective in the " |
| 1139 |
"parent user namespace (because the root user IDs are the same in the two " |
| 1140 |
"namespaces)." |
| 1141 |
msgstr "" |
| 1142 |
"Da der Nachfolgerprozess über die Capability B<CAP_SETFCAP> verfügt, könnte " |
| 1143 |
"er ein Programm mit den Datei-Capabilitys im Namensraum erstellen, die auch " |
| 1144 |
"im Vorgängernamensraum wirksam wären (da die Root-Benutzerkennungen in " |
| 1145 |
"beiden Namensräumen identisch sind)." |
| 1146 |
|
| 1147 |
#. type: Plain text |
| 1148 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1149 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1150 |
msgid "One of the following two cases applies:" |
| 1151 |
msgstr "Einer der folgenden zwei Fälle trifft zu:" |
| 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 |
"I<Either> the writing process has the B<CAP_SETUID> (B<CAP_SETGID>) " |
| 1158 |
"capability in the I<parent> user namespace." |
| 1159 |
msgstr "" |
| 1160 |
"I<Entweder> verfügt der schreibende Prozess über die Capability " |
| 1161 |
"B<CAP_SETUID> (B<CAP_SETGID>) in dem I<Vorgänger>namensraum." |
| 1162 |
|
| 1163 |
#. type: Plain text |
| 1164 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1165 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1166 |
msgid "" |
| 1167 |
"No further restrictions apply: the process can make mappings to arbitrary " |
| 1168 |
"user IDs (group IDs) in the parent user namespace." |
| 1169 |
msgstr "" |
| 1170 |
"Es gelten keine weiteren Einschränkungen; der Prozess kann Abbildungen auf " |
| 1171 |
"beliebige Benutzerkennungen (Gruppenkennungen) im Vorgängernamensraum " |
| 1172 |
"durchführen." |
| 1173 |
|
| 1174 |
#. type: Plain text |
| 1175 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1176 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1177 |
msgid "I<Or> otherwise all of the following restrictions apply:" |
| 1178 |
msgstr "I<Oder> es gelten alle der folgenden Beschränkungen:" |
| 1179 |
|
| 1180 |
#. type: Plain text |
| 1181 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1182 |
#: opensuse-tumbleweed |
| 1183 |
msgid "" |
| 1184 |
"The data written to I<uid_map> (I<gid_map>) must consist of a single line " |
| 1185 |
"that maps the writing process's effective user ID (group ID) in the parent " |
| 1186 |
"user namespace to a user ID (group ID) in the user namespace." |
| 1187 |
msgstr "" |
| 1188 |
"Die in I<uid_map> (I<gid_map>) geschriebenen Daten müssen aus einer " |
| 1189 |
"einzelnen Zeile bestehen, die die effektive Benutzerkennung (Gruppenkennung) " |
| 1190 |
"des schreibenden Prozesses in dem Vorgängernamensraum auf eine " |
| 1191 |
"Benutzerkennung (Gruppenkennung) in den Benutzernamensraum abbildet." |
| 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 "" |
| 1197 |
"The writing process must have the same effective user ID as the process that " |
| 1198 |
"created the user namespace." |
| 1199 |
msgstr "" |
| 1200 |
"Der schreibende Prozess muss die gleiche effektive Benutzerkennung wie der " |
| 1201 |
"Prozess haben, der den Benutzernamensraum erstellte." |
| 1202 |
|
| 1203 |
#. type: Plain text |
| 1204 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1205 |
#: opensuse-tumbleweed |
| 1206 |
msgid "" |
| 1207 |
"In the case of I<gid_map>, use of the B<setgroups>(2) system call must " |
| 1208 |
"first be denied by writing \\[dq]I<deny>\\[dq] to the I</proc/>pidI</" |
| 1209 |
"setgroups> file (see below) before writing to I<gid_map>." |
| 1210 |
msgstr "" |
| 1211 |
"Im Falle von I<gid_map> muss zuerst die Verwendung des Systemaufrufs " |
| 1212 |
"B<setgroups>(2) verboten werden, indem »I<deny>« in die Datei I</proc/>PIDI</" |
| 1213 |
"setgroups> geschrieben wird (siehe unten), bevor in I<gid_map> geschrieben " |
| 1214 |
"wird." |
| 1215 |
|
| 1216 |
# |
| 1217 |
#. ============================================================ |
| 1218 |
#. type: Plain text |
| 1219 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1220 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1221 |
msgid "Writes that violate the above rules fail with the error B<EPERM>." |
| 1222 |
msgstr "" |
| 1223 |
"Schreibaktionen, die die obigen Regeln verletzen, werden mit B<EPERM> " |
| 1224 |
"fehlschlagen." |
| 1225 |
|
| 1226 |
#. type: SS |
| 1227 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1228 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1229 |
#, no-wrap |
| 1230 |
msgid "Project ID mappings: projid_map" |
| 1231 |
msgstr "Projektkennungsabbildung: projid_map" |
| 1232 |
|
| 1233 |
#. type: Plain text |
| 1234 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1235 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1236 |
msgid "" |
| 1237 |
"Similarly to user and group ID mappings, it is possible to create project ID " |
| 1238 |
"mappings for a user namespace. (Project IDs are used for disk quotas; see " |
| 1239 |
"B<setquota>(8) and B<quotactl>(2).)" |
| 1240 |
msgstr "" |
| 1241 |
"Ähnlich zu Benutzer- und Gruppenkennungsabbildungen ist es möglich, eine " |
| 1242 |
"Projektkennungsabbildung für einen Benutzernamensraum zu erstellen. " |
| 1243 |
"(Projektkennungen werden für Plattenkontingente verwandt, siehe " |
| 1244 |
"B<setquota>(8) und B<quotactl>(2).)" |
| 1245 |
|
| 1246 |
#. commit f76d207a66c3a53defea67e7d36c3eb1b7d6d61d |
| 1247 |
#. type: Plain text |
| 1248 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1249 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1250 |
msgid "" |
| 1251 |
"Project ID mappings are defined by writing to the I</proc/>pidI</projid_map> " |
| 1252 |
"file (present since Linux 3.7)." |
| 1253 |
msgstr "" |
| 1254 |
"Projektkennungsabbildungen werden durch Schreiben in die Datei I</proc/" |
| 1255 |
">PIDI</projid_map> definiert (vorhanden seit Linux 3.7)." |
| 1256 |
|
| 1257 |
#. type: Plain text |
| 1258 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1259 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1260 |
msgid "" |
| 1261 |
"The validity rules for writing to the I</proc/>pidI</projid_map> file are as " |
| 1262 |
"for writing to the I<uid_map> file; violation of these rules causes " |
| 1263 |
"B<write>(2) to fail with the error B<EINVAL>." |
| 1264 |
msgstr "" |
| 1265 |
"Die Gültigkeitsregeln für das Schreiben in die Datei I</proc/>PIDI</" |
| 1266 |
"projid_map> sind wie beim Schreiben in die Datei I<uid_map>; Verletzung " |
| 1267 |
"dieser Regeln führt beim B<write>(2) zum Fehlschlag B<EINVAL>." |
| 1268 |
|
| 1269 |
#. type: Plain text |
| 1270 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1271 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1272 |
msgid "" |
| 1273 |
"The permission rules for writing to the I</proc/>pidI</projid_map> file are " |
| 1274 |
"as follows:" |
| 1275 |
msgstr "" |
| 1276 |
"Die Erlaubnisregeln für das Schreiben in die Datei I</proc/>PIDI</" |
| 1277 |
"projid_map> sind wie folgt:" |
| 1278 |
|
| 1279 |
#. type: Plain text |
| 1280 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1281 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1282 |
msgid "" |
| 1283 |
"The mapped project IDs must in turn have a mapping in the parent user " |
| 1284 |
"namespace." |
| 1285 |
msgstr "" |
| 1286 |
"Die abgebildeten Projektkennungen müssen wiederum eine Abbildung im " |
| 1287 |
"Vorgängernamensraum haben." |
| 1288 |
|
| 1289 |
# |
| 1290 |
#. ============================================================ |
| 1291 |
#. type: Plain text |
| 1292 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1293 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1294 |
msgid "" |
| 1295 |
"Violation of these rules causes B<write>(2) to fail with the error B<EPERM>." |
| 1296 |
msgstr "" |
| 1297 |
"Verletzung dieser Regeln führt dazu, dass B<write>(2) mit B<EPERM> " |
| 1298 |
"fehlschlägt." |
| 1299 |
|
| 1300 |
#. type: SS |
| 1301 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1302 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1303 |
#, no-wrap |
| 1304 |
msgid "Interaction with system calls that change process UIDs or GIDs" |
| 1305 |
msgstr "Wechselwirkung mit Systemaufrufen, die Prozessbenutzerkennungen oder -gruppenkennungen ändern" |
| 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 |
"In a user namespace where the I<uid_map> file has not been written, the " |
| 1312 |
"system calls that change user IDs will fail. Similarly, if the I<gid_map> " |
| 1313 |
"file has not been written, the system calls that change group IDs will " |
| 1314 |
"fail. After the I<uid_map> and I<gid_map> files have been written, only the " |
| 1315 |
"mapped values may be used in system calls that change user and group IDs." |
| 1316 |
msgstr "" |
| 1317 |
"In einem Benutzernamensraum, in dem die Datei I<uid_map> noch nicht " |
| 1318 |
"geschrieben wurde, werden die Systemaufrufe, die die Benutzerkennung ändern, " |
| 1319 |
"fehlschlagen. Ähnlich werden die Systemaufrufe, die die Gruppenkennungen " |
| 1320 |
"ändern, fehlschlagen, falls die Datei I<gid_map> noch nicht geschrieben " |
| 1321 |
"wurde. Nachdem die Dateien I<uid_map> und I<gid_map> geschrieben wurden, " |
| 1322 |
"können nur die abgebildeten Werte in Systemaufrufen verwandt werden, die die " |
| 1323 |
"Benutzer- und Gruppenkennungen ändern." |
| 1324 |
|
| 1325 |
#. type: Plain text |
| 1326 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1327 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1328 |
msgid "" |
| 1329 |
"For user IDs, the relevant system calls include B<setuid>(2), " |
| 1330 |
"B<setfsuid>(2), B<setreuid>(2), and B<setresuid>(2). For group IDs, the " |
| 1331 |
"relevant system calls include B<setgid>(2), B<setfsgid>(2), B<setregid>(2), " |
| 1332 |
"B<setresgid>(2), and B<setgroups>(2)." |
| 1333 |
msgstr "" |
| 1334 |
"Für Benutzerkennungen sind die relevanten Systemaufrufe unter anderem " |
| 1335 |
"B<setuid>(2), B<setfsuid>(2), B<setreuid>(2) und B<setresuid>(2). Für " |
| 1336 |
"Gruppenkennungen sind die relevanten Systemaufrufe unter anderem " |
| 1337 |
"B<setgid>(2), B<setfsgid>(2), B<setregid>(2), B<setresgid>(2) und " |
| 1338 |
"B<setgroups>(2)." |
| 1339 |
|
| 1340 |
# |
| 1341 |
#. Things changed in Linux 3.19 |
| 1342 |
#. commit 9cc46516ddf497ea16e8d7cb986ae03a0f6b92f8 |
| 1343 |
#. commit 66d2f338ee4c449396b6f99f5e75cd18eb6df272 |
| 1344 |
#. http://lwn.net/Articles/626665/ |
| 1345 |
#. ============================================================ |
| 1346 |
#. type: Plain text |
| 1347 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1348 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1349 |
msgid "" |
| 1350 |
"Writing \\[dq]I<deny>\\[dq] to the I</proc/>pidI</setgroups> file before " |
| 1351 |
"writing to I</proc/>pidI</gid_map> will permanently disable B<setgroups>(2) " |
| 1352 |
"in a user namespace and allow writing to I</proc/>pidI</gid_map> without " |
| 1353 |
"having the B<CAP_SETGID> capability in the parent user namespace." |
| 1354 |
msgstr "" |
| 1355 |
"Durch Schreiben von »I<deny>« in die Datei I</proc/>PIDI</setgroups> vor dem " |
| 1356 |
"Schreiben von I</proc/>PIDI</gid_map> wird B<setgroups>(2) in einem " |
| 1357 |
"Benutzernamensraum dauerhaft deaktiviert und erlaubt Schreiben von I</proc/" |
| 1358 |
">PIDI</gid_map>, ohne über die Capability B<CAP_SETGID> im " |
| 1359 |
"Vorgängernamensraum zu verfügen." |
| 1360 |
|
| 1361 |
#. type: SS |
| 1362 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1363 |
#: opensuse-tumbleweed |
| 1364 |
#, no-wrap |
| 1365 |
msgid "The \\f[I]/proc/\\fBpid\\f[I]/setgroups\\fB file" |
| 1366 |
msgstr "The \\f[I]/proc/\\fBPID\\f[I]/setgroups\\fB file" |
| 1367 |
|
| 1368 |
# |
| 1369 |
#. commit 9cc46516ddf497ea16e8d7cb986ae03a0f6b92f8 |
| 1370 |
#. commit 66d2f338ee4c449396b6f99f5e75cd18eb6df272 |
| 1371 |
#. http://lwn.net/Articles/626665/ |
| 1372 |
#. http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-8989 |
| 1373 |
#. type: Plain text |
| 1374 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1375 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1376 |
msgid "" |
| 1377 |
"The I</proc/>pidI</setgroups> file displays the string \\[dq]I<allow>\\[dq] " |
| 1378 |
"if processes in the user namespace that contains the process I<pid> are " |
| 1379 |
"permitted to employ the B<setgroups>(2) system call; it displays \\" |
| 1380 |
"[dq]I<deny>\\[dq] if B<setgroups>(2) is not permitted in that user " |
| 1381 |
"namespace. Note that regardless of the value in the I</proc/>pidI</" |
| 1382 |
"setgroups> file (and regardless of the process's capabilities), calls to " |
| 1383 |
"B<setgroups>(2) are also not permitted if I</proc/>pidI</gid_map> has not " |
| 1384 |
"yet been set." |
| 1385 |
msgstr "" |
| 1386 |
"Die Datei I</proc/>PIDI</setgroups> zeigt die Zeichenkette »I<allow>«, falls " |
| 1387 |
"Prozesse in dem Benutzernamensraum, der den Prozess I<PID> enthält, die " |
| 1388 |
"Erlaubnis haben, den Systemaufruf B<setgroups>(2) einzusetzen. Sie zeigt " |
| 1389 |
"»I<deny>« an, falls B<setgroups>(2) in diesem Benutzernamensraum nicht " |
| 1390 |
"erlaubt ist. Beachten Sie, dass Aufrufe von B<setgroups>(2) auch nicht " |
| 1391 |
"erlaubt sind, falls I</proc/>PIDI</gid_map> noch nicht gesetzt wurde, " |
| 1392 |
"unabhängig von dem Wert der Datei I</proc/>PIDI</setgroups> (und unabhängig " |
| 1393 |
"von den Capabilitys des Prozesses)." |
| 1394 |
|
| 1395 |
#. type: Plain text |
| 1396 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1397 |
#: opensuse-tumbleweed |
| 1398 |
msgid "" |
| 1399 |
"A privileged process (one with the B<CAP_SYS_ADMIN> capability in the " |
| 1400 |
"namespace) may write either of the strings \\[dq]I<allow>\\[dq] or \\" |
| 1401 |
"[dq]I<deny>\\[dq] to this file I<before> writing a group ID mapping for this " |
| 1402 |
"user namespace to the file I</proc/>pidI</gid_map>. Writing the string \\" |
| 1403 |
"[dq]I<deny>\\[dq] prevents any process in the user namespace from employing " |
| 1404 |
"B<setgroups>(2)." |
| 1405 |
msgstr "" |
| 1406 |
"Ein privilegierter Prozess (einer mit der Capability B<CAP_SYS_ADMIN> in dem " |
| 1407 |
"Namensraum) darf eine der Zeichenketten »I<allow>« oder »I<deny>« in diese " |
| 1408 |
"Datei schreiben, I<bevor> eine Gruppenkennungsabbildung für diesen " |
| 1409 |
"Benutzernamensraum in die Datei I</proc/>PIDI</gid_map> geschrieben wird. " |
| 1410 |
"Durch Schreiben der Zeichenkette »I<deny>« wird jedem Prozess in diesem " |
| 1411 |
"Benutzernamensraum der Einsatz von B<setgroups>(2) verboten." |
| 1412 |
|
| 1413 |
#. type: Plain text |
| 1414 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1415 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1416 |
msgid "" |
| 1417 |
"The essence of the restrictions described in the preceding paragraph is that " |
| 1418 |
"it is permitted to write to I</proc/>pidI</setgroups> only so long as " |
| 1419 |
"calling B<setgroups>(2) is disallowed because I</proc/>pidI</gid_map> has " |
| 1420 |
"not been set. This ensures that a process cannot transition from a state " |
| 1421 |
"where B<setgroups>(2) is allowed to a state where B<setgroups>(2) is " |
| 1422 |
"denied; a process can transition only from B<setgroups>(2) being disallowed " |
| 1423 |
"to B<setgroups>(2) being allowed." |
| 1424 |
msgstr "" |
| 1425 |
"Die Essenz der in den vorhergehenden Absätzen beschriebenen Beschränkungen " |
| 1426 |
"ist, dass das Schreiben in I</proc/>PIDI</setgroups> nur so lange erlaubt " |
| 1427 |
"ist, wie B<setgroups>(2) nicht erlaubt ist, da I</proc/>PIDI</gid_map> noch " |
| 1428 |
"nicht gesetzt wurde. Damit wird sichergestellt, dass ein Prozess nicht von " |
| 1429 |
"einem Zustand, bei dem B<setgroups>(2) erlaubt ist, zu einem Zustand, bei " |
| 1430 |
"dem B<setgroups>(2) verboten ist, übergehen kann; ein Prozess kann nur von " |
| 1431 |
"B<setgroups>(2) nicht erlaubt zu B<setgroups>(2) erlaubt übergehen." |
| 1432 |
|
| 1433 |
#. type: Plain text |
| 1434 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1435 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1436 |
msgid "" |
| 1437 |
"The default value of this file in the initial user namespace is \\" |
| 1438 |
"[dq]I<allow>\\[dq]." |
| 1439 |
msgstr "" |
| 1440 |
"Der Vorgabewert für diese Datei in dem anfänglichen Namensraum ist " |
| 1441 |
"»I<allow>«." |
| 1442 |
|
| 1443 |
#. type: Plain text |
| 1444 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1445 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1446 |
msgid "" |
| 1447 |
"Once I</proc/>pidI</gid_map> has been written to (which has the effect of " |
| 1448 |
"enabling B<setgroups>(2) in the user namespace), it is no longer possible " |
| 1449 |
"to disallow B<setgroups>(2) by writing \\[dq]I<deny>\\[dq] to I</proc/" |
| 1450 |
">pidI</setgroups> (the write fails with the error B<EPERM>)." |
| 1451 |
msgstr "" |
| 1452 |
"Sobald I</proc/>PIDI</gid_map> geschrieben wurde (wodurch B<setgroups>(2) in " |
| 1453 |
"dem Benutzernamensraum aktiviert wird), ist es nicht mehr möglich, " |
| 1454 |
"B<setgroups>(2) durch Schreiben von »I<deny>« in I</proc/>PIDI</setgroups> " |
| 1455 |
"zu verbieten (das Schreiben schlägt mit B<EPERM> fehl)." |
| 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 |
"A child user namespace inherits the I</proc/>pidI</setgroups> setting from " |
| 1462 |
"its parent." |
| 1463 |
msgstr "" |
| 1464 |
"Ein Nachfolgernamensraum erbt die Einstellungen I</proc/>PIDI</setgroups> " |
| 1465 |
"von seinem Vorgänger." |
| 1466 |
|
| 1467 |
#. type: Plain text |
| 1468 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1469 |
#: opensuse-tumbleweed |
| 1470 |
msgid "" |
| 1471 |
"If the I<setgroups> file has the value \\[dq]I<deny>\\[dq], then the " |
| 1472 |
"B<setgroups>(2) system call can't subsequently be reenabled (by writing \\" |
| 1473 |
"[dq]I<allow>\\[dq] to the file) in this user namespace. (Attempts to do so " |
| 1474 |
"fail with the error B<EPERM>.) This restriction also propagates down to all " |
| 1475 |
"child user namespaces of this user namespace." |
| 1476 |
msgstr "" |
| 1477 |
"Falls die Datei I<setgroups> den Wert »I<deny>« enthält, dann kann der " |
| 1478 |
"Systemaufruf B<setgroups>(2) in diesem Namensraum nachfolgend nicht mehr " |
| 1479 |
"aktiviert werden (durch Schreiben von »I<allow>« in die Datei). (Versuche, " |
| 1480 |
"dies durchzuführen, schlagen mit B<EPERM> fehl.) Diese Beschränkung wird " |
| 1481 |
"auch an alle Nachfolgerbenutzernamensräume dieses Benutzernamensraums " |
| 1482 |
"weitergeleitet." |
| 1483 |
|
| 1484 |
# |
| 1485 |
# |
| 1486 |
# |
| 1487 |
# |
| 1488 |
#. /proc/PID/setgroups |
| 1489 |
#. [allow == setgroups() is allowed, "deny" == setgroups() is disallowed] |
| 1490 |
#. * Can write if have CAP_SYS_ADMIN in NS |
| 1491 |
#. * Must write BEFORE writing to /proc/PID/gid_map |
| 1492 |
#. setgroups() |
| 1493 |
#. * Must already have written to gid_map |
| 1494 |
#. * /proc/PID/setgroups must be "allow" |
| 1495 |
#. /proc/PID/gid_map -- writing |
| 1496 |
#. * Must already have written "deny" to /proc/PID/setgroups |
| 1497 |
#. ============================================================ |
| 1498 |
#. type: Plain text |
| 1499 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1500 |
#: opensuse-tumbleweed |
| 1501 |
msgid "" |
| 1502 |
"The I</proc/>pidI</setgroups> file was added in Linux 3.19, but was " |
| 1503 |
"backported to many earlier stable kernel series, because it addresses a " |
| 1504 |
"security issue. The issue concerned files with permissions such as \"rwx---" |
| 1505 |
"rwx\". Such files give fewer permissions to \"group\" than they do to " |
| 1506 |
"\"other\". This means that dropping groups using B<setgroups>(2) might " |
| 1507 |
"allow a process file access that it did not formerly have. Before the " |
| 1508 |
"existence of user namespaces this was not a concern, since only a privileged " |
| 1509 |
"process (one with the B<CAP_SETGID> capability) could call " |
| 1510 |
"B<setgroups>(2). However, with the introduction of user namespaces, it " |
| 1511 |
"became possible for an unprivileged process to create a new namespace in " |
| 1512 |
"which the user had all privileges. This then allowed formerly unprivileged " |
| 1513 |
"users to drop groups and thus gain file access that they did not previously " |
| 1514 |
"have. The I</proc/>pidI</setgroups> file was added to address this security " |
| 1515 |
"issue, by denying any pathway for an unprivileged process to drop groups " |
| 1516 |
"with B<setgroups>(2)." |
| 1517 |
msgstr "" |
| 1518 |
"Die Datei I</proc/>PIDI</setgroups> wurde in Linux 3.19 hinzugefügt; " |
| 1519 |
"allerdings wurde sie auch auf viele frühere stabile Kernel rückportiert, da " |
| 1520 |
"sie ein Sicherheitsproblem adressiert. Das Problem betraf Dateien mit " |
| 1521 |
"Berechtigungen wie »rwx---rwx«. Diese Dateien geben der »Gruppe« weniger " |
| 1522 |
"Berechtigungen als sie »anderen« geben. Das bedeutet, dass die Abgabe von " |
| 1523 |
"Gruppen mittels B<setgroups>(2) einem Prozess Dateizugriff erlauben könnte, " |
| 1524 |
"den er vorher nicht hatte. Vor der Existenz von Benutzernamensräumen führte " |
| 1525 |
"dies zu keine Sorgen, da nur ein privilegierter Prozess (einer mit der " |
| 1526 |
"Capability B<CAP_SETGID>) B<setgroups>(2) aufrufen konnte. Mit der " |
| 1527 |
"Einführung von Benutzernamensräumen wurde es für einen nicht privilegierten " |
| 1528 |
"Prozess allerdings möglich, einen neuen Namensraum zu erstellen, in dem der " |
| 1529 |
"Benutzer alle Privilegien hatte. Dies ermöglichte es dann vorher nicht " |
| 1530 |
"privilegierten Benutzern Gruppen abzugeben und damit Dateizugriff zu " |
| 1531 |
"erlangen, den sie vorher nicht hatten. Die Datei I</proc/>PIDI</setgroups> " |
| 1532 |
"wurde hinzugefügt, um dieses Sicherheitsproblem zu adressieren, indem jeder " |
| 1533 |
"Pfad für einen nicht privilegierten Prozess, Gruppen mit B<setgroups>(2) " |
| 1534 |
"abzugeben, verboten wurde." |
| 1535 |
|
| 1536 |
#. type: SS |
| 1537 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1538 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1539 |
#, no-wrap |
| 1540 |
msgid "Unmapped user and group IDs" |
| 1541 |
msgstr "Nicht abgebildete Benutzer- und Gruppenkennungen" |
| 1542 |
|
| 1543 |
#. from_kuid_munged(), from_kgid_munged() |
| 1544 |
#. type: Plain text |
| 1545 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1546 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1547 |
msgid "" |
| 1548 |
"There are various places where an unmapped user ID (group ID) may be " |
| 1549 |
"exposed to user space. For example, the first process in a new user " |
| 1550 |
"namespace may call B<getuid>(2) before a user ID mapping has been defined " |
| 1551 |
"for the namespace. In most such cases, an unmapped user ID is converted to " |
| 1552 |
"the overflow user ID (group ID); the default value for the overflow user ID " |
| 1553 |
"(group ID) is 65534. See the descriptions of I</proc/sys/kernel/" |
| 1554 |
"overflowuid> and I</proc/sys/kernel/overflowgid> in B<proc>(5)." |
| 1555 |
msgstr "" |
| 1556 |
"Es gibt verschiedene Stellen, an denen nicht abgebildete Benutzerkennungen " |
| 1557 |
"(Gruppenkennungen) im Anwendungsraum offengelegt werden können. " |
| 1558 |
"Beispielsweise könnte der erste Prozess in einem neuen Benutzernamensraum " |
| 1559 |
"B<getuid>(2) aufrufen, bevor eine Benutzerkennungsabbildung für den " |
| 1560 |
"Namensraum definiert wurde. In den meisten solcher Fälle wird eine nicht " |
| 1561 |
"abgebildete Benutzerkennung in die Überlauf-Benutzerkennung (Gruppenkennung) " |
| 1562 |
"konvertiert; der Vorgabewert für die Überlauf-Benutzerkennung " |
| 1563 |
"(Gruppenkennung) ist 65534. Siehe die Beschreibung von I</proc/sys/kernel/" |
| 1564 |
"overflowuid> und I</proc/sys/kernel/overflowgid> in B<proc>(5)." |
| 1565 |
|
| 1566 |
#. also SO_PEERCRED |
| 1567 |
#. type: Plain text |
| 1568 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1569 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1570 |
msgid "" |
| 1571 |
"The cases where unmapped IDs are mapped in this fashion include system calls " |
| 1572 |
"that return user IDs (B<getuid>(2), B<getgid>(2), and similar), credentials " |
| 1573 |
"passed over a UNIX domain socket, credentials returned by B<stat>(2), " |
| 1574 |
"B<waitid>(2), and the System V IPC \"ctl\" B<IPC_STAT> operations, " |
| 1575 |
"credentials exposed by I</proc/>pidI</status> and the files in I</proc/" |
| 1576 |
"sysvipc/*>, credentials returned via the I<si_uid> field in the I<siginfo_t> " |
| 1577 |
"received with a signal (see B<sigaction>(2)), credentials written to the " |
| 1578 |
"process accounting file (see B<acct>(5)), and credentials returned with " |
| 1579 |
"POSIX message queue notifications (see B<mq_notify>(3))." |
| 1580 |
msgstr "" |
| 1581 |
"Zu den Fällen, in denen nicht abgebildete Benutzerkennungen auf diese Art " |
| 1582 |
"abgebildet werden, gehören Systemaufrufe, die Benutzerkennungen " |
| 1583 |
"zurückliefern (B<getuid>(2), B<getgid>(2) und ähnliche), " |
| 1584 |
"Benutzerberechtigungen, die über ein UNIX-Domain-Socket übergeben werden, " |
| 1585 |
"Benutzerberechtigungen, die von B<stat>(2), B<waitid>(2) und den System-V-" |
| 1586 |
"IPC-»ctl«-B<IPC_STAT>-Aktionen zurückgeliefert werden, " |
| 1587 |
"Benutzerberechtigungen, die mittels I</proc/>PIDI</status> und den Dateien " |
| 1588 |
"in I</proc/sysvipc/*> offengelegt werden, Benutzerberechtigungen, die über " |
| 1589 |
"das Feld I<si_uid> in dem mit einem Signal I<siginfo_t> empfangenen Feld " |
| 1590 |
"zurückgeliefert werden (siehe B<sigaction>(2)), Benutzerberechtigungen, die " |
| 1591 |
"in die Prozessbuchhaltungsdatei geschrieben werden (siehe B<acct>(5)) und " |
| 1592 |
"Benutzerberechtigungen, die mit POSIX-Nachrichtenwarteschlangen-" |
| 1593 |
"Benachrichtigungen zurückgeliefert werden (siehe B<mq_notify>(3))." |
| 1594 |
|
| 1595 |
# |
| 1596 |
#. from_kuid(), from_kgid() |
| 1597 |
#. Also F_GETOWNER_UIDS is an exception |
| 1598 |
#. ============================================================ |
| 1599 |
#. type: Plain text |
| 1600 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1601 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1602 |
msgid "" |
| 1603 |
"There is one notable case where unmapped user and group IDs are I<not> " |
| 1604 |
"converted to the corresponding overflow ID value. When viewing a I<uid_map> " |
| 1605 |
"or I<gid_map> file in which there is no mapping for the second field, that " |
| 1606 |
"field is displayed as 4294967295 (-1 as an unsigned integer)." |
| 1607 |
msgstr "" |
| 1608 |
"Es gibt einen erwähnenswerten Fall, bei dem nicht abgebildete Benutzer- und " |
| 1609 |
"Gruppenkennungen I<nicht> in die entsprechende Überlaufkennung konvertiert " |
| 1610 |
"werden. Beim Betrachten einer Datei I<uid_map> oder I<gid_map>, bei der es " |
| 1611 |
"keine Abbildung für das zweite Feld gibt, wird das Feld als 4294967295 (-1 " |
| 1612 |
"als eine vorzeichenlose Ganzzahl) dargestellt." |
| 1613 |
|
| 1614 |
#. type: SS |
| 1615 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1616 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1617 |
#, no-wrap |
| 1618 |
msgid "Accessing files" |
| 1619 |
msgstr "Dateizugriff" |
| 1620 |
|
| 1621 |
# |
| 1622 |
#. ============================================================ |
| 1623 |
#. type: Plain text |
| 1624 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1625 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1626 |
msgid "" |
| 1627 |
"In order to determine permissions when an unprivileged process accesses a " |
| 1628 |
"file, the process credentials (UID, GID) and the file credentials are in " |
| 1629 |
"effect mapped back to what they would be in the initial user namespace and " |
| 1630 |
"then compared to determine the permissions that the process has on the " |
| 1631 |
"file. The same is also true of other objects that employ the credentials " |
| 1632 |
"plus permissions mask accessibility model, such as System V IPC objects." |
| 1633 |
msgstr "" |
| 1634 |
"Um Berechtigungen zu bestimmen, wenn ein nicht privilegierter Prozess auf " |
| 1635 |
"eine Datei zugreift, werden die Prozessberechtigungen (UID, GID) und die " |
| 1636 |
"Dateiberechtigungen letztendlich auf die zurückabgebildet, die sie im " |
| 1637 |
"anfänglichen Benutzernamensraum wären und dann verglichen, um die " |
| 1638 |
"Berechtigungen zu bestimmen, die der Prozess auf die Datei hat. Das gleiche " |
| 1639 |
"trifft auch für andere Objekte zu, die das Zugriffsmodell mit " |
| 1640 |
"Benutzerberechtigungen sowie Berechtigungsmasken einsetzen, wie System-V-IPC-" |
| 1641 |
"Objekte." |
| 1642 |
|
| 1643 |
#. type: SS |
| 1644 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1645 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1646 |
#, no-wrap |
| 1647 |
msgid "Operation of file-related capabilities" |
| 1648 |
msgstr "Aktionen mit Datei-bezogenen Capabilitys" |
| 1649 |
|
| 1650 |
#. type: Plain text |
| 1651 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1652 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1653 |
msgid "" |
| 1654 |
"Certain capabilities allow a process to bypass various kernel-enforced " |
| 1655 |
"restrictions when performing operations on files owned by other users or " |
| 1656 |
"groups. These capabilities are: B<CAP_CHOWN>, B<CAP_DAC_OVERRIDE>, " |
| 1657 |
"B<CAP_DAC_READ_SEARCH>, B<CAP_FOWNER>, and B<CAP_FSETID>." |
| 1658 |
msgstr "" |
| 1659 |
"Bestimmte Capabilitys erlauben es einem Prozess, verschiedene, durch den " |
| 1660 |
"Kernel durchgesetzte Beschränkungen zu umgehen, wenn Aktionen auf Dateien " |
| 1661 |
"durchgeführt werden, die anderen Benutzern oder Gruppen gehören. Diese " |
| 1662 |
"Capabilitys sind B<CAP_CHOWN>, B<CAP_DAC_OVERRIDE>, B<CAP_DAC_READ_SEARCH>, " |
| 1663 |
"B<CAP_FOWNER> und B<CAP_FSETID>." |
| 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 |
"Within a user namespace, these capabilities allow a process to bypass the " |
| 1670 |
"rules if the process has the relevant capability over the file, meaning that:" |
| 1671 |
msgstr "" |
| 1672 |
"Innerhalb eines Benutzernamensraumes erlauben diese Capabilitys einem " |
| 1673 |
"Prozess, die Regeln zu umgehen, falls der Prozess über die relevante " |
| 1674 |
"Capability über die Datei verfügt. Das bedeutet:" |
| 1675 |
|
| 1676 |
#. type: Plain text |
| 1677 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1678 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1679 |
msgid "" |
| 1680 |
"the process has the relevant effective capability in its user namespace; and" |
| 1681 |
msgstr "" |
| 1682 |
"Der Prozess hat die relevante effektive Capability in seinem eigenen " |
| 1683 |
"Benutzernamensraum; und" |
| 1684 |
|
| 1685 |
#. type: Plain text |
| 1686 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1687 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1688 |
msgid "" |
| 1689 |
"the file's user ID and group ID both have valid mappings in the user " |
| 1690 |
"namespace." |
| 1691 |
msgstr "" |
| 1692 |
"die Benutzer- und Gruppenkennung der Datei habe beide gültige Abbildungen in " |
| 1693 |
"dem Benutzernamensraum." |
| 1694 |
|
| 1695 |
# |
| 1696 |
#. #-#-#-#-# archlinux: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 1697 |
#. These are the checks performed by the kernel function |
| 1698 |
#. inode_owner_or_capable(). There is one exception to the exception: |
| 1699 |
#. overriding the directory sticky permission bit requires that |
| 1700 |
#. the file has a valid mapping for both its UID and GID. |
| 1701 |
#. ============================================================ |
| 1702 |
#. type: Plain text |
| 1703 |
#. #-#-#-#-# debian-trixie: user_namespaces.7.pot (PACKAGE VERSION) #-#-#-#-# |
| 1704 |
#. These are the checks performed by the kernel function |
| 1705 |
#. inode_owner_or_capable(). There is one exception to the exception: |
| 1706 |
#. overriding the directory sticky permission bit requires that |
| 1707 |
#. the file has a valid mapping for both its UID and GID. |
| 1708 |
#. ============================================================ |
| 1709 |
#. type: Plain text |
| 1710 |
#. #-#-#-#-# debian-unstable: 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 |
#. #-#-#-#-# fedora-44: 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 |
#. #-#-#-#-# fedora-rawhide: 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 |
#. #-#-#-#-# mageia-cauldron: 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 |
#. #-#-#-#-# opensuse-leap-16-1: 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 |
#. #-#-#-#-# opensuse-tumbleweed: 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 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1753 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1754 |
msgid "" |
| 1755 |
"The B<CAP_FOWNER> capability is treated somewhat exceptionally: it allows a " |
| 1756 |
"process to bypass the corresponding rules so long as at least the file's " |
| 1757 |
"user ID has a mapping in the user namespace (i.e., the file's group ID does " |
| 1758 |
"not need to have a valid mapping)." |
| 1759 |
msgstr "" |
| 1760 |
"Die Capability B<CAP_FOWNER> wird etwas besonders behandelt: sie erlaubt " |
| 1761 |
"einem Prozess, die entsprechenden Regeln zu umgehen, solange zumindest die " |
| 1762 |
"Benutzerkennung der Datei über eine Abbildung in dem Benutzernamensraum " |
| 1763 |
"verfügt (d.h. die Gruppenkennung der Datei benötigt keine gültige Abbildung)." |
| 1764 |
|
| 1765 |
#. type: SS |
| 1766 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1767 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1768 |
#, no-wrap |
| 1769 |
msgid "Set-user-ID and set-group-ID programs" |
| 1770 |
msgstr "Set-user-ID- und set-group-ID-Programme" |
| 1771 |
|
| 1772 |
# |
| 1773 |
#. ============================================================ |
| 1774 |
#. type: Plain text |
| 1775 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1776 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1777 |
msgid "" |
| 1778 |
"When a process inside a user namespace executes a set-user-ID (set-group-ID) " |
| 1779 |
"program, the process's effective user (group) ID inside the namespace is " |
| 1780 |
"changed to whatever value is mapped for the user (group) ID of the file. " |
| 1781 |
"However, if either the user I<or> the group ID of the file has no mapping " |
| 1782 |
"inside the namespace, the set-user-ID (set-group-ID) bit is silently " |
| 1783 |
"ignored: the new program is executed, but the process's effective user " |
| 1784 |
"(group) ID is left unchanged. (This mirrors the semantics of executing a " |
| 1785 |
"set-user-ID or set-group-ID program that resides on a filesystem that was " |
| 1786 |
"mounted with the B<MS_NOSUID> flag, as described in B<mount>(2).)" |
| 1787 |
msgstr "" |
| 1788 |
"Wenn ein Prozess innerhalb eines Benutzernamensraums ein set-user-ID- (set-" |
| 1789 |
"group-ID)-Programm ausführt, wird die effektive Benutzer- (Gruppen-)Kennung " |
| 1790 |
"des Prozesses innerhalb des Namensraums auf denjenigen Wert geändert, der " |
| 1791 |
"für die Benutzer- (Gruppen)kennung der Datei abgebildet ist. Falls " |
| 1792 |
"allerdings entweder die Benutzer- I<oder> die Gruppenkennung der Datei über " |
| 1793 |
"keine Abbildung innerhalb des Namensraums verfügt, wird das set-user-ID- " |
| 1794 |
"(set-group-ID-)Bit ohne Rückmeldung ignoriert: das neue Programm wird " |
| 1795 |
"ausgeführt, aber die effektive Benutzer- (Gruppen-)Kennung des Prozesses " |
| 1796 |
"bleibt unverändert. (Dies spiegelt die Semantik bei der Ausführung eines set-" |
| 1797 |
"user-ID- oder set-group-ID-Programmes wider, das sich auf einem Dateisystem " |
| 1798 |
"befindet, das mit dem Schalter B<MS_NOSUID> eingehängt wurde, wie dies in " |
| 1799 |
"B<mount>(2) beschrieben ist.)" |
| 1800 |
|
| 1801 |
#. type: SS |
| 1802 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1803 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1804 |
#, no-wrap |
| 1805 |
msgid "Miscellaneous" |
| 1806 |
msgstr "Verschiedenes" |
| 1807 |
|
| 1808 |
#. type: Plain text |
| 1809 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1810 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1811 |
msgid "" |
| 1812 |
"When a process's user and group IDs are passed over a UNIX domain socket to " |
| 1813 |
"a process in a different user namespace (see the description of " |
| 1814 |
"B<SCM_CREDENTIALS> in B<unix>(7)), they are translated into the " |
| 1815 |
"corresponding values as per the receiving process's user and group ID " |
| 1816 |
"mappings." |
| 1817 |
msgstr "" |
| 1818 |
"Wenn die Benutzer- und Gruppenkennungen eines Prozesses über ein UNIX-Domain-" |
| 1819 |
"Socket an einen Prozess in einem anderen Benutzernamensraum übergeben werden " |
| 1820 |
"(siehe die Beschreibung von B<SCM_CREDENTIALS> in B<unix>(7)), werden sie in " |
| 1821 |
"die entsprechenden Werte der Benutzer- und Gruppenkennungsabbildungen des " |
| 1822 |
"empfangenen Prozesses übersetzt." |
| 1823 |
|
| 1824 |
#. type: SH |
| 1825 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1826 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1827 |
#, no-wrap |
| 1828 |
msgid "STANDARDS" |
| 1829 |
msgstr "STANDARDS" |
| 1830 |
|
| 1831 |
#. type: Plain text |
| 1832 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1833 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1834 |
msgid "Linux." |
| 1835 |
msgstr "Linux." |
| 1836 |
|
| 1837 |
#. type: SH |
| 1838 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1839 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1840 |
#, no-wrap |
| 1841 |
msgid "NOTES" |
| 1842 |
msgstr "ANMERKUNGEN" |
| 1843 |
|
| 1844 |
# |
| 1845 |
#. ============================================================ |
| 1846 |
#. type: Plain text |
| 1847 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1848 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1849 |
msgid "" |
| 1850 |
"Over the years, there have been a lot of features that have been added to " |
| 1851 |
"the Linux kernel that have been made available only to privileged users " |
| 1852 |
"because of their potential to confuse set-user-ID-root applications. In " |
| 1853 |
"general, it becomes safe to allow the root user in a user namespace to use " |
| 1854 |
"those features because it is impossible, while in a user namespace, to gain " |
| 1855 |
"more privilege than the root user of a user namespace has." |
| 1856 |
msgstr "" |
| 1857 |
"Über die Jahre wurden eine Reihe von Funktionalitäten zu dem Linux-Kernel " |
| 1858 |
"hinzugefügt, die nur privilegierten Benutzern verfügbar gemacht wurden, da " |
| 1859 |
"sie möglicherweise set-user-ID-root-Anwendungen durcheinander bringen " |
| 1860 |
"könnten. Im Allgemeinen wird es sicher, einem Root-Benutzer in einem " |
| 1861 |
"Benutzernamensraum die Verwendung dieser Funktionalitäten zu erlauben, da es " |
| 1862 |
"unmöglich ist, mehr Privilegien zu erlangen, als der Root-Benutzer innerhalb " |
| 1863 |
"eines Benutzernamensraumes hat, während der Prozess im Benutzernamensraum " |
| 1864 |
"ist." |
| 1865 |
|
| 1866 |
#. type: SS |
| 1867 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1868 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1869 |
#, no-wrap |
| 1870 |
msgid "Global root" |
| 1871 |
msgstr "Globaler Root" |
| 1872 |
|
| 1873 |
# |
| 1874 |
#. ============================================================ |
| 1875 |
#. type: Plain text |
| 1876 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1877 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1878 |
msgid "" |
| 1879 |
"The term \"global root\" is sometimes used as a shorthand for user ID 0 in " |
| 1880 |
"the initial user namespace." |
| 1881 |
msgstr "" |
| 1882 |
"Der Ausdruck »Globaler Root« wird manchmal als Abkürzung für die " |
| 1883 |
"Benutzerkennung 0 im anfänglichen Benutzernamensraum verwandt." |
| 1884 |
|
| 1885 |
#. type: SS |
| 1886 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1887 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1888 |
#, no-wrap |
| 1889 |
msgid "Availability" |
| 1890 |
msgstr "Verfügbarkeit" |
| 1891 |
|
| 1892 |
#. type: Plain text |
| 1893 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1894 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1895 |
msgid "" |
| 1896 |
"Use of user namespaces requires a kernel that is configured with the " |
| 1897 |
"B<CONFIG_USER_NS> option. User namespaces require support in a range of " |
| 1898 |
"subsystems across the kernel. When an unsupported subsystem is configured " |
| 1899 |
"into the kernel, it is not possible to configure user namespaces support." |
| 1900 |
msgstr "" |
| 1901 |
"Die Verwendung von Benutzernamensräumen benötigt einen Kernel, der mit der " |
| 1902 |
"Option B<CONFIG_USER_NS> konfiguriert ist. Benutzernamensräume benötigen die " |
| 1903 |
"Unterstützung in einer ganzen Reihe von Subsystemen im Kernel. Wird ein " |
| 1904 |
"nicht unterstütztes Subsystem in den Kernel konfiguriert, dann ist es nicht " |
| 1905 |
"möglich, die Unterstützung von Benutzernamensräumen zu konfigurieren." |
| 1906 |
|
| 1907 |
#. commit d6970d4b726cea6d7a9bc4120814f95c09571fc3 |
| 1908 |
#. type: Plain text |
| 1909 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1910 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1911 |
msgid "" |
| 1912 |
"As at Linux 3.8, most relevant subsystems supported user namespaces, but a " |
| 1913 |
"number of filesystems did not have the infrastructure needed to map user and " |
| 1914 |
"group IDs between user namespaces. Linux 3.9 added the required " |
| 1915 |
"infrastructure support for many of the remaining unsupported filesystems " |
| 1916 |
"(Plan 9 (9P), Andrew File System (AFS), Ceph, CIFS, CODA, NFS, and OCFS2). " |
| 1917 |
"Linux 3.12 added support for the last of the unsupported major filesystems, " |
| 1918 |
"XFS." |
| 1919 |
msgstr "" |
| 1920 |
"Seit Linux 3.8 unterstützen die wichtigsten Subsysteme Benutzernamensräume, " |
| 1921 |
"aber eine Reihe von Dateisystemen hatten noch nicht die benötigte " |
| 1922 |
"Infrastruktur, um Benutzer- und Gruppenkennungen zwischen " |
| 1923 |
"Benutzernamensräumen abzubilden. Linux 3.9 fügte die benötigte Infrastruktur " |
| 1924 |
"für viele der verbliebenen, nicht unterstützten Dateisysteme (Plan 9 (9P), " |
| 1925 |
"Andrew File System (AFS), Ceph, CIFS, CODA, NFS und OCFS2) hinzu. Linux 3.12 " |
| 1926 |
"fügte Unterstützung für das letzte große verbliebene und nicht unterstützte " |
| 1927 |
"Dateisystem hinzu: XFS." |
| 1928 |
|
| 1929 |
#. type: SH |
| 1930 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1931 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1932 |
#, no-wrap |
| 1933 |
msgid "EXAMPLES" |
| 1934 |
msgstr "BEISPIELE" |
| 1935 |
|
| 1936 |
#. type: Plain text |
| 1937 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1938 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1939 |
msgid "" |
| 1940 |
"The program below is designed to allow experimenting with user namespaces, " |
| 1941 |
"as well as other types of namespaces. It creates namespaces as specified by " |
| 1942 |
"command-line options and then executes a command inside those namespaces. " |
| 1943 |
"The comments and I<usage>() function inside the program provide a full " |
| 1944 |
"explanation of the program. The following shell session demonstrates its " |
| 1945 |
"use." |
| 1946 |
msgstr "" |
| 1947 |
"Das nachfolgende Programm ist zum Experimentieren mit Benutzernamensräumen " |
| 1948 |
"sowie anderen Arten von Namensräumen gedacht. Es erstellt einen Namensraum, " |
| 1949 |
"wie er über die Befehlszeilenoptionen angegeben ist, und führt dann " |
| 1950 |
"innerhalb dieser Namensräume einen Befehl aus. Die Kommentare und die " |
| 1951 |
"Funktion I<usage>() innerhalb des Programmes bieten eine vollständige " |
| 1952 |
"Erklärung des Programms. Die nachfolgende Shell-Sitzung zeigt seine " |
| 1953 |
"Verwendung." |
| 1954 |
|
| 1955 |
#. type: Plain text |
| 1956 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1957 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1958 |
msgid "First, we look at the run-time environment:" |
| 1959 |
msgstr "Zuerst schauen wir auf die Laufzeitumgebung:" |
| 1960 |
|
| 1961 |
#. type: Plain text |
| 1962 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1963 |
#: opensuse-tumbleweed |
| 1964 |
#, no-wrap |
| 1965 |
msgid "" |
| 1966 |
"$B< uname -rs>; # Need Linux 3.8 or later\n" |
| 1967 |
"Linux 3.8.0\n" |
| 1968 |
"$B< id -u>; # Running as unprivileged user\n" |
| 1969 |
"1000\n" |
| 1970 |
"$B< id -g>;\n" |
| 1971 |
"1000\n" |
| 1972 |
msgstr "" |
| 1973 |
"$B< uname -rs>; # Benötigt Linux 3.8 oder neuer\n" |
| 1974 |
"Linux 3.8.0\n" |
| 1975 |
"$B< id -u>; # Ausführung als nicht privilegierter Benutzer\n" |
| 1976 |
"1000\n" |
| 1977 |
"$B< id -g>;\n" |
| 1978 |
"1000\n" |
| 1979 |
|
| 1980 |
#. type: Plain text |
| 1981 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1982 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1983 |
msgid "" |
| 1984 |
"Now start a new shell in new user (I<-U>), mount (I<-m>), and PID (I<-p>) " |
| 1985 |
"namespaces, with user ID (I<-M>) and group ID (I<-G>) 1000 mapped to 0 " |
| 1986 |
"inside the user namespace:" |
| 1987 |
msgstr "" |
| 1988 |
"Jetzt wird eine neue Shell in neuen Benutzer- (I<-U>), Einhänge- (I<-m>) und " |
| 1989 |
"PID- (I<-p>) Namensräumen gestartet, wobei innerhalb des Benutzernamensraums " |
| 1990 |
"die Benutzerkennung (I<-M>) und Gruppenkennung (I<-G>) 1000 auf 0 abgebildet " |
| 1991 |
"wird:" |
| 1992 |
|
| 1993 |
#. type: Plain text |
| 1994 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1995 |
#: opensuse-tumbleweed |
| 1996 |
#, no-wrap |
| 1997 |
msgid "$B< ./userns_child_exec -p -m -U -M \\[aq]0 1000 1\\[aq] -G \\[aq]0 1000 1\\[aq] bash>;\n" |
| 1998 |
msgstr "$B< ./userns_child_exec -p -m -U -M \\[aq]0 1000 1\\[aq] -G \\[aq]0 1000 1\\[aq] bash>;\n" |
| 1999 |
|
| 2000 |
#. type: Plain text |
| 2001 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2002 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2003 |
msgid "" |
| 2004 |
"The shell has PID 1, because it is the first process in the new PID " |
| 2005 |
"namespace:" |
| 2006 |
msgstr "" |
| 2007 |
"Diese Shell hat PID 1, da sie der erste Prozess in dem neuen PID-Namensraum " |
| 2008 |
"ist:" |
| 2009 |
|
| 2010 |
#. type: Plain text |
| 2011 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2012 |
#: opensuse-tumbleweed |
| 2013 |
#, no-wrap |
| 2014 |
msgid "" |
| 2015 |
"bash$B< echo $$>;\n" |
| 2016 |
"1\n" |
| 2017 |
msgstr "" |
| 2018 |
"bash$B< echo $$>;\n" |
| 2019 |
"1\n" |
| 2020 |
|
| 2021 |
#. type: Plain text |
| 2022 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2023 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2024 |
msgid "" |
| 2025 |
"Mounting a new I</proc> filesystem and listing all of the processes visible " |
| 2026 |
"in the new PID namespace shows that the shell can't see any processes " |
| 2027 |
"outside the PID namespace:" |
| 2028 |
msgstr "" |
| 2029 |
"Wird ein neues Dateisystem I</proc> eingehängt und alle in dem neuen PID-" |
| 2030 |
"Namensraum sichtbaren Prozesse aufgelistet, kann gesehen werden, dass die " |
| 2031 |
"Shell keinerlei Prozesse außerhalb des PID-Namensraumes sehen kann:" |
| 2032 |
|
| 2033 |
#. type: Plain text |
| 2034 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2035 |
#: opensuse-tumbleweed |
| 2036 |
#, no-wrap |
| 2037 |
msgid "" |
| 2038 |
"bash$B< mount -t proc proc /proc>;\n" |
| 2039 |
"bash$B< ps ax>;\n" |
| 2040 |
" PID TTY STAT TIME COMMAND\n" |
| 2041 |
" 1 pts/3 S 0:00 bash\n" |
| 2042 |
" 22 pts/3 R+ 0:00 ps ax\n" |
| 2043 |
msgstr "" |
| 2044 |
"bash$B< mount -t proc proc /proc>;\n" |
| 2045 |
"bash$B< ps ax>;\n" |
| 2046 |
" PID TTY STAT TIME COMMAND\n" |
| 2047 |
" 1 pts/3 S 0:00 bash\n" |
| 2048 |
" 22 pts/3 R+ 0:00 ps ax\n" |
| 2049 |
|
| 2050 |
#. type: Plain text |
| 2051 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2052 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2053 |
msgid "" |
| 2054 |
"Inside the user namespace, the shell has user and group ID 0, and a full set " |
| 2055 |
"of permitted and effective capabilities:" |
| 2056 |
msgstr "" |
| 2057 |
"Innerhalb des Benutzernamensraumes hat die Shell die Benutzer- und " |
| 2058 |
"Gruppenkennung 0 und eine vollständige Menge an erlaubten und effektiven " |
| 2059 |
"Capabilitys:" |
| 2060 |
|
| 2061 |
#. type: Plain text |
| 2062 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2063 |
#: opensuse-tumbleweed |
| 2064 |
#, no-wrap |
| 2065 |
msgid "" |
| 2066 |
"bash$B< cat /proc/$$/status | egrep \\[aq]\\[ha][UG]id\\[aq]>;\n" |
| 2067 |
"Uid:\t0\t0\t0\t0\n" |
| 2068 |
"Gid:\t0\t0\t0\t0\n" |
| 2069 |
"bash$B< cat /proc/$$/status | egrep \\[aq]\\[ha]Cap(Prm|Inh|Eff)\\[aq]>;\n" |
| 2070 |
"CapInh:\t0000000000000000\n" |
| 2071 |
"CapPrm:\t0000001fffffffff\n" |
| 2072 |
"CapEff:\t0000001fffffffff\n" |
| 2073 |
msgstr "" |
| 2074 |
"bash$B< cat /proc/$$/status | egrep \\[aq]\\[ha][UG]id\\[aq]>;\n" |
| 2075 |
"Uid:\t0\t0\t0\t0\n" |
| 2076 |
"Gid:\t0\t0\t0\t0\n" |
| 2077 |
"bash$B< cat /proc/$$/status | egrep \\[aq]\\[ha]Cap(Prm|Inh|Eff)\\[aq]>;\n" |
| 2078 |
"CapInh:\t0000000000000000\n" |
| 2079 |
"CapPrm:\t0000001fffffffff\n" |
| 2080 |
"CapEff:\t0000001fffffffff\n" |
| 2081 |
|
| 2082 |
#. type: SS |
| 2083 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2084 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2085 |
#, no-wrap |
| 2086 |
msgid "Program source" |
| 2087 |
msgstr "Programmquelltext" |
| 2088 |
|
| 2089 |
#. type: Plain text |
| 2090 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2091 |
#: opensuse-tumbleweed |
| 2092 |
#, no-wrap |
| 2093 |
msgid "" |
| 2094 |
"/* userns_child_exec.c\n" |
| 2095 |
"\\&\n" |
| 2096 |
" Licensed under GNU General Public License v2 or later\n" |
| 2097 |
"\\&\n" |
| 2098 |
" Create a child process that executes a shell command in new\n" |
| 2099 |
" namespace(s); allow UID and GID mappings to be specified when\n" |
| 2100 |
" creating a user namespace.\n" |
| 2101 |
"*/\n" |
| 2102 |
"#define _GNU_SOURCE\n" |
| 2103 |
"#include E<lt>err.hE<gt>\n" |
| 2104 |
"#include E<lt>sched.hE<gt>\n" |
| 2105 |
"#include E<lt>unistd.hE<gt>\n" |
| 2106 |
"#include E<lt>stdint.hE<gt>\n" |
| 2107 |
"#include E<lt>stdlib.hE<gt>\n" |
| 2108 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 2109 |
"#include E<lt>signal.hE<gt>\n" |
| 2110 |
"#include E<lt>fcntl.hE<gt>\n" |
| 2111 |
"#include E<lt>stdio.hE<gt>\n" |
| 2112 |
"#include E<lt>string.hE<gt>\n" |
| 2113 |
"#include E<lt>limits.hE<gt>\n" |
| 2114 |
"#include E<lt>errno.hE<gt>\n" |
| 2115 |
"\\&\n" |
| 2116 |
"struct child_args {\n" |
| 2117 |
" char **argv; /* Command to be executed by child, with args */\n" |
| 2118 |
" int pipe_fd[2]; /* Pipe used to synchronize parent and child */\n" |
| 2119 |
"};\n" |
| 2120 |
"\\&\n" |
| 2121 |
"static int verbose;\n" |
| 2122 |
"\\&\n" |
| 2123 |
"static void\n" |
| 2124 |
"usage(char *pname)\n" |
| 2125 |
"{\n" |
| 2126 |
" fprintf(stderr, \"Usage: %s [options] cmd [arg...]\\[rs]n\\[rs]n\", pname);\n" |
| 2127 |
" fprintf(stderr, \"Create a child process that executes a shell \"\n" |
| 2128 |
" \"command in a new user namespace,\\[rs]n\"\n" |
| 2129 |
" \"and possibly also other new namespace(s).\\[rs]n\\[rs]n\");\n" |
| 2130 |
" fprintf(stderr, \"Options can be:\\[rs]n\\[rs]n\");\n" |
| 2131 |
"#define fpe(str) fprintf(stderr, \" %s\", str);\n" |
| 2132 |
" fpe(\"-i New IPC namespace\\[rs]n\");\n" |
| 2133 |
" fpe(\"-m New mount namespace\\[rs]n\");\n" |
| 2134 |
" fpe(\"-n New network namespace\\[rs]n\");\n" |
| 2135 |
" fpe(\"-p New PID namespace\\[rs]n\");\n" |
| 2136 |
" fpe(\"-u New UTS namespace\\[rs]n\");\n" |
| 2137 |
" fpe(\"-U New user namespace\\[rs]n\");\n" |
| 2138 |
" fpe(\"-M uid_map Specify UID map for user namespace\\[rs]n\");\n" |
| 2139 |
" fpe(\"-G gid_map Specify GID map for user namespace\\[rs]n\");\n" |
| 2140 |
" fpe(\"-z Map user\\[aq]s UID and GID to 0 in user namespace\\[rs]n\");\n" |
| 2141 |
" fpe(\" (equivalent to: -M \\[aq]0 E<lt>uidE<gt> 1\\[aq] -G \\[aq]0 E<lt>gidE<gt> 1\\[aq])\\[rs]n\");\n" |
| 2142 |
" fpe(\"-v Display verbose messages\\[rs]n\");\n" |
| 2143 |
" fpe(\"\\[rs]n\");\n" |
| 2144 |
" fpe(\"If -z, -M, or -G is specified, -U is required.\\[rs]n\");\n" |
| 2145 |
" fpe(\"It is not permitted to specify both -z and either -M or -G.\\[rs]n\");\n" |
| 2146 |
" fpe(\"\\[rs]n\");\n" |
| 2147 |
" fpe(\"Map strings for -M and -G consist of records of the form:\\[rs]n\");\n" |
| 2148 |
" fpe(\"\\[rs]n\");\n" |
| 2149 |
" fpe(\" ID-inside-ns ID-outside-ns size\\[rs]n\");\n" |
| 2150 |
" fpe(\"\\[rs]n\");\n" |
| 2151 |
" fpe(\"A map string can contain multiple records, separated\"\n" |
| 2152 |
" \" by commas;\\[rs]n\");\n" |
| 2153 |
" fpe(\"the commas are replaced by newlines before writing\"\n" |
| 2154 |
" \" to map files.\\[rs]n\");\n" |
| 2155 |
"\\&\n" |
| 2156 |
" exit(EXIT_FAILURE);\n" |
| 2157 |
"}\n" |
| 2158 |
"\\&\n" |
| 2159 |
"/* Update the mapping file \\[aq]map_file\\[aq], with the value provided in\n" |
| 2160 |
" \\[aq]mapping\\[aq], a string that defines a UID or GID mapping. A UID or\n" |
| 2161 |
" GID mapping consists of one or more newline-delimited records\n" |
| 2162 |
" of the form:\n" |
| 2163 |
"\\&\n" |
| 2164 |
" ID_inside-ns ID-outside-ns size\n" |
| 2165 |
"\\&\n" |
| 2166 |
" Requiring the user to supply a string that contains newlines is\n" |
| 2167 |
" of course inconvenient for command-line use. Thus, we permit the\n" |
| 2168 |
" use of commas to delimit records in this string, and replace them\n" |
| 2169 |
" with newlines before writing the string to the file. */\n" |
| 2170 |
"\\&\n" |
| 2171 |
"static void\n" |
| 2172 |
"update_map(char *mapping, char *map_file)\n" |
| 2173 |
"{\n" |
| 2174 |
" int fd;\n" |
| 2175 |
" size_t map_len; /* Length of \\[aq]mapping\\[aq] */\n" |
| 2176 |
"\\&\n" |
| 2177 |
" /* Replace commas in mapping string with newlines. */\n" |
| 2178 |
"\\&\n" |
| 2179 |
" map_len = strlen(mapping);\n" |
| 2180 |
" for (size_t j = 0; j E<lt> map_len; j++)\n" |
| 2181 |
" if (mapping[j] == \\[aq],\\[aq])\n" |
| 2182 |
" mapping[j] = \\[aq]\\[rs]n\\[aq];\n" |
| 2183 |
"\\&\n" |
| 2184 |
" fd = open(map_file, O_RDWR);\n" |
| 2185 |
" if (fd == -1) {\n" |
| 2186 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", map_file,\n" |
| 2187 |
" strerror(errno));\n" |
| 2188 |
" exit(EXIT_FAILURE);\n" |
| 2189 |
" }\n" |
| 2190 |
"\\&\n" |
| 2191 |
" if (write(fd, mapping, map_len) != map_len) {\n" |
| 2192 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", map_file,\n" |
| 2193 |
" strerror(errno));\n" |
| 2194 |
" exit(EXIT_FAILURE);\n" |
| 2195 |
" }\n" |
| 2196 |
"\\&\n" |
| 2197 |
" close(fd);\n" |
| 2198 |
"}\n" |
| 2199 |
"\\&\n" |
| 2200 |
"/* Linux 3.19 made a change in the handling of setgroups(2) and\n" |
| 2201 |
" the \\[aq]gid_map\\[aq] file to address a security issue. The issue\n" |
| 2202 |
" allowed *unprivileged* users to employ user namespaces in\n" |
| 2203 |
" order to drop groups. The upshot of the 3.19 changes is that\n" |
| 2204 |
" in order to update the \\[aq]gid_maps\\[aq] file, use of the setgroups()\n" |
| 2205 |
" system call in this user namespace must first be disabled by\n" |
| 2206 |
" writing \"deny\" to one of the /proc/PID/setgroups files for\n" |
| 2207 |
" this namespace. That is the purpose of the following function. */\n" |
| 2208 |
"\\&\n" |
| 2209 |
"static void\n" |
| 2210 |
"proc_setgroups_write(pid_t child_pid, char *str)\n" |
| 2211 |
"{\n" |
| 2212 |
" char setgroups_path[PATH_MAX];\n" |
| 2213 |
" int fd;\n" |
| 2214 |
"\\&\n" |
| 2215 |
" snprintf(setgroups_path, PATH_MAX, \"/proc/%jd/setgroups\",\n" |
| 2216 |
" (intmax_t) child_pid);\n" |
| 2217 |
"\\&\n" |
| 2218 |
" fd = open(setgroups_path, O_RDWR);\n" |
| 2219 |
" if (fd == -1) {\n" |
| 2220 |
"\\&\n" |
| 2221 |
" /* We may be on a system that doesn\\[aq]t support\n" |
| 2222 |
" /proc/PID/setgroups. In that case, the file won\\[aq]t exist,\n" |
| 2223 |
" and the system won\\[aq]t impose the restrictions that Linux 3.19\n" |
| 2224 |
" added. That\\[aq]s fine: we don\\[aq]t need to do anything in order\n" |
| 2225 |
" to permit \\[aq]gid_map\\[aq] to be updated.\n" |
| 2226 |
"\\&\n" |
| 2227 |
" However, if the error from open() was something other than\n" |
| 2228 |
" the ENOENT error that is expected for that case, let the\n" |
| 2229 |
" user know. */\n" |
| 2230 |
"\\&\n" |
| 2231 |
" if (errno != ENOENT)\n" |
| 2232 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", setgroups_path,\n" |
| 2233 |
" strerror(errno));\n" |
| 2234 |
" return;\n" |
| 2235 |
" }\n" |
| 2236 |
"\\&\n" |
| 2237 |
" if (write(fd, str, strlen(str)) == -1)\n" |
| 2238 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", setgroups_path,\n" |
| 2239 |
" strerror(errno));\n" |
| 2240 |
"\\&\n" |
| 2241 |
" close(fd);\n" |
| 2242 |
"}\n" |
| 2243 |
"\\&\n" |
| 2244 |
"static int /* Start function for cloned child */\n" |
| 2245 |
"childFunc(void *arg)\n" |
| 2246 |
"{\n" |
| 2247 |
" struct child_args *args = arg;\n" |
| 2248 |
" char ch;\n" |
| 2249 |
"\\&\n" |
| 2250 |
" /* Wait until the parent has updated the UID and GID mappings.\n" |
| 2251 |
" See the comment in main(). We wait for end of file on a\n" |
| 2252 |
" pipe that will be closed by the parent process once it has\n" |
| 2253 |
" updated the mappings. */\n" |
| 2254 |
"\\&\n" |
| 2255 |
" close(args-E<gt>pipe_fd[1]); /* Close our descriptor for the write\n" |
| 2256 |
" end of the pipe so that we see EOF\n" |
| 2257 |
" when parent closes its descriptor. */\n" |
| 2258 |
" if (read(args-E<gt>pipe_fd[0], &ch, 1) != 0) {\n" |
| 2259 |
" fprintf(stderr,\n" |
| 2260 |
" \"Failure in child: read from pipe returned != 0\\[rs]n\");\n" |
| 2261 |
" exit(EXIT_FAILURE);\n" |
| 2262 |
" }\n" |
| 2263 |
"\\&\n" |
| 2264 |
" close(args-E<gt>pipe_fd[0]);\n" |
| 2265 |
"\\&\n" |
| 2266 |
" /* Execute a shell command. */\n" |
| 2267 |
"\\&\n" |
| 2268 |
" printf(\"About to exec %s\\[rs]n\", args-E<gt>argv[0]);\n" |
| 2269 |
" execvp(args-E<gt>argv[0], args-E<gt>argv);\n" |
| 2270 |
" err(EXIT_FAILURE, \"execvp\");\n" |
| 2271 |
"}\n" |
| 2272 |
"\\&\n" |
| 2273 |
"#define STACK_SIZE (1024 * 1024)\n" |
| 2274 |
"\\&\n" |
| 2275 |
"static char child_stack[STACK_SIZE]; /* Space for child\\[aq]s stack */\n" |
| 2276 |
"\\&\n" |
| 2277 |
"int\n" |
| 2278 |
"main(int argc, char *argv[])\n" |
| 2279 |
"{\n" |
| 2280 |
" int flags, opt, map_zero;\n" |
| 2281 |
" pid_t child_pid;\n" |
| 2282 |
" struct child_args args;\n" |
| 2283 |
" char *uid_map, *gid_map;\n" |
| 2284 |
" const int MAP_BUF_SIZE = 100;\n" |
| 2285 |
" char map_buf[MAP_BUF_SIZE];\n" |
| 2286 |
" char map_path[PATH_MAX];\n" |
| 2287 |
"\\&\n" |
| 2288 |
" /* Parse command-line options. The initial \\[aq]+\\[aq] character in\n" |
| 2289 |
" the final getopt() argument prevents GNU-style permutation\n" |
| 2290 |
" of command-line options. That\\[aq]s useful, since sometimes\n" |
| 2291 |
" the \\[aq]command\\[aq] to be executed by this program itself\n" |
| 2292 |
" has command-line options. We don\\[aq]t want getopt() to treat\n" |
| 2293 |
" those as options to this program. */\n" |
| 2294 |
"\\&\n" |
| 2295 |
" flags = 0;\n" |
| 2296 |
" verbose = 0;\n" |
| 2297 |
" gid_map = NULL;\n" |
| 2298 |
" uid_map = NULL;\n" |
| 2299 |
" map_zero = 0;\n" |
| 2300 |
" while ((opt = getopt(argc, argv, \"+imnpuUM:G:zv\")) != -1) {\n" |
| 2301 |
" switch (opt) {\n" |
| 2302 |
" case \\[aq]i\\[aq]: flags |= CLONE_NEWIPC; break;\n" |
| 2303 |
" case \\[aq]m\\[aq]: flags |= CLONE_NEWNS; break;\n" |
| 2304 |
" case \\[aq]n\\[aq]: flags |= CLONE_NEWNET; break;\n" |
| 2305 |
" case \\[aq]p\\[aq]: flags |= CLONE_NEWPID; break;\n" |
| 2306 |
" case \\[aq]u\\[aq]: flags |= CLONE_NEWUTS; break;\n" |
| 2307 |
" case \\[aq]v\\[aq]: verbose = 1; break;\n" |
| 2308 |
" case \\[aq]z\\[aq]: map_zero = 1; break;\n" |
| 2309 |
" case \\[aq]M\\[aq]: uid_map = optarg; break;\n" |
| 2310 |
" case \\[aq]G\\[aq]: gid_map = optarg; break;\n" |
| 2311 |
" case \\[aq]U\\[aq]: flags |= CLONE_NEWUSER; break;\n" |
| 2312 |
" default: usage(argv[0]);\n" |
| 2313 |
" }\n" |
| 2314 |
" }\n" |
| 2315 |
"\\&\n" |
| 2316 |
" /* -M or -G without -U is nonsensical */\n" |
| 2317 |
"\\&\n" |
| 2318 |
" if (((uid_map != NULL || gid_map != NULL || map_zero) &&\n" |
| 2319 |
" !(flags & CLONE_NEWUSER)) ||\n" |
| 2320 |
" (map_zero && (uid_map != NULL || gid_map != NULL)))\n" |
| 2321 |
" usage(argv[0]);\n" |
| 2322 |
"\\&\n" |
| 2323 |
" args.argv = &argv[optind];\n" |
| 2324 |
"\\&\n" |
| 2325 |
" /* We use a pipe to synchronize the parent and child, in order to\n" |
| 2326 |
" ensure that the parent sets the UID and GID maps before the child\n" |
| 2327 |
" calls execve(). This ensures that the child maintains its\n" |
| 2328 |
" capabilities during the execve() in the common case where we\n" |
| 2329 |
" want to map the child\\[aq]s effective user ID to 0 in the new user\n" |
| 2330 |
" namespace. Without this synchronization, the child would lose\n" |
| 2331 |
" its capabilities if it performed an execve() with nonzero\n" |
| 2332 |
" user IDs (see the capabilities(7) man page for details of the\n" |
| 2333 |
" transformation of a process\\[aq]s capabilities during execve()). */\n" |
| 2334 |
"\\&\n" |
| 2335 |
" if (pipe(args.pipe_fd) == -1)\n" |
| 2336 |
" err(EXIT_FAILURE, \"pipe\");\n" |
| 2337 |
"\\&\n" |
| 2338 |
" /* Create the child in new namespace(s). */\n" |
| 2339 |
"\\&\n" |
| 2340 |
" child_pid = clone(childFunc, child_stack + STACK_SIZE,\n" |
| 2341 |
" flags | SIGCHLD, &args);\n" |
| 2342 |
" if (child_pid == -1)\n" |
| 2343 |
" err(EXIT_FAILURE, \"clone\");\n" |
| 2344 |
"\\&\n" |
| 2345 |
" /* Parent falls through to here. */\n" |
| 2346 |
"\\&\n" |
| 2347 |
" if (verbose)\n" |
| 2348 |
" printf(\"%s: PID of child created by clone() is %jd\\[rs]n\",\n" |
| 2349 |
" argv[0], (intmax_t) child_pid);\n" |
| 2350 |
"\\&\n" |
| 2351 |
" /* Update the UID and GID maps in the child. */\n" |
| 2352 |
"\\&\n" |
| 2353 |
" if (uid_map != NULL || map_zero) {\n" |
| 2354 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/uid_map\",\n" |
| 2355 |
" (intmax_t) child_pid);\n" |
| 2356 |
" if (map_zero) {\n" |
| 2357 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %jd 1\",\n" |
| 2358 |
" (intmax_t) getuid());\n" |
| 2359 |
" uid_map = map_buf;\n" |
| 2360 |
" }\n" |
| 2361 |
" update_map(uid_map, map_path);\n" |
| 2362 |
" }\n" |
| 2363 |
"\\&\n" |
| 2364 |
" if (gid_map != NULL || map_zero) {\n" |
| 2365 |
" proc_setgroups_write(child_pid, \"deny\");\n" |
| 2366 |
"\\&\n" |
| 2367 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/gid_map\",\n" |
| 2368 |
" (intmax_t) child_pid);\n" |
| 2369 |
" if (map_zero) {\n" |
| 2370 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\",\n" |
| 2371 |
" (intmax_t) getgid());\n" |
| 2372 |
" gid_map = map_buf;\n" |
| 2373 |
" }\n" |
| 2374 |
" update_map(gid_map, map_path);\n" |
| 2375 |
" }\n" |
| 2376 |
"\\&\n" |
| 2377 |
" /* Close the write end of the pipe, to signal to the child that we\n" |
| 2378 |
" have updated the UID and GID maps. */\n" |
| 2379 |
"\\&\n" |
| 2380 |
" close(args.pipe_fd[1]);\n" |
| 2381 |
"\\&\n" |
| 2382 |
" if (waitpid(child_pid, NULL, 0) == -1) /* Wait for child */\n" |
| 2383 |
" err(EXIT_FAILURE, \"waitpid\");\n" |
| 2384 |
"\\&\n" |
| 2385 |
" if (verbose)\n" |
| 2386 |
" printf(\"%s: terminating\\[rs]n\", argv[0]);\n" |
| 2387 |
"\\&\n" |
| 2388 |
" exit(EXIT_SUCCESS);\n" |
| 2389 |
"}\n" |
| 2390 |
msgstr "" |
| 2391 |
"/* userns_child_exec.c\n" |
| 2392 |
"\\&\n" |
| 2393 |
" Lizenziert unter der GNU General Public License v2 oder neuer\n" |
| 2394 |
"\\&\n" |
| 2395 |
" Erzeugt einen Kindprozess, der einen Shell-Befehl in einem oder mehreren\n" |
| 2396 |
" neuen Namensräumen ausführt; erlaubt UID- und GID-Abbildungen anzugeben,\n" |
| 2397 |
" wenn ein Benutzernamensraum erstellt wird\n" |
| 2398 |
"*/\n" |
| 2399 |
"#define _GNU_SOURCE\n" |
| 2400 |
"#include E<lt>err.hE<gt>\n" |
| 2401 |
"#include E<lt>sched.hE<gt>\n" |
| 2402 |
"#include E<lt>unistd.hE<gt>\n" |
| 2403 |
"#include E<lt>stdint.hE<gt>\n" |
| 2404 |
"#include E<lt>stdlib.hE<gt>\n" |
| 2405 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 2406 |
"#include E<lt>signal.hE<gt>\n" |
| 2407 |
"#include E<lt>fcntl.hE<gt>\n" |
| 2408 |
"#include E<lt>stdio.hE<gt>\n" |
| 2409 |
"#include E<lt>string.hE<gt>\n" |
| 2410 |
"#include E<lt>limits.hE<gt>\n" |
| 2411 |
"#include E<lt>errno.hE<gt>\n" |
| 2412 |
"\\&\n" |
| 2413 |
"struct child_args {\n" |
| 2414 |
" char **argv; /* Vom Kind auszuführender Befehl, mit Argumenten */\n" |
| 2415 |
" int pipe_fd[2]; /* Zur Sychronisation Eltern/Kind verwandte Pipe */\n" |
| 2416 |
"};\n" |
| 2417 |
"\\&\n" |
| 2418 |
"static int verbose;\n" |
| 2419 |
"\\&\n" |
| 2420 |
"static void\n" |
| 2421 |
"usage(char *pname)\n" |
| 2422 |
"{\n" |
| 2423 |
" fprintf(stderr, \"Aufruf: %s [Optionen] Bef [Arg…]\\[rs]n\\[rs]n\", pname);\n" |
| 2424 |
" fprintf(stderr, \"Erstellt einen Kindprozess, der einen Shellbefehl \"\n" |
| 2425 |
" \"in einem neuen Benutzernamensraum ausführt\\[rs]n\"\n" |
| 2426 |
" \"und möglicherweise auch anderen neuen Namensräumen.\\[rs]n\\[rs]n\");\n" |
| 2427 |
" fprintf(stderr, \"Optionen können sein:\\[rs]n\\[rs]n\");\n" |
| 2428 |
"#define fpe(str) fprintf(stderr, \" %s\", str);\n" |
| 2429 |
" fpe(\"-i Neuer IPC-Namensraum\\[rs]n\");\n" |
| 2430 |
" fpe(\"-m Neuer Einhänge-Namensraum\\[rs]n\");\n" |
| 2431 |
" fpe(\"-n Neuer Netzwerk-Namensraum\\[rs]n\");\n" |
| 2432 |
" fpe(\"-p Neuer PID-Namensraum\\[rs]n\");\n" |
| 2433 |
" fpe(\"-u Neuer UTS-Namensraum\\[rs]n\");\n" |
| 2434 |
" fpe(\"-U Neuer Benutzernamensraum\\[rs]n\");\n" |
| 2435 |
" fpe(\"-M uid_map Angabe einer UID-Abbildung für Benutzernamensraum\\[rs]n\");\n" |
| 2436 |
" fpe(\"-G gid_map Angabe einer GID-Abbildung für Benutzernamensraum\\[rs]n\");\n" |
| 2437 |
" fpe(\"-z Benutzer-UID und -GID auf 0 im Benutzernamensraum abbilden\\[rs]n\");\n" |
| 2438 |
" fpe(\" (äquivalent zu: -M \\[aq]0 E<lt>uidE<gt> 1\\[aq] -G \\[aq]0 E<lt>gidE<gt> 1\\[aq])\\[rs]n\");\n" |
| 2439 |
" fpe(\"-v Anzeige ausführlicher Meldungen\\[rs]n\");\n" |
| 2440 |
" fpe(\"\\[rs]n\");\n" |
| 2441 |
" fpe(\"Falls -z, -M oder -G angegeben wird, ist -U verpflichtend.\\[rs]n\");\n" |
| 2442 |
" fpe(\"Es ist nicht erlaubt, sowohl -z als auch entweder -M oder -G anzugeben.\\[rs]n\");\n" |
| 2443 |
" fpe(\"\\[rs]n\");\n" |
| 2444 |
" fpe(\"Abbildungszeichenketten für -M und -G bestehen aus Datensätzen der folgenden Form:\\[rs]n\");\n" |
| 2445 |
" fpe(\"\\en\");\n" |
| 2446 |
" fpe(\" Namensrauminterne-Kennung Namensraumexterne-Kennung Größe\\[rs]n\");\n" |
| 2447 |
" fpe(\"\\[rs]n\");\n" |
| 2448 |
" fpe(\"Eine Abbildungszeichenkette kann mehrere Datensätze enthalten,\"\n" |
| 2449 |
" \" getrennt durch Kommata;\\[rs]n\");\n" |
| 2450 |
" fpe(\"die Kommata werden vor dem Schreiben in die Abbildungsdateien durch\"\n" |
| 2451 |
" \" Zeilenumbrüche ersetzt.\\[rs]n\");\n" |
| 2452 |
"\\&\n" |
| 2453 |
" exit(EXIT_FAILURE);\n" |
| 2454 |
"}\n" |
| 2455 |
"\\&\n" |
| 2456 |
"/* Aktualisiert die Abbildungsdatei »map_file« mit dem in »mapping«\n" |
| 2457 |
" bereitgestellten Wert, einer Zeichenkette, die eine UID- oder GID-\n" |
| 2458 |
" Abbildung definiert. Eine UID- oder GID-Abbildung besteht aus einem oder\n" |
| 2459 |
" mehreren, durch Zeilenumbrüche getrennten Datensätzen der folgenden Form:\n" |
| 2460 |
"\\&\n" |
| 2461 |
" Namensrauminterne-Kennung Namensraumexterne-Kennung Größe\n" |
| 2462 |
"\\&\n" |
| 2463 |
" Für die Befehlszeile zu verlangen, dass Zeichenketten mit Zeilenumbrüchen\n" |
| 2464 |
" bereitgestellt werden, ist natürlich unbequem. Daher erlauben wir die\n" |
| 2465 |
" Verwendung von Kommata zur Begrenzung von Datensätzen in dieser\n" |
| 2466 |
" Zeichenkette und ersetzen sie vor dem Schreiben in die Datei durch\n" |
| 2467 |
" Zeilenumbrüche. */\n" |
| 2468 |
"\\&\n" |
| 2469 |
"static void\n" |
| 2470 |
"update_map(char *mapping, char *map_file)\n" |
| 2471 |
"{\n" |
| 2472 |
" int fd;\n" |
| 2473 |
" size_t map_len; /* Länge der »mapping« */\n" |
| 2474 |
"\\&\n" |
| 2475 |
" /* Kommata durch Zeilenumbrüche in Abbildungszeichenkette ersetzen. */\n" |
| 2476 |
"\\&\n" |
| 2477 |
" map_len = strlen(mapping);\n" |
| 2478 |
" for (size_t j = 0; j E<lt> map_len; j++)\n" |
| 2479 |
" if (mapping[j] == \\[aq],\\[aq])\n" |
| 2480 |
" mapping[j] = \\[aq]\\[rs]n\\[aq];\n" |
| 2481 |
"\\&\n" |
| 2482 |
" fd = open(map_file, O_RDWR);\n" |
| 2483 |
" if (fd == -1) {\n" |
| 2484 |
" fprintf(stderr, \"FEHLER: open %s: %s\\[rs]n\", map_file,\n" |
| 2485 |
" strerror(errno));\n" |
| 2486 |
" exit(EXIT_FAILURE);\n" |
| 2487 |
" }\n" |
| 2488 |
"\\&\n" |
| 2489 |
" if (write(fd, mapping, map_len) != map_len) {\n" |
| 2490 |
" fprintf(stderr, \"FEHLER: write %s: %s\\en\", map_file,\n" |
| 2491 |
" strerror(errno));\n" |
| 2492 |
" exit(EXIT_FAILURE);\n" |
| 2493 |
" }\n" |
| 2494 |
"\\&\n" |
| 2495 |
" close(fd);\n" |
| 2496 |
"}\n" |
| 2497 |
"\\&\n" |
| 2498 |
"/* Linux 3.19 änderte die Handhabung von setgroups(2) und die Datei\n" |
| 2499 |
" »gid_map«, um ein Sicherheitsproblem zu adressieren. Das Problem erlaubte\n" |
| 2500 |
" *nicht privilegierten* Benutzern einen Benutzernamensraum einzusetzen, um\n" |
| 2501 |
" Gruppen abzugeben. Das Fazit der 3.19er Änderung ist, dass die Verwendung\n" |
| 2502 |
" des Systemaufrufs setgroups() in diesem Benutzernamensraum zuerst durch\n" |
| 2503 |
" Schreiben von »deny« in eine der Dateien /proc/PID/setgroups für diesen\n" |
| 2504 |
" Namensraum erfolgen muss, damit die Datei »gid_maps« aktualisert wird.\n" |
| 2505 |
" Das ist der Zweck der folgenden Funktion. */\n" |
| 2506 |
"\\&\n" |
| 2507 |
"static void\n" |
| 2508 |
"proc_setgroups_write(pid_t child_pid, char *str)\n" |
| 2509 |
"{\n" |
| 2510 |
" char setgroups_path[PATH_MAX];\n" |
| 2511 |
" int fd;\n" |
| 2512 |
"\\&\n" |
| 2513 |
" snprintf(setgroups_path, PATH_MAX, \"/proc/%jd/setgroups\",\n" |
| 2514 |
" (intmax_t) child_pid);\n" |
| 2515 |
"\\&\n" |
| 2516 |
" fd = open(setgroups_path, O_RDWR);\n" |
| 2517 |
" if (fd == -1) {\n" |
| 2518 |
"\\&\n" |
| 2519 |
" /* Vielleicht sind wir auf einem System, das /proc/PID/setgroups\n" |
| 2520 |
" nicht unterstützt. Dann wird diese Datei nicht existieren und das\n" |
| 2521 |
" System wird nicht die Beschränkungen erzwingen, die Linux 3.19\n" |
| 2522 |
" hinzugefügt hat. Das ist OK, wir brauchen nichts zu machen, damit\n" |
| 2523 |
" »gid_map« aktualisiert wird.\n" |
| 2524 |
"\\&\n" |
| 2525 |
" Falls allerdings der Fehler von open() sich von ENOENT\n" |
| 2526 |
" unterscheidet (der in diesem Fall zu erwarten ist), informieren\n" |
| 2527 |
" wir den Benutzer. */\n" |
| 2528 |
"\\&\n" |
| 2529 |
" if (errno != ENOENT)\n" |
| 2530 |
" fprintf(stderr, \"FEHLER: open %s: %s\\[rs]n\", setgroups_path,\n" |
| 2531 |
" strerror(errno));\n" |
| 2532 |
" return;\n" |
| 2533 |
" }\n" |
| 2534 |
"\\&\n" |
| 2535 |
" if (write(fd, str, strlen(str)) == -1)\n" |
| 2536 |
" fprintf(stderr, \"FEHLER: write %s: %s\\[rs]n\", setgroups_path,\n" |
| 2537 |
" strerror(errno));\n" |
| 2538 |
"\\&\n" |
| 2539 |
" close(fd);\n" |
| 2540 |
"}\n" |
| 2541 |
"\\&\n" |
| 2542 |
"static int /* Funktion für geklontes Kind starten */\n" |
| 2543 |
"childFunc(void *arg)\n" |
| 2544 |
"{\n" |
| 2545 |
" struct child_args *args = arg;\n" |
| 2546 |
" char ch;\n" |
| 2547 |
"\\&\n" |
| 2548 |
" /* Warten, bis der Elternprozess seine UID- und GID-Abbildungen\n" |
| 2549 |
" aktualisiert hat. Siehe den Kommentar in main(). Wir warten, bis\n" |
| 2550 |
" auf einer Pipe das Dateiende kommt, die vom Elternprozess geschlossen\n" |
| 2551 |
" wird, sobald er seine Abbildungen aktualisiert hat. */\n" |
| 2552 |
"\\&\n" |
| 2553 |
" close(args-E<gt>pipe_fd[1]); /* Unseren Deskriptor für das Ende des\n" |
| 2554 |
" Schreibens schließen, so dass wir EOF\n" |
| 2555 |
" sehen, wenn der Elternprozess seinen\n" |
| 2556 |
" Deskriptor schließt. */\n" |
| 2557 |
" if (read(args-E<gt>pipe_fd[0], &ch, 1) != 0) {\n" |
| 2558 |
" fprintf(stderr,\n" |
| 2559 |
" \"Fehler im Kind: Lesen von der Pipe lieferte != 0\\[rs]n\");\n" |
| 2560 |
" exit(EXIT_FAILURE);\n" |
| 2561 |
" }\n" |
| 2562 |
"\\&\n" |
| 2563 |
" close(args-E<gt>pipe_fd[0]);\n" |
| 2564 |
"\\&\n" |
| 2565 |
" /* Einen Shell-Befehl ausführen. */\n" |
| 2566 |
"\\&\n" |
| 2567 |
" printf(\"Gleich wird exec %s ausgeführt\\[rs]n\", args-E<gt>argv[0]);\n" |
| 2568 |
" execvp(args-E<gt>argv[0], args-E<gt>argv);\n" |
| 2569 |
" err(EXIT_FAILURE, \"execvp\");\n" |
| 2570 |
"}\n" |
| 2571 |
"\\&\n" |
| 2572 |
"#define STACK_SIZE (1024 * 1024)\n" |
| 2573 |
"\\&\n" |
| 2574 |
"static char child_stack[STACK_SIZE]; /* Platz für den Stack des Kindes */\n" |
| 2575 |
"\\&\n" |
| 2576 |
"int\n" |
| 2577 |
"main(int argc, char *argv[])\n" |
| 2578 |
"{\n" |
| 2579 |
" int flags, opt, map_zero;\n" |
| 2580 |
" pid_t child_pid;\n" |
| 2581 |
" struct child_args args;\n" |
| 2582 |
" char *uid_map, *gid_map;\n" |
| 2583 |
" const int MAP_BUF_SIZE = 100;\n" |
| 2584 |
" char map_buf[MAP_BUF_SIZE];\n" |
| 2585 |
" char map_path[PATH_MAX];\n" |
| 2586 |
"\\&\n" |
| 2587 |
" /* Befehlszeilenoptionen auswerten. Das anfängliche »+«-Zeichen in dem\n" |
| 2588 |
" abschließenden getopt()-Argument verhindert GNU-artige Vertauschungen\n" |
| 2589 |
" der Befehlszeilenoptionen. Das ist nützlich, da manchmal der von\n" |
| 2590 |
" diesem Programm selbst ausgeführte »Befehl« über Befehlszeilenoptionen\n" |
| 2591 |
" verfügt. Wir wollen nicht, dass getopt() solche als Optionen für\n" |
| 2592 |
" dieses Programm behandelt. */\n" |
| 2593 |
"\\&\n" |
| 2594 |
" flags = 0;\n" |
| 2595 |
" verbose = 0;\n" |
| 2596 |
" gid_map = NULL;\n" |
| 2597 |
" uid_map = NULL;\n" |
| 2598 |
" map_zero = 0;\n" |
| 2599 |
" while ((opt = getopt(argc, argv, \"+imnpuUM:G:zv\")) != -1) {\n" |
| 2600 |
" switch (opt) {\n" |
| 2601 |
" case \\[aq]i\\[aq]: flags |= CLONE_NEWIPC; break;\n" |
| 2602 |
" case \\[aq]m\\[aq]: flags |= CLONE_NEWNS; break;\n" |
| 2603 |
" case \\[aq]n\\[aq]: flags |= CLONE_NEWNET; break;\n" |
| 2604 |
" case \\[aq]p\\[aq]: flags |= CLONE_NEWPID; break;\n" |
| 2605 |
" case \\[aq]u\\[aq]: flags |= CLONE_NEWUTS; break;\n" |
| 2606 |
" case \\[aq]v\\[aq]: verbose = 1; break;\n" |
| 2607 |
" case \\[aq]z\\[aq]: map_zero = 1; break;\n" |
| 2608 |
" case \\[aq]M\\[aq]: uid_map = optarg; break;\n" |
| 2609 |
" case \\[aq]G\\[aq]: gid_map = optarg; break;\n" |
| 2610 |
" case \\[aq]U\\[aq]: flags |= CLONE_NEWUSER; break;\n" |
| 2611 |
" default: usage(argv[0]);\n" |
| 2612 |
" }\n" |
| 2613 |
" }\n" |
| 2614 |
"\\&\n" |
| 2615 |
" /* -M oder -G ohne -U ist sinnlos */\n" |
| 2616 |
"\\&\n" |
| 2617 |
" if (((uid_map != NULL || gid_map != NULL || map_zero) &&\n" |
| 2618 |
" !(flags & CLONE_NEWUSER)) ||\n" |
| 2619 |
" (map_zero && (uid_map != NULL || gid_map != NULL)))\n" |
| 2620 |
" usage(argv[0]);\n" |
| 2621 |
"\\&\n" |
| 2622 |
" args.argv = &argv[optind];\n" |
| 2623 |
"\\&\n" |
| 2624 |
" /* Wir verwenden eine Pipe, um den Eltern- und Kindprozess zu\n" |
| 2625 |
" synchronisieren, damit sichergestellt wird, dass der Elternprozess\n" |
| 2626 |
" die UID- und GID-Abbildungen einrichtet, bevor der Kindprozess\n" |
| 2627 |
" execve() aufruft. Dies stellt sicher, dass das Kind seine Capabilitys\n" |
| 2628 |
" während des execve() erhält, wenn der typische Fall vorliegt, dass\n" |
| 2629 |
" wir möchten, dass die effektive Benutzerkennung des Kindprozesses auf\n" |
| 2630 |
" 0 in dem neuen Benutzernamensraum abgebildet wird. Ohne diese\n" |
| 2631 |
" Synchronisation würde der Kindprozess seine Capabilitys verlieren,\n" |
| 2632 |
" falls es ein execve() mit einer von Null verschiedenen Benutzerkennung\n" |
| 2633 |
" durchführen würde (siehe die Handbuchseite capabilities(7) für Details\n" |
| 2634 |
" des Übergangs der Capabilitys eines Prozesses während execve()). */\n" |
| 2635 |
"\\&\n" |
| 2636 |
" if (pipe(args.pipe_fd) == -1)\n" |
| 2637 |
" err(EXIT_FAILURE, \"pipe\");\n" |
| 2638 |
"\\&\n" |
| 2639 |
" /* Den Kindprozess in dem oder den neuen Namensraum/-räumen erstellen. */\n" |
| 2640 |
"\\&\n" |
| 2641 |
" child_pid = clone(childFunc, child_stack + STACK_SIZE,\n" |
| 2642 |
" flags | SIGCHLD, &args);\n" |
| 2643 |
" if (child_pid == -1)\n" |
| 2644 |
" err(EXIT_FAILURE, \"clone\");\n" |
| 2645 |
"\\&\n" |
| 2646 |
" /* Elternprozess fällt bis hierher durch. */\n" |
| 2647 |
"\\&\n" |
| 2648 |
" if (verbose)\n" |
| 2649 |
" printf(\"%s: PID des durch clone() erstellten Kindprozesses lautet %jd\\[rs]n\",\n" |
| 2650 |
" argv[0], (intmax_t) child_pid);\n" |
| 2651 |
"\\&\n" |
| 2652 |
" /* Die UID- und GID-Abbildungen in dem Kindprozess aktualisieren. */\n" |
| 2653 |
"\\&\n" |
| 2654 |
" if (uid_map != NULL || map_zero) {\n" |
| 2655 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/uid_map\",\n" |
| 2656 |
" (intmax_t) child_pid);\n" |
| 2657 |
" if (map_zero) {\n" |
| 2658 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %jd 1\",\n" |
| 2659 |
" (intmax_t) getuid());\n" |
| 2660 |
" uid_map = map_buf;\n" |
| 2661 |
" }\n" |
| 2662 |
" update_map(uid_map, map_path);\n" |
| 2663 |
" }\n" |
| 2664 |
"\\&\n" |
| 2665 |
" if (gid_map != NULL || map_zero) {\n" |
| 2666 |
" proc_setgroups_write(child_pid, \"deny\");\n" |
| 2667 |
"\\&\n" |
| 2668 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/gid_map\",\n" |
| 2669 |
" (intmax_t) child_pid);\n" |
| 2670 |
" if (map_zero) {\n" |
| 2671 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\",\n" |
| 2672 |
" (intmax_t) getgid());\n" |
| 2673 |
" gid_map = map_buf;\n" |
| 2674 |
" }\n" |
| 2675 |
" update_map(gid_map, map_path);\n" |
| 2676 |
" }\n" |
| 2677 |
"\\&\n" |
| 2678 |
" /* Das Schreibe-Ende der Pipe schließen, um dem Kindprozess zu\n" |
| 2679 |
" signalisieren, dass wir die UID- und GID-Abbildungen aktualisiert\n" |
| 2680 |
" haben. */\n" |
| 2681 |
"\\&\n" |
| 2682 |
" close(args.pipe_fd[1]);\n" |
| 2683 |
"\\&\n" |
| 2684 |
" if (waitpid(child_pid, NULL, 0) == -1) /* Warten auf Kindprozess */\n" |
| 2685 |
" err(EXIT_FAILURE, \"waitpid\");\n" |
| 2686 |
"\\&\n" |
| 2687 |
" if (verbose)\n" |
| 2688 |
" printf(\"%s: beende\\[rs]n\", argv[0]);\n" |
| 2689 |
"\\&\n" |
| 2690 |
" exit(EXIT_SUCCESS);\n" |
| 2691 |
"}\n" |
| 2692 |
|
| 2693 |
#. type: SH |
| 2694 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2695 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2696 |
#, no-wrap |
| 2697 |
msgid "SEE ALSO" |
| 2698 |
msgstr "SIEHE AUCH" |
| 2699 |
|
| 2700 |
#. From the shadow package |
| 2701 |
#. From the shadow package |
| 2702 |
#. From the shadow package |
| 2703 |
#. From the shadow package |
| 2704 |
#. type: Plain text |
| 2705 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2706 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2707 |
msgid "" |
| 2708 |
"B<newgidmap>(1), B<newuidmap>(1), B<clone>(2), B<ptrace>(2), B<setns>(2), " |
| 2709 |
"B<unshare>(2), B<proc>(5), B<subgid>(5), B<subuid>(5), B<capabilities>(7), " |
| 2710 |
"B<cgroup_namespaces>(7), B<credentials>(7), B<namespaces>(7), " |
| 2711 |
"B<pid_namespaces>(7)" |
| 2712 |
msgstr "" |
| 2713 |
"B<newgidmap>(1), B<newuidmap>(1), B<clone>(2), B<ptrace>(2), B<setns>(2), " |
| 2714 |
"B<unshare>(2), B<proc>(5), B<subgid>(5), B<subuid>(5), B<capabilities>(7), " |
| 2715 |
"B<cgroup_namespaces>(7), B<credentials>(7), B<namespaces>(7), " |
| 2716 |
"B<pid_namespaces>(7)" |
| 2717 |
|
| 2718 |
#. type: Plain text |
| 2719 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2720 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2721 |
msgid "" |
| 2722 |
"The kernel source file I<Documentation/admin-guide/namespaces/resource-" |
| 2723 |
"control.rst>." |
| 2724 |
msgstr "" |
| 2725 |
"Die Kernelquelldatei I<Documentation/admin-guide/namespaces/resource-" |
| 2726 |
"control.rst>." |
| 2727 |
|
| 2728 |
#. type: TH |
| 2729 |
#: debian-trixie |
| 2730 |
#, no-wrap |
| 2731 |
msgid "2024-06-15" |
| 2732 |
msgstr "15. Juni 2024" |
| 2733 |
|
| 2734 |
#. type: TH |
| 2735 |
#: debian-trixie |
| 2736 |
#, no-wrap |
| 2737 |
msgid "Linux man-pages 6.9.1" |
| 2738 |
msgstr "Linux man-pages 6.9.1" |
| 2739 |
|
| 2740 |
#. type: Plain text |
| 2741 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2742 |
msgid "" |
| 2743 |
"User namespaces can be nested; that is, each user namespace\\[em]except the " |
| 2744 |
"initial (\"root\") namespace\\[em]has a parent user namespace, and can have " |
| 2745 |
"zero or more child user namespaces. The parent user namespace is the user " |
| 2746 |
"namespace of the process that creates the user namespace via a call to " |
| 2747 |
"B<unshare>(2) or B<clone>(2) with the B<CLONE_NEWUSER> flag." |
| 2748 |
msgstr "" |
| 2749 |
"Benutzernamensräume können verschachtelt werden, das bedeutet, dass jeder " |
| 2750 |
"Benutzernamensraum\\[en]außer dem anfänglichen (»Wurzel-«)Namensraum\\" |
| 2751 |
"[en]über einen Vorgängernamensraum verfügt und keinen oder mehrere " |
| 2752 |
"Nachfolgernamensräume haben kann. Der Vorgängernamensraum ist der " |
| 2753 |
"Benutzernamensraum des Prozesses, der den Benutzernamensraum mittels eines " |
| 2754 |
"Aufrufs von B<unshare>(2) oder B<clone>(2) mit dem Schalter B<CLONE_NEWUSER> " |
| 2755 |
"erstellte." |
| 2756 |
|
| 2757 |
#. commit 8742f229b635bf1c1c84a3dfe5e47c814c20b5c8 |
| 2758 |
#. FIXME Explain the rationale for this limit. (What is the rationale?) |
| 2759 |
#. type: Plain text |
| 2760 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2761 |
msgid "" |
| 2762 |
"The kernel imposes (since Linux 3.11) a limit of 32 nested levels of user " |
| 2763 |
"namespaces. Calls to B<unshare>(2) or B<clone>(2) that would cause this " |
| 2764 |
"limit to be exceeded fail with the error B<EUSERS>." |
| 2765 |
msgstr "" |
| 2766 |
"(Seit Linux 3.11) erzwingt der Kernel eine Begrenzung von 32 verschachtelten " |
| 2767 |
"Stufen an Benutzernamensräumen. Aufrufe an B<unshare>(2) oder B<clone>(2), " |
| 2768 |
"die zum Überschreiten dieser Begrenzung führen würden, schlagen mit dem " |
| 2769 |
"Fehler B<EUSERS> fehl." |
| 2770 |
|
| 2771 |
# |
| 2772 |
#. ============================================================ |
| 2773 |
#. type: Plain text |
| 2774 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2775 |
msgid "" |
| 2776 |
"A task that changes one of its effective IDs will have its dumpability reset " |
| 2777 |
"to the value in I</proc/sys/fs/suid_dumpable>. This may affect the " |
| 2778 |
"ownership of proc files of child processes and may thus cause the parent to " |
| 2779 |
"lack the permissions to write to mapping files of child processes running in " |
| 2780 |
"a new user namespace. In such cases making the parent process dumpable, " |
| 2781 |
"using B<PR_SET_DUMPABLE> in a call to B<prctl>(2), before creating a child " |
| 2782 |
"process in a new user namespace may rectify this problem. See B<prctl>(2) " |
| 2783 |
"and B<proc>(5) for details on how ownership is affected." |
| 2784 |
msgstr "" |
| 2785 |
"Ein Task, der eine seiner effektiven Kennungen ändert, bekommt sein " |
| 2786 |
"»dumpable« auf den in I</proc/sys/fs/suid_dumpable> angegebenen Wert " |
| 2787 |
"zurückgesetzt. Dies kann die Eigentümerschaft von Proc-Dateien von " |
| 2788 |
"Kindprozessen betreffen und kann daher dazu führen, dass dem Elternprozess " |
| 2789 |
"Berechtigungen fehlen, um in Mapping-Dateien des Kindprozesses, die in neuen " |
| 2790 |
"Benutzernamensräumen ausgeführt werden, zu schreiben. Das Problem kann " |
| 2791 |
"korrigiert werden, indem in diesen Fällen der Elternprozess mittels " |
| 2792 |
"B<PR_SET_DUMPABLE> in einem Aufruf von B<prctl>(2) vor der Erstellung des " |
| 2793 |
"Kindprozesses in einem neuen Benutzernamensraum »dumpable« gemacht wird. " |
| 2794 |
"Siehe B<prctl>(2) und B<proc>(5) zu Details wie die Eigentümerschaft " |
| 2795 |
"betroffen ist." |
| 2796 |
|
| 2797 |
#. type: Plain text |
| 2798 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2799 |
msgid "" |
| 2800 |
"A call to B<clone>(2) or B<unshare>(2) using the B<CLONE_NEWUSER> flag or " |
| 2801 |
"a call to B<setns>(2) that moves the caller into another user namespace " |
| 2802 |
"sets the \"securebits\" flags (see B<capabilities>(7)) to their default " |
| 2803 |
"values (all flags disabled) in the child (for B<clone>(2)) or caller (for " |
| 2804 |
"B<unshare>(2) or B<setns>(2)). Note that because the caller no longer has " |
| 2805 |
"capabilities in its original user namespace after a call to B<setns>(2), it " |
| 2806 |
"is not possible for a process to reset its \"securebits\" flags while " |
| 2807 |
"retaining its user namespace membership by using a pair of B<setns>(2) " |
| 2808 |
"calls to move to another user namespace and then return to its original user " |
| 2809 |
"namespace." |
| 2810 |
msgstr "" |
| 2811 |
"Ein Aufruf von B<clone>(2) oder B<unshare>(2) mit dem Schalter " |
| 2812 |
"B<CLONE_NEWUSER> oder ein Aufruf von B<setns>(2), der den Aufrufenden in " |
| 2813 |
"einen anderen Benutzernamensraum verschiebt, setzt die Schalter »securebits« " |
| 2814 |
"(siehe B<capabilities>(7)) im Kind (für B<clone>(2)) oder dem Aufrufenden " |
| 2815 |
"(für B<unshare>(2) oder B<setns>(2)) auf ihre Vorgabewerte (alle Schalter " |
| 2816 |
"deaktiviert). Beachten Sie, dass der Aufrufende nach einem Aufruf von " |
| 2817 |
"B<setns>(2) keine Capabilitys in seinem ursprünglichen Benutzernamensraum " |
| 2818 |
"mehr hat und es daher für einen Prozess nicht möglich ist, seine Schalter " |
| 2819 |
"»securebits« zurückzusetzen und gleichzeitig seine Mitgliedschaft im " |
| 2820 |
"Benutzernamensraum zu erhalten, indem ein Paar von B<setns>(2)-Aufrufen " |
| 2821 |
"verwandt wird, um sich in einen anderen Benutzernamensraum zu verschieben " |
| 2822 |
"und dann zu seinem ursprünglichen Namensraum zurückzukehren." |
| 2823 |
|
| 2824 |
# FIXME Ist »removed descendant« korrekt übersetzt? |
| 2825 |
#. type: Plain text |
| 2826 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2827 |
msgid "" |
| 2828 |
"If a process has a capability in a user namespace, then it has that " |
| 2829 |
"capability in all child (and further removed descendant) namespaces as well." |
| 2830 |
msgstr "" |
| 2831 |
"Falls ein Prozess eine Capability in einem Benutzernamensraum hat, dann hat " |
| 2832 |
"es diese Capability in allen nachfolgenden (und weiter entfernten " |
| 2833 |
"Nachfolge-) Namensräumen ebenfalls." |
| 2834 |
|
| 2835 |
#. type: Plain text |
| 2836 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2837 |
msgid "" |
| 2838 |
"Having a capability inside a user namespace permits a process to perform " |
| 2839 |
"operations (that require privilege) only on resources governed by that " |
| 2840 |
"namespace. In other words, having a capability in a user namespace permits " |
| 2841 |
"a process to perform privileged operations on resources that are governed by " |
| 2842 |
"(nonuser) namespaces owned by (associated with) the user namespace (see the " |
| 2843 |
"next subsection)." |
| 2844 |
msgstr "" |
| 2845 |
"Hat ein Prozess eine Capability innerhalb eines Benutzernamensraums, dann " |
| 2846 |
"darf er Aktionen nur auf Ressourcen anwenden (die Privilegien benötigen), " |
| 2847 |
"die durch diesen Namensraum reguliert werden. Mit anderen Worten erlaubt " |
| 2848 |
"eine Capability in einem Benutzernamensraum einem Prozess, privilegierte " |
| 2849 |
"Aktionen auf Ressourcen durchzuführen, die durch (Nichtbenutzer-)Namensräume " |
| 2850 |
"gelenkt werden, die den Benutzernamensräumen gehören bzw. diesen zugeordnet " |
| 2851 |
"sind (siehe den nächsten Unterabschnitt)." |
| 2852 |
|
| 2853 |
#. type: Plain text |
| 2854 |
#: debian-trixie |
| 2855 |
msgid "" |
| 2856 |
"Holding B<CAP_SYS_ADMIN> within the user namespace that owns a process's " |
| 2857 |
"cgroup namespace allows (since Linux 4.6) that process to the mount the " |
| 2858 |
"cgroup version 2 filesystem and cgroup version 1 named hierarchies (i.e., " |
| 2859 |
"cgroup filesystems mounted with the I<\\[dq]none,name=\\[dq]> option)." |
| 2860 |
msgstr "" |
| 2861 |
"Wenn ein Prozess B<CAP_SYS_ADMIN> innerhalb eines Namensraums hält, der den " |
| 2862 |
"Cgroup-Namensraum des Prozesses besitzt, dann kann er (seit Linux 4.6) das " |
| 2863 |
"Cgroup-Version-2-Dateisystem und die benannten Cgroup-Version-1-Hierarchien " |
| 2864 |
"(d.h. Cgroup-Dateisysteme, die mit der Option I<»none,name=«> eingehängt " |
| 2865 |
"sind) einhängen." |
| 2866 |
|
| 2867 |
# |
| 2868 |
#. ============================================================ |
| 2869 |
#. type: Plain text |
| 2870 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2871 |
msgid "" |
| 2872 |
"Note, however, that mounting block-based filesystems can be done only by a " |
| 2873 |
"process that holds B<CAP_SYS_ADMIN> in the initial user namespace." |
| 2874 |
msgstr "" |
| 2875 |
"Beachten Sie, dass das Einhängen blockbasierter Dateisysteme nur von " |
| 2876 |
"Prozessen erfolgen kann, die B<CAP_SYS_ADMIN> in dem anfänglichen " |
| 2877 |
"Benutzernamensraum enthalten." |
| 2878 |
|
| 2879 |
#. type: Plain text |
| 2880 |
#: debian-trixie |
| 2881 |
msgid "" |
| 2882 |
"Starting in Linux 3.8, unprivileged processes can create user namespaces, " |
| 2883 |
"and the other types of namespaces can be created with just the " |
| 2884 |
"B<CAP_SYS_ADMIN> capability in the caller's user namespace." |
| 2885 |
msgstr "" |
| 2886 |
"Seit Linux 3.8 können nicht privilegierte Prozesse Benutzernamensräume " |
| 2887 |
"erstellen und andere Arten von Namensräumen können nur mit der Capability " |
| 2888 |
"B<CAP_SYS_ADMIN> im Benutzernamensraum des Aufrufenden erstellt werden." |
| 2889 |
|
| 2890 |
#. type: Plain text |
| 2891 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2892 |
msgid "" |
| 2893 |
"When a new namespace (other than a user namespace) is created via " |
| 2894 |
"B<clone>(2) or B<unshare>(2), the kernel records the user namespace of the " |
| 2895 |
"creating process as the owner of the new namespace. (This association can't " |
| 2896 |
"be changed.) When a process in the new namespace subsequently performs " |
| 2897 |
"privileged operations that operate on global resources isolated by the " |
| 2898 |
"namespace, the permission checks are performed according to the process's " |
| 2899 |
"capabilities in the user namespace that the kernel associated with the new " |
| 2900 |
"namespace. For example, suppose that a process attempts to change the " |
| 2901 |
"hostname (B<sethostname>(2)), a resource governed by the UTS namespace. In " |
| 2902 |
"this case, the kernel will determine which user namespace owns the process's " |
| 2903 |
"UTS namespace, and check whether the process has the required capability " |
| 2904 |
"(B<CAP_SYS_ADMIN>) in that user namespace." |
| 2905 |
msgstr "" |
| 2906 |
"Wenn ein neuer Namensraum (der kein Benutzernamensraum ist) mittels " |
| 2907 |
"B<clone>(2) oder B<unshare>(2) erstellt wird, zeichnet der Kernel den " |
| 2908 |
"Benutzernamensraum des erstellenden Prozesses als Eigentümer des neuen " |
| 2909 |
"Namensraums auf. (Diese Zuordnung kann nicht geändert werden). Wenn " |
| 2910 |
"nachfolgend ein Prozess in dem neuen Namensraum eine privilegierte Aktion " |
| 2911 |
"durchführt, die auf globalen Ressourcen agiert, die durch den Namensraum " |
| 2912 |
"isoliert werden, dann erfolgen die Berechtigungsprüfungen gemäß der " |
| 2913 |
"Capabilitys des Prozesses in dem Benutzernamensraum, den der Kernel dem " |
| 2914 |
"neuen Namensraum zuordnet. Wird beispielsweise angenommen, dass ein Prozess " |
| 2915 |
"versucht, den Rechnernamen, eine durch UTS-Namensräume regulierte Ressource, " |
| 2916 |
"zu ändern (B<sethostname>(2)), dann wird der Kernel bestimmen, welchem " |
| 2917 |
"Benutzernamensraum der UTS-Namensraum des Prozesses gehört und prüfen, ob " |
| 2918 |
"der Prozess über die benötigte Capability (B<CAP_SYS_ADMIN>) in diesem " |
| 2919 |
"Benutzernamensraum verfügt." |
| 2920 |
|
| 2921 |
#. type: Plain text |
| 2922 |
#: debian-trixie |
| 2923 |
msgid "" |
| 2924 |
"Each line in the I<uid_map> file specifies a 1-to-1 mapping of a range of " |
| 2925 |
"contiguous user IDs between two user namespaces. (When a user namespace is " |
| 2926 |
"first created, this file is empty.) The specification in each line takes " |
| 2927 |
"the form of three numbers delimited by white space. The first two numbers " |
| 2928 |
"specify the starting user ID in each of the two user namespaces. The third " |
| 2929 |
"number specifies the length of the mapped range. In detail, the fields are " |
| 2930 |
"interpreted as follows:" |
| 2931 |
msgstr "" |
| 2932 |
"Jede Zeile der Datei I<uid_map> legt eine 1-zu-1-Abbildung des Bereichs " |
| 2933 |
"fortlaufender Benutzerkennungen zwischen zwei Benutzernamensräumen fest. " |
| 2934 |
"(Wenn ein Benutzernamensraum erstmalig erstellt wird, ist diese Datei leer.) " |
| 2935 |
"Die Festlegung in jeder Zeile hat die Form von drei durch Leerraum " |
| 2936 |
"getrennten Zahlen. Die ersten zwei Zahlen geben die am Anfang befindliche " |
| 2937 |
"Benutzerkennung in jedem der zwei Benutzernamensräume an. Die dritte Zahl " |
| 2938 |
"gibt die Länge des abgebildeten Bereichs an. Im Detail werden die Felder wie " |
| 2939 |
"folgt interpretiert:" |
| 2940 |
|
| 2941 |
#. type: Plain text |
| 2942 |
#: debian-trixie |
| 2943 |
msgid "" |
| 2944 |
"The length of the range of user IDs that is mapped between the two user " |
| 2945 |
"namespaces." |
| 2946 |
msgstr "" |
| 2947 |
"Die Länge des Bereichs von Benutzerkennungen, die zwischen den zwei " |
| 2948 |
"Benutzernamensräumen abgebildet wird." |
| 2949 |
|
| 2950 |
#. type: Plain text |
| 2951 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2952 |
msgid "" |
| 2953 |
"The initial user namespace has no parent namespace, but, for consistency, " |
| 2954 |
"the kernel provides dummy user and group ID mapping files for this " |
| 2955 |
"namespace. Looking at the I<uid_map> file (I<gid_map> is the same) from a " |
| 2956 |
"shell in the initial namespace shows:" |
| 2957 |
msgstr "" |
| 2958 |
"Der anfängliche Benutzernamensraum hat keinen Vorgängernamensraum. Aus " |
| 2959 |
"Konsistenzgründen stellt der Kernel Pseudo-Benutzer- und " |
| 2960 |
"-Gruppenkennungsabbildungsdateien für diesen Namensraum bereit. Wird vom " |
| 2961 |
"anfänglichen Namensraum aus auf die Datei I<uid_map> (I<gid_map> ist " |
| 2962 |
"identisch) geschaut, ergibt sich:" |
| 2963 |
|
| 2964 |
#. type: Plain text |
| 2965 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2966 |
#, no-wrap |
| 2967 |
msgid "" |
| 2968 |
"$ B<cat /proc/$$/uid_map>\n" |
| 2969 |
" 0 0 4294967295\n" |
| 2970 |
msgstr "" |
| 2971 |
"$ B<cat /proc/$$/uid_map>\n" |
| 2972 |
" 0 0 4294967295\n" |
| 2973 |
|
| 2974 |
# |
| 2975 |
#. ============================================================ |
| 2976 |
#. type: Plain text |
| 2977 |
#: debian-trixie |
| 2978 |
msgid "" |
| 2979 |
"This mapping tells us that the range starting at user ID 0 in this namespace " |
| 2980 |
"maps to a range starting at 0 in the (nonexistent) parent namespace, and the " |
| 2981 |
"length of the range is the largest 32-bit unsigned integer. This leaves " |
| 2982 |
"4294967295 (the 32-bit signed -1 value) unmapped. This is deliberate: " |
| 2983 |
"I<(uid_t)\\ -1> is used in several interfaces (e.g., B<setreuid>(2)) as a " |
| 2984 |
"way to specify \"no user ID\". Leaving I<(uid_t)\\ -1> unmapped and " |
| 2985 |
"unusable guarantees that there will be no confusion when using these " |
| 2986 |
"interfaces." |
| 2987 |
msgstr "" |
| 2988 |
"Diese Abbildung teilt uns mit, dass der Bereich bei der Benutzerkennung 0 in " |
| 2989 |
"diesem Namensraum auf den Bereich beginnend bei 0 in dem (nicht " |
| 2990 |
"existierenden) Vorgängernamensraum abgebildet ist und die Länge des Bereichs " |
| 2991 |
"die größte vorzeichenlose 32-bit-Ganzzahl ist. Dies lässt 4294967295 (der " |
| 2992 |
"vorzeichenbehaftete 32-bit-Wert) nicht abgebildet. Dies ist absichtlich: " |
| 2993 |
"I<(uid_t)\\ -1> wird von einer Reihe von Schnittstellen (z.B. " |
| 2994 |
"B<setreuid>(2)) dazu verwandt, »keine Benutzerkennung« festzulegen. Da " |
| 2995 |
"I<(uid_t)\\ -1> nicht abgebildet und unbenutzbar ist, wird sichergestellt, " |
| 2996 |
"dass es keine Verwirrung bei der Verwendung dieser Schnittstellen gibt." |
| 2997 |
|
| 2998 |
#. 5*12-byte records could fit in a 64B cache line |
| 2999 |
#. commit 6397fac4915ab3002dc15aae751455da1a852f25 |
| 3000 |
#. type: Plain text |
| 3001 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3002 |
msgid "" |
| 3003 |
"There is a limit on the number of lines in the file. In Linux 4.14 and " |
| 3004 |
"earlier, this limit was (arbitrarily) set at 5 lines. Since Linux 4.15, " |
| 3005 |
"the limit is 340 lines. In addition, the number of bytes written to the " |
| 3006 |
"file must be less than the system page size, and the write must be performed " |
| 3007 |
"at the start of the file (i.e., B<lseek>(2) and B<pwrite>(2) can't be used " |
| 3008 |
"to write to nonzero offsets in the file)." |
| 3009 |
msgstr "" |
| 3010 |
"Es gibt eine Beschränkung bezüglich der Anzahl der Zeilen in der Datei. In " |
| 3011 |
"Linux 4.14 und älter war diese Beschränkung (willkürlich) auf 5 Zeilen " |
| 3012 |
"gesetzt. Seit Linux 4.15 ist diese Beschränkung 340 Zeilen. Zusätzlich muss " |
| 3013 |
"die Anzahl an in diese Datei geschriebenen Bytes kleiner als die Seitengröße " |
| 3014 |
"des Systems sein und das Schreiben muss am Anfang der Datei beginnen (d.h. " |
| 3015 |
"B<lseek>(2) und B<pwrite>(2) können nicht zum Schreiben an einen von Null " |
| 3016 |
"verschiedenen Versatz in der Datei verwandt werden)." |
| 3017 |
|
| 3018 |
#. commit 0bd14b4fd72afd5df41e9fd59f356740f22fceba |
| 3019 |
#. type: Plain text |
| 3020 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3021 |
msgid "" |
| 3022 |
"The range of user IDs (group IDs) specified in each line cannot overlap " |
| 3023 |
"with the ranges in any other lines. In the initial implementation (Linux " |
| 3024 |
"3.8), this requirement was satisfied by a simplistic implementation that " |
| 3025 |
"imposed the further requirement that the values in both field 1 and field 2 " |
| 3026 |
"of successive lines must be in ascending numerical order, which prevented " |
| 3027 |
"some otherwise valid maps from being created. Linux 3.9 and later fix this " |
| 3028 |
"limitation, allowing any valid set of nonoverlapping maps." |
| 3029 |
msgstr "" |
| 3030 |
"Die Bereiche der Benutzerkennungen (Gruppenkennungen), die in den einzelnen " |
| 3031 |
"Zeilen angegeben sind, dürfen sich nicht gegenseitig überlappen. In der " |
| 3032 |
"anfänglichen Implementierung (Linux 3.8) wurde diese Anforderung durch eine " |
| 3033 |
"simplistische Implementierung erfüllt, die weitere Einschränkungen " |
| 3034 |
"auferlegte, dass die Werte sowohl in Feld 1 als auch Feld 2 von " |
| 3035 |
"aufeinanderfolgenden Zeilen in aufsteigender numerischer Reihenfolge sein " |
| 3036 |
"mussten, womit andernfalls gültige Abbildungen nicht erstellt werden " |
| 3037 |
"konnten. Linux 3.9 und neuer korrigierte diese Beschränkung und erlaubte " |
| 3038 |
"jede Kombination von nichtüberlappenden Abbildungen." |
| 3039 |
|
| 3040 |
#. type: Plain text |
| 3041 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3042 |
msgid "" |
| 3043 |
"The data written to I<uid_map> (I<gid_map>) must consist of a single line " |
| 3044 |
"that maps the writing process's effective user ID (group ID) in the parent " |
| 3045 |
"user namespace to a user ID (group ID) in the user namespace." |
| 3046 |
msgstr "" |
| 3047 |
"Die in I<uid_map> (I<gid_map>) geschriebenen Daten müssen aus einer " |
| 3048 |
"einzelnen Zeile bestehen, die die effektive Benutzerkennung (Gruppenkennung) " |
| 3049 |
"des schreibenden Prozesses in dem Vorgängernamensraum auf eine " |
| 3050 |
"Benutzerkennung (Gruppenkennung) in den Benutzernamensraum abbildet." |
| 3051 |
|
| 3052 |
#. type: Plain text |
| 3053 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3054 |
msgid "" |
| 3055 |
"In the case of I<gid_map>, use of the B<setgroups>(2) system call must " |
| 3056 |
"first be denied by writing \\[dq]I<deny>\\[dq] to the I</proc/>pidI</" |
| 3057 |
"setgroups> file (see below) before writing to I<gid_map>." |
| 3058 |
msgstr "" |
| 3059 |
"Im Falle von I<gid_map> muss zuerst die Verwendung des Systemaufrufs " |
| 3060 |
"B<setgroups>(2) verboten werden, indem »I<deny>« in die Datei I</proc/>PIDI</" |
| 3061 |
"setgroups> geschrieben wird (siehe unten), bevor in I<gid_map> geschrieben " |
| 3062 |
"wird." |
| 3063 |
|
| 3064 |
#. type: SS |
| 3065 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3066 |
#, no-wrap |
| 3067 |
msgid "The I</proc/>pidI</setgroups> file" |
| 3068 |
msgstr "Die Datei I</proc/>PIDI</setgroups>" |
| 3069 |
|
| 3070 |
#. type: Plain text |
| 3071 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3072 |
msgid "" |
| 3073 |
"A privileged process (one with the B<CAP_SYS_ADMIN> capability in the " |
| 3074 |
"namespace) may write either of the strings \\[dq]I<allow>\\[dq] or \\" |
| 3075 |
"[dq]I<deny>\\[dq] to this file I<before> writing a group ID mapping for this " |
| 3076 |
"user namespace to the file I</proc/>pidI</gid_map>. Writing the string \\" |
| 3077 |
"[dq]I<deny>\\[dq] prevents any process in the user namespace from employing " |
| 3078 |
"B<setgroups>(2)." |
| 3079 |
msgstr "" |
| 3080 |
"Ein privilegierter Prozess (einer mit der Capability B<CAP_SYS_ADMIN> in dem " |
| 3081 |
"Namensraum) darf eine der Zeichenketten »I<allow>« oder »I<deny>« in diese " |
| 3082 |
"Datei schreiben, I<bevor> eine Gruppenkennungsabbildung für diesen " |
| 3083 |
"Benutzernamensraum in die Datei I</proc/>PIDI</gid_map> geschrieben wird. " |
| 3084 |
"Durch Schreiben der Zeichenkette »I<deny>« wird jedem Prozess in diesem " |
| 3085 |
"Benutzernamensraum der Einsatz von B<setgroups>(2) verboten." |
| 3086 |
|
| 3087 |
#. type: Plain text |
| 3088 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3089 |
msgid "" |
| 3090 |
"If the I<setgroups> file has the value \\[dq]I<deny>\\[dq], then the " |
| 3091 |
"B<setgroups>(2) system call can't subsequently be reenabled (by writing \\" |
| 3092 |
"[dq]I<allow>\\[dq] to the file) in this user namespace. (Attempts to do so " |
| 3093 |
"fail with the error B<EPERM>.) This restriction also propagates down to all " |
| 3094 |
"child user namespaces of this user namespace." |
| 3095 |
msgstr "" |
| 3096 |
"Falls die Datei I<setgroups> den Wert »I<deny>« enthält, dann kann der " |
| 3097 |
"Systemaufruf B<setgroups>(2) in diesem Namensraum nachfolgend nicht mehr " |
| 3098 |
"aktiviert werden (durch Schreiben von »I<allow>« in die Datei). (Versuche, " |
| 3099 |
"dies durchzuführen, schlagen mit B<EPERM> fehl.) Diese Beschränkung wird " |
| 3100 |
"auch an alle Nachfolgerbenutzernamensräume dieses Benutzernamensraums " |
| 3101 |
"weitergeleitet." |
| 3102 |
|
| 3103 |
# |
| 3104 |
# |
| 3105 |
# |
| 3106 |
# |
| 3107 |
#. /proc/PID/setgroups |
| 3108 |
#. [allow == setgroups() is allowed, "deny" == setgroups() is disallowed] |
| 3109 |
#. * Can write if have CAP_SYS_ADMIN in NS |
| 3110 |
#. * Must write BEFORE writing to /proc/PID/gid_map |
| 3111 |
#. setgroups() |
| 3112 |
#. * Must already have written to gid_map |
| 3113 |
#. * /proc/PID/setgroups must be "allow" |
| 3114 |
#. /proc/PID/gid_map -- writing |
| 3115 |
#. * Must already have written "deny" to /proc/PID/setgroups |
| 3116 |
#. ============================================================ |
| 3117 |
#. type: Plain text |
| 3118 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3119 |
msgid "" |
| 3120 |
"The I</proc/>pidI</setgroups> file was added in Linux 3.19, but was " |
| 3121 |
"backported to many earlier stable kernel series, because it addresses a " |
| 3122 |
"security issue. The issue concerned files with permissions such as \"rwx---" |
| 3123 |
"rwx\". Such files give fewer permissions to \"group\" than they do to " |
| 3124 |
"\"other\". This means that dropping groups using B<setgroups>(2) might " |
| 3125 |
"allow a process file access that it did not formerly have. Before the " |
| 3126 |
"existence of user namespaces this was not a concern, since only a privileged " |
| 3127 |
"process (one with the B<CAP_SETGID> capability) could call B<setgroups>(2). " |
| 3128 |
"However, with the introduction of user namespaces, it became possible for an " |
| 3129 |
"unprivileged process to create a new namespace in which the user had all " |
| 3130 |
"privileges. This then allowed formerly unprivileged users to drop groups " |
| 3131 |
"and thus gain file access that they did not previously have. The I</proc/" |
| 3132 |
">pidI</setgroups> file was added to address this security issue, by denying " |
| 3133 |
"any pathway for an unprivileged process to drop groups with B<setgroups>(2)." |
| 3134 |
msgstr "" |
| 3135 |
"Die Datei I</proc/>PIDI</setgroups> wurde in Linux 3.19 hinzugefügt; " |
| 3136 |
"allerdings wurde sie auch auf viele frühere stabile Kernel rückportiert, da " |
| 3137 |
"sie ein Sicherheitsproblem adressiert. Das Problem betraf Dateien mit " |
| 3138 |
"Berechtigungen wie »rwx---rwx«. Diese Dateien geben der »Gruppe« weniger " |
| 3139 |
"Berechtigungen als sie »anderen« geben. Das bedeutet, dass die Abgabe von " |
| 3140 |
"Gruppen mittels B<setgroups>(2) einem Prozess Dateizugriff erlauben könnte, " |
| 3141 |
"den er vorher nicht hatte. Vor der Existenz von Benutzernamensräumen führte " |
| 3142 |
"dies zu keine Sorgen, da nur ein privilegierter Prozess (einer mit der " |
| 3143 |
"Capability B<CAP_SETGID>) B<setgroups>(2) aufrufen konnte. Mit der " |
| 3144 |
"Einführung von Benutzernamensräumen wurde es für einen nicht privilegierten " |
| 3145 |
"Prozess allerdings möglich, einen neuen Namensraum zu erstellen, in dem der " |
| 3146 |
"Benutzer alle Privilegien hatte. Dies ermöglichte es dann vorher nicht " |
| 3147 |
"privilegierten Benutzern Gruppen abzugeben und damit Dateizugriff zu " |
| 3148 |
"erlangen, den sie vorher nicht hatten. Die Datei I</proc/>PIDI</setgroups> " |
| 3149 |
"wurde hinzugefügt, um dieses Sicherheitsproblem zu adressieren, indem jeder " |
| 3150 |
"Pfad für einen nicht privilegierten Prozess, Gruppen mit B<setgroups>(2) " |
| 3151 |
"abzugeben, verboten wurde." |
| 3152 |
|
| 3153 |
#. type: Plain text |
| 3154 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3155 |
#, no-wrap |
| 3156 |
msgid "" |
| 3157 |
"$ B<uname -rs> # Need Linux 3.8 or later\n" |
| 3158 |
"Linux 3.8.0\n" |
| 3159 |
"$ B<id -u> # Running as unprivileged user\n" |
| 3160 |
"1000\n" |
| 3161 |
"$ B<id -g>\n" |
| 3162 |
"1000\n" |
| 3163 |
msgstr "" |
| 3164 |
"$ B<uname -rs> # Benötigt Linux 3.8 oder neuer\n" |
| 3165 |
"Linux 3.8.0\n" |
| 3166 |
"$ B<id -u> # Ausführung als nicht privilegierter Benutzer\n" |
| 3167 |
"1000\n" |
| 3168 |
"$ B<id -g>\n" |
| 3169 |
"1000\n" |
| 3170 |
|
| 3171 |
#. type: Plain text |
| 3172 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3173 |
#, no-wrap |
| 3174 |
msgid "$ B<./userns_child_exec -p -m -U -M \\[aq]0 1000 1\\[aq] -G \\[aq]0 1000 1\\[aq] bash>\n" |
| 3175 |
msgstr "$ B<./userns_child_exec -p -m -U -M \\[aq]0 1000 1\\[aq] -G \\[aq]0 1000 1\\[aq] bash>\n" |
| 3176 |
|
| 3177 |
#. type: Plain text |
| 3178 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3179 |
#, no-wrap |
| 3180 |
msgid "" |
| 3181 |
"bash$ B<echo $$>\n" |
| 3182 |
"1\n" |
| 3183 |
msgstr "" |
| 3184 |
"bash$ B<echo $$>\n" |
| 3185 |
"1\n" |
| 3186 |
|
| 3187 |
#. type: Plain text |
| 3188 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3189 |
#, no-wrap |
| 3190 |
msgid "" |
| 3191 |
"bash$ B<mount -t proc proc /proc>\n" |
| 3192 |
"bash$ B<ps ax>\n" |
| 3193 |
" PID TTY STAT TIME COMMAND\n" |
| 3194 |
" 1 pts/3 S 0:00 bash\n" |
| 3195 |
" 22 pts/3 R+ 0:00 ps ax\n" |
| 3196 |
msgstr "" |
| 3197 |
"bash$ B<mount -t proc proc /proc>\n" |
| 3198 |
"bash$ B<ps ax>\n" |
| 3199 |
" PID TTY STAT TIME COMMAND\n" |
| 3200 |
" 1 pts/3 S 0:00 bash\n" |
| 3201 |
" 22 pts/3 R+ 0:00 ps ax\n" |
| 3202 |
|
| 3203 |
#. type: Plain text |
| 3204 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3205 |
#, no-wrap |
| 3206 |
msgid "" |
| 3207 |
"bash$ B<cat /proc/$$/status | egrep \\[aq]\\[ha][UG]id\\[aq]>\n" |
| 3208 |
"Uid:\t0\t0\t0\t0\n" |
| 3209 |
"Gid:\t0\t0\t0\t0\n" |
| 3210 |
"bash$ B<cat /proc/$$/status | egrep \\[aq]\\[ha]Cap(Prm|Inh|Eff)\\[aq]>\n" |
| 3211 |
"CapInh:\t0000000000000000\n" |
| 3212 |
"CapPrm:\t0000001fffffffff\n" |
| 3213 |
"CapEff:\t0000001fffffffff\n" |
| 3214 |
msgstr "" |
| 3215 |
"bash$ B<cat /proc/$$/status | egrep \\[aq]\\[ha][UG]id\\[aq]>\n" |
| 3216 |
"Uid:\t0\t0\t0\t0\n" |
| 3217 |
"Gid:\t0\t0\t0\t0\n" |
| 3218 |
"bash$ B<cat /proc/$$/status | egrep \\[aq]\\[ha]Cap(Prm|Inh|Eff)\\[aq]>\n" |
| 3219 |
"CapInh:\t0000000000000000\n" |
| 3220 |
"CapPrm:\t0000001fffffffff\n" |
| 3221 |
"CapEff:\t0000001fffffffff\n" |
| 3222 |
|
| 3223 |
#. type: Plain text |
| 3224 |
#: debian-trixie |
| 3225 |
#, no-wrap |
| 3226 |
msgid "" |
| 3227 |
"/* userns_child_exec.c\n" |
| 3228 |
"\\&\n" |
| 3229 |
" Licensed under GNU General Public License v2 or later\n" |
| 3230 |
"\\&\n" |
| 3231 |
" Create a child process that executes a shell command in new\n" |
| 3232 |
" namespace(s); allow UID and GID mappings to be specified when\n" |
| 3233 |
" creating a user namespace.\n" |
| 3234 |
"*/\n" |
| 3235 |
"#define _GNU_SOURCE\n" |
| 3236 |
"#include E<lt>err.hE<gt>\n" |
| 3237 |
"#include E<lt>sched.hE<gt>\n" |
| 3238 |
"#include E<lt>unistd.hE<gt>\n" |
| 3239 |
"#include E<lt>stdint.hE<gt>\n" |
| 3240 |
"#include E<lt>stdlib.hE<gt>\n" |
| 3241 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 3242 |
"#include E<lt>signal.hE<gt>\n" |
| 3243 |
"#include E<lt>fcntl.hE<gt>\n" |
| 3244 |
"#include E<lt>stdio.hE<gt>\n" |
| 3245 |
"#include E<lt>string.hE<gt>\n" |
| 3246 |
"#include E<lt>limits.hE<gt>\n" |
| 3247 |
"#include E<lt>errno.hE<gt>\n" |
| 3248 |
"\\&\n" |
| 3249 |
"struct child_args {\n" |
| 3250 |
" char **argv; /* Command to be executed by child, with args */\n" |
| 3251 |
" int pipe_fd[2]; /* Pipe used to synchronize parent and child */\n" |
| 3252 |
"};\n" |
| 3253 |
"\\&\n" |
| 3254 |
"static int verbose;\n" |
| 3255 |
"\\&\n" |
| 3256 |
"static void\n" |
| 3257 |
"usage(char *pname)\n" |
| 3258 |
"{\n" |
| 3259 |
" fprintf(stderr, \"Usage: %s [options] cmd [arg...]\\[rs]n\\[rs]n\", pname);\n" |
| 3260 |
" fprintf(stderr, \"Create a child process that executes a shell \"\n" |
| 3261 |
" \"command in a new user namespace,\\[rs]n\"\n" |
| 3262 |
" \"and possibly also other new namespace(s).\\[rs]n\\[rs]n\");\n" |
| 3263 |
" fprintf(stderr, \"Options can be:\\[rs]n\\[rs]n\");\n" |
| 3264 |
"#define fpe(str) fprintf(stderr, \" %s\", str);\n" |
| 3265 |
" fpe(\"-i New IPC namespace\\[rs]n\");\n" |
| 3266 |
" fpe(\"-m New mount namespace\\[rs]n\");\n" |
| 3267 |
" fpe(\"-n New network namespace\\[rs]n\");\n" |
| 3268 |
" fpe(\"-p New PID namespace\\[rs]n\");\n" |
| 3269 |
" fpe(\"-u New UTS namespace\\[rs]n\");\n" |
| 3270 |
" fpe(\"-U New user namespace\\[rs]n\");\n" |
| 3271 |
" fpe(\"-M uid_map Specify UID map for user namespace\\[rs]n\");\n" |
| 3272 |
" fpe(\"-G gid_map Specify GID map for user namespace\\[rs]n\");\n" |
| 3273 |
" fpe(\"-z Map user\\[aq]s UID and GID to 0 in user namespace\\[rs]n\");\n" |
| 3274 |
" fpe(\" (equivalent to: -M \\[aq]0 E<lt>uidE<gt> 1\\[aq] -G \\[aq]0 E<lt>gidE<gt> 1\\[aq])\\[rs]n\");\n" |
| 3275 |
" fpe(\"-v Display verbose messages\\[rs]n\");\n" |
| 3276 |
" fpe(\"\\[rs]n\");\n" |
| 3277 |
" fpe(\"If -z, -M, or -G is specified, -U is required.\\[rs]n\");\n" |
| 3278 |
" fpe(\"It is not permitted to specify both -z and either -M or -G.\\[rs]n\");\n" |
| 3279 |
" fpe(\"\\[rs]n\");\n" |
| 3280 |
" fpe(\"Map strings for -M and -G consist of records of the form:\\[rs]n\");\n" |
| 3281 |
" fpe(\"\\[rs]n\");\n" |
| 3282 |
" fpe(\" ID-inside-ns ID-outside-ns len\\[rs]n\");\n" |
| 3283 |
" fpe(\"\\[rs]n\");\n" |
| 3284 |
" fpe(\"A map string can contain multiple records, separated\"\n" |
| 3285 |
" \" by commas;\\[rs]n\");\n" |
| 3286 |
" fpe(\"the commas are replaced by newlines before writing\"\n" |
| 3287 |
" \" to map files.\\[rs]n\");\n" |
| 3288 |
"\\&\n" |
| 3289 |
" exit(EXIT_FAILURE);\n" |
| 3290 |
"}\n" |
| 3291 |
"\\&\n" |
| 3292 |
"/* Update the mapping file \\[aq]map_file\\[aq], with the value provided in\n" |
| 3293 |
" \\[aq]mapping\\[aq], a string that defines a UID or GID mapping. A UID or\n" |
| 3294 |
" GID mapping consists of one or more newline-delimited records\n" |
| 3295 |
" of the form:\n" |
| 3296 |
"\\&\n" |
| 3297 |
" ID_inside-ns ID-outside-ns length\n" |
| 3298 |
"\\&\n" |
| 3299 |
" Requiring the user to supply a string that contains newlines is\n" |
| 3300 |
" of course inconvenient for command-line use. Thus, we permit the\n" |
| 3301 |
" use of commas to delimit records in this string, and replace them\n" |
| 3302 |
" with newlines before writing the string to the file. */\n" |
| 3303 |
"\\&\n" |
| 3304 |
"static void\n" |
| 3305 |
"update_map(char *mapping, char *map_file)\n" |
| 3306 |
"{\n" |
| 3307 |
" int fd;\n" |
| 3308 |
" size_t map_len; /* Length of \\[aq]mapping\\[aq] */\n" |
| 3309 |
"\\&\n" |
| 3310 |
" /* Replace commas in mapping string with newlines. */\n" |
| 3311 |
"\\&\n" |
| 3312 |
" map_len = strlen(mapping);\n" |
| 3313 |
" for (size_t j = 0; j E<lt> map_len; j++)\n" |
| 3314 |
" if (mapping[j] == \\[aq],\\[aq])\n" |
| 3315 |
" mapping[j] = \\[aq]\\[rs]n\\[aq];\n" |
| 3316 |
"\\&\n" |
| 3317 |
" fd = open(map_file, O_RDWR);\n" |
| 3318 |
" if (fd == -1) {\n" |
| 3319 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", map_file,\n" |
| 3320 |
" strerror(errno));\n" |
| 3321 |
" exit(EXIT_FAILURE);\n" |
| 3322 |
" }\n" |
| 3323 |
"\\&\n" |
| 3324 |
" if (write(fd, mapping, map_len) != map_len) {\n" |
| 3325 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", map_file,\n" |
| 3326 |
" strerror(errno));\n" |
| 3327 |
" exit(EXIT_FAILURE);\n" |
| 3328 |
" }\n" |
| 3329 |
"\\&\n" |
| 3330 |
" close(fd);\n" |
| 3331 |
"}\n" |
| 3332 |
"\\&\n" |
| 3333 |
"/* Linux 3.19 made a change in the handling of setgroups(2) and\n" |
| 3334 |
" the \\[aq]gid_map\\[aq] file to address a security issue. The issue\n" |
| 3335 |
" allowed *unprivileged* users to employ user namespaces in\n" |
| 3336 |
" order to drop groups. The upshot of the 3.19 changes is that\n" |
| 3337 |
" in order to update the \\[aq]gid_maps\\[aq] file, use of the setgroups()\n" |
| 3338 |
" system call in this user namespace must first be disabled by\n" |
| 3339 |
" writing \"deny\" to one of the /proc/PID/setgroups files for\n" |
| 3340 |
" this namespace. That is the purpose of the following function. */\n" |
| 3341 |
"\\&\n" |
| 3342 |
"static void\n" |
| 3343 |
"proc_setgroups_write(pid_t child_pid, char *str)\n" |
| 3344 |
"{\n" |
| 3345 |
" char setgroups_path[PATH_MAX];\n" |
| 3346 |
" int fd;\n" |
| 3347 |
"\\&\n" |
| 3348 |
" snprintf(setgroups_path, PATH_MAX, \"/proc/%jd/setgroups\",\n" |
| 3349 |
" (intmax_t) child_pid);\n" |
| 3350 |
"\\&\n" |
| 3351 |
" fd = open(setgroups_path, O_RDWR);\n" |
| 3352 |
" if (fd == -1) {\n" |
| 3353 |
"\\&\n" |
| 3354 |
" /* We may be on a system that doesn\\[aq]t support\n" |
| 3355 |
" /proc/PID/setgroups. In that case, the file won\\[aq]t exist,\n" |
| 3356 |
" and the system won\\[aq]t impose the restrictions that Linux 3.19\n" |
| 3357 |
" added. That\\[aq]s fine: we don\\[aq]t need to do anything in order\n" |
| 3358 |
" to permit \\[aq]gid_map\\[aq] to be updated.\n" |
| 3359 |
"\\&\n" |
| 3360 |
" However, if the error from open() was something other than\n" |
| 3361 |
" the ENOENT error that is expected for that case, let the\n" |
| 3362 |
" user know. */\n" |
| 3363 |
"\\&\n" |
| 3364 |
" if (errno != ENOENT)\n" |
| 3365 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", setgroups_path,\n" |
| 3366 |
" strerror(errno));\n" |
| 3367 |
" return;\n" |
| 3368 |
" }\n" |
| 3369 |
"\\&\n" |
| 3370 |
" if (write(fd, str, strlen(str)) == -1)\n" |
| 3371 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", setgroups_path,\n" |
| 3372 |
" strerror(errno));\n" |
| 3373 |
"\\&\n" |
| 3374 |
" close(fd);\n" |
| 3375 |
"}\n" |
| 3376 |
"\\&\n" |
| 3377 |
"static int /* Start function for cloned child */\n" |
| 3378 |
"childFunc(void *arg)\n" |
| 3379 |
"{\n" |
| 3380 |
" struct child_args *args = arg;\n" |
| 3381 |
" char ch;\n" |
| 3382 |
"\\&\n" |
| 3383 |
" /* Wait until the parent has updated the UID and GID mappings.\n" |
| 3384 |
" See the comment in main(). We wait for end of file on a\n" |
| 3385 |
" pipe that will be closed by the parent process once it has\n" |
| 3386 |
" updated the mappings. */\n" |
| 3387 |
"\\&\n" |
| 3388 |
" close(args-E<gt>pipe_fd[1]); /* Close our descriptor for the write\n" |
| 3389 |
" end of the pipe so that we see EOF\n" |
| 3390 |
" when parent closes its descriptor. */\n" |
| 3391 |
" if (read(args-E<gt>pipe_fd[0], &ch, 1) != 0) {\n" |
| 3392 |
" fprintf(stderr,\n" |
| 3393 |
" \"Failure in child: read from pipe returned != 0\\[rs]n\");\n" |
| 3394 |
" exit(EXIT_FAILURE);\n" |
| 3395 |
" }\n" |
| 3396 |
"\\&\n" |
| 3397 |
" close(args-E<gt>pipe_fd[0]);\n" |
| 3398 |
"\\&\n" |
| 3399 |
" /* Execute a shell command. */\n" |
| 3400 |
"\\&\n" |
| 3401 |
" printf(\"About to exec %s\\[rs]n\", args-E<gt>argv[0]);\n" |
| 3402 |
" execvp(args-E<gt>argv[0], args-E<gt>argv);\n" |
| 3403 |
" err(EXIT_FAILURE, \"execvp\");\n" |
| 3404 |
"}\n" |
| 3405 |
"\\&\n" |
| 3406 |
"#define STACK_SIZE (1024 * 1024)\n" |
| 3407 |
"\\&\n" |
| 3408 |
"static char child_stack[STACK_SIZE]; /* Space for child\\[aq]s stack */\n" |
| 3409 |
"\\&\n" |
| 3410 |
"int\n" |
| 3411 |
"main(int argc, char *argv[])\n" |
| 3412 |
"{\n" |
| 3413 |
" int flags, opt, map_zero;\n" |
| 3414 |
" pid_t child_pid;\n" |
| 3415 |
" struct child_args args;\n" |
| 3416 |
" char *uid_map, *gid_map;\n" |
| 3417 |
" const int MAP_BUF_SIZE = 100;\n" |
| 3418 |
" char map_buf[MAP_BUF_SIZE];\n" |
| 3419 |
" char map_path[PATH_MAX];\n" |
| 3420 |
"\\&\n" |
| 3421 |
" /* Parse command-line options. The initial \\[aq]+\\[aq] character in\n" |
| 3422 |
" the final getopt() argument prevents GNU-style permutation\n" |
| 3423 |
" of command-line options. That\\[aq]s useful, since sometimes\n" |
| 3424 |
" the \\[aq]command\\[aq] to be executed by this program itself\n" |
| 3425 |
" has command-line options. We don\\[aq]t want getopt() to treat\n" |
| 3426 |
" those as options to this program. */\n" |
| 3427 |
"\\&\n" |
| 3428 |
" flags = 0;\n" |
| 3429 |
" verbose = 0;\n" |
| 3430 |
" gid_map = NULL;\n" |
| 3431 |
" uid_map = NULL;\n" |
| 3432 |
" map_zero = 0;\n" |
| 3433 |
" while ((opt = getopt(argc, argv, \"+imnpuUM:G:zv\")) != -1) {\n" |
| 3434 |
" switch (opt) {\n" |
| 3435 |
" case \\[aq]i\\[aq]: flags |= CLONE_NEWIPC; break;\n" |
| 3436 |
" case \\[aq]m\\[aq]: flags |= CLONE_NEWNS; break;\n" |
| 3437 |
" case \\[aq]n\\[aq]: flags |= CLONE_NEWNET; break;\n" |
| 3438 |
" case \\[aq]p\\[aq]: flags |= CLONE_NEWPID; break;\n" |
| 3439 |
" case \\[aq]u\\[aq]: flags |= CLONE_NEWUTS; break;\n" |
| 3440 |
" case \\[aq]v\\[aq]: verbose = 1; break;\n" |
| 3441 |
" case \\[aq]z\\[aq]: map_zero = 1; break;\n" |
| 3442 |
" case \\[aq]M\\[aq]: uid_map = optarg; break;\n" |
| 3443 |
" case \\[aq]G\\[aq]: gid_map = optarg; break;\n" |
| 3444 |
" case \\[aq]U\\[aq]: flags |= CLONE_NEWUSER; break;\n" |
| 3445 |
" default: usage(argv[0]);\n" |
| 3446 |
" }\n" |
| 3447 |
" }\n" |
| 3448 |
"\\&\n" |
| 3449 |
" /* -M or -G without -U is nonsensical */\n" |
| 3450 |
"\\&\n" |
| 3451 |
" if (((uid_map != NULL || gid_map != NULL || map_zero) &&\n" |
| 3452 |
" !(flags & CLONE_NEWUSER)) ||\n" |
| 3453 |
" (map_zero && (uid_map != NULL || gid_map != NULL)))\n" |
| 3454 |
" usage(argv[0]);\n" |
| 3455 |
"\\&\n" |
| 3456 |
" args.argv = &argv[optind];\n" |
| 3457 |
"\\&\n" |
| 3458 |
" /* We use a pipe to synchronize the parent and child, in order to\n" |
| 3459 |
" ensure that the parent sets the UID and GID maps before the child\n" |
| 3460 |
" calls execve(). This ensures that the child maintains its\n" |
| 3461 |
" capabilities during the execve() in the common case where we\n" |
| 3462 |
" want to map the child\\[aq]s effective user ID to 0 in the new user\n" |
| 3463 |
" namespace. Without this synchronization, the child would lose\n" |
| 3464 |
" its capabilities if it performed an execve() with nonzero\n" |
| 3465 |
" user IDs (see the capabilities(7) man page for details of the\n" |
| 3466 |
" transformation of a process\\[aq]s capabilities during execve()). */\n" |
| 3467 |
"\\&\n" |
| 3468 |
" if (pipe(args.pipe_fd) == -1)\n" |
| 3469 |
" err(EXIT_FAILURE, \"pipe\");\n" |
| 3470 |
"\\&\n" |
| 3471 |
" /* Create the child in new namespace(s). */\n" |
| 3472 |
"\\&\n" |
| 3473 |
" child_pid = clone(childFunc, child_stack + STACK_SIZE,\n" |
| 3474 |
" flags | SIGCHLD, &args);\n" |
| 3475 |
" if (child_pid == -1)\n" |
| 3476 |
" err(EXIT_FAILURE, \"clone\");\n" |
| 3477 |
"\\&\n" |
| 3478 |
" /* Parent falls through to here. */\n" |
| 3479 |
"\\&\n" |
| 3480 |
" if (verbose)\n" |
| 3481 |
" printf(\"%s: PID of child created by clone() is %jd\\[rs]n\",\n" |
| 3482 |
" argv[0], (intmax_t) child_pid);\n" |
| 3483 |
"\\&\n" |
| 3484 |
" /* Update the UID and GID maps in the child. */\n" |
| 3485 |
"\\&\n" |
| 3486 |
" if (uid_map != NULL || map_zero) {\n" |
| 3487 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/uid_map\",\n" |
| 3488 |
" (intmax_t) child_pid);\n" |
| 3489 |
" if (map_zero) {\n" |
| 3490 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %jd 1\",\n" |
| 3491 |
" (intmax_t) getuid());\n" |
| 3492 |
" uid_map = map_buf;\n" |
| 3493 |
" }\n" |
| 3494 |
" update_map(uid_map, map_path);\n" |
| 3495 |
" }\n" |
| 3496 |
"\\&\n" |
| 3497 |
" if (gid_map != NULL || map_zero) {\n" |
| 3498 |
" proc_setgroups_write(child_pid, \"deny\");\n" |
| 3499 |
"\\&\n" |
| 3500 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/gid_map\",\n" |
| 3501 |
" (intmax_t) child_pid);\n" |
| 3502 |
" if (map_zero) {\n" |
| 3503 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\",\n" |
| 3504 |
" (intmax_t) getgid());\n" |
| 3505 |
" gid_map = map_buf;\n" |
| 3506 |
" }\n" |
| 3507 |
" update_map(gid_map, map_path);\n" |
| 3508 |
" }\n" |
| 3509 |
"\\&\n" |
| 3510 |
" /* Close the write end of the pipe, to signal to the child that we\n" |
| 3511 |
" have updated the UID and GID maps. */\n" |
| 3512 |
"\\&\n" |
| 3513 |
" close(args.pipe_fd[1]);\n" |
| 3514 |
"\\&\n" |
| 3515 |
" if (waitpid(child_pid, NULL, 0) == -1) /* Wait for child */\n" |
| 3516 |
" err(EXIT_FAILURE, \"waitpid\");\n" |
| 3517 |
"\\&\n" |
| 3518 |
" if (verbose)\n" |
| 3519 |
" printf(\"%s: terminating\\[rs]n\", argv[0]);\n" |
| 3520 |
"\\&\n" |
| 3521 |
" exit(EXIT_SUCCESS);\n" |
| 3522 |
"}\n" |
| 3523 |
msgstr "" |
| 3524 |
"/* userns_child_exec.c\n" |
| 3525 |
"\\&\n" |
| 3526 |
" Lizenziert unter der GNU General Public License v2 oder neuer\n" |
| 3527 |
"\\&\n" |
| 3528 |
" Erzeugt einen Kindprozess, der einen Shell-Befehl in einem oder mehreren\n" |
| 3529 |
" neuen Namensräumen ausführt; erlaubt UID- und GID-Abbildungen anzugeben,\n" |
| 3530 |
" wenn ein Benutzernamensraum erstellt wird\n" |
| 3531 |
"*/\n" |
| 3532 |
"#define _GNU_SOURCE\n" |
| 3533 |
"#include E<lt>err.hE<gt>\n" |
| 3534 |
"#include E<lt>sched.hE<gt>\n" |
| 3535 |
"#include E<lt>unistd.hE<gt>\n" |
| 3536 |
"#include E<lt>stdint.hE<gt>\n" |
| 3537 |
"#include E<lt>stdlib.hE<gt>\n" |
| 3538 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 3539 |
"#include E<lt>signal.hE<gt>\n" |
| 3540 |
"#include E<lt>fcntl.hE<gt>\n" |
| 3541 |
"#include E<lt>stdio.hE<gt>\n" |
| 3542 |
"#include E<lt>string.hE<gt>\n" |
| 3543 |
"#include E<lt>limits.hE<gt>\n" |
| 3544 |
"#include E<lt>errno.hE<gt>\n" |
| 3545 |
"\\&\n" |
| 3546 |
"struct child_args {\n" |
| 3547 |
" char **argv; /* Vom Kind auszuführender Befehl, mit Argumenten */\n" |
| 3548 |
" int pipe_fd[2]; /* Zur Sychronisation Eltern/Kind verwandte Pipe */\n" |
| 3549 |
"};\n" |
| 3550 |
"\\&\n" |
| 3551 |
"static int verbose;\n" |
| 3552 |
"\\&\n" |
| 3553 |
"static void\n" |
| 3554 |
"usage(char *pname)\n" |
| 3555 |
"{\n" |
| 3556 |
" fprintf(stderr, \"Aufruf: %s [Optionen] Bef [Arg…]\\[rs]n\\[rs]n\", pname);\n" |
| 3557 |
" fprintf(stderr, \"Erstellt einen Kindprozess, der einen Shellbefehl \"\n" |
| 3558 |
" \"in einem neuen Benutzernamensraum ausführt\\[rs]n\"\n" |
| 3559 |
" \"und möglicherweise auch anderen neuen Namensräumen.\\[rs]n\\[rs]n\");\n" |
| 3560 |
" fprintf(stderr, \"Optionen können sein:\\[rs]n\\[rs]n\");\n" |
| 3561 |
"#define fpe(str) fprintf(stderr, \" %s\", str);\n" |
| 3562 |
" fpe(\"-i Neuer IPC-Namensraum\\[rs]n\");\n" |
| 3563 |
" fpe(\"-m Neuer Einhänge-Namensraum\\[rs]n\");\n" |
| 3564 |
" fpe(\"-n Neuer Netzwerk-Namensraum\\[rs]n\");\n" |
| 3565 |
" fpe(\"-p Neuer PID-Namensraum\\[rs]n\");\n" |
| 3566 |
" fpe(\"-u Neuer UTS-Namensraum\\[rs]n\");\n" |
| 3567 |
" fpe(\"-U Neuer Benutzernamensraum\\[rs]n\");\n" |
| 3568 |
" fpe(\"-M uid_map Angabe einer UID-Abbildung für Benutzernamensraum\\[rs]n\");\n" |
| 3569 |
" fpe(\"-G gid_map Angabe einer GID-Abbildung für Benutzernamensraum\\[rs]n\");\n" |
| 3570 |
" fpe(\"-z Benutzer-UID und -GID auf 0 im Benutzernamensraum abbilden\\[rs]n\");\n" |
| 3571 |
" fpe(\" (äquivalent zu: -M \\[aq]0 E<lt>uidE<gt> 1\\[aq] -G \\[aq]0 E<lt>gidE<gt> 1\\[aq])\\[rs]n\");\n" |
| 3572 |
" fpe(\"-v Anzeige ausführlicher Meldungen\\[rs]n\");\n" |
| 3573 |
" fpe(\"\\[rs]n\");\n" |
| 3574 |
" fpe(\"Falls -z, -M oder -G angegeben wird, ist -U verpflichtend.\\[rs]n\");\n" |
| 3575 |
" fpe(\"Es ist nicht erlaubt, sowohl -z als auch entweder -M oder -G anzugeben.\\[rs]n\");\n" |
| 3576 |
" fpe(\"\\[rs]n\");\n" |
| 3577 |
" fpe(\"Abbildungszeichenketten für -M und -G bestehen aus Datensätzen der folgenden Form:\\[rs]n\");\n" |
| 3578 |
" fpe(\"\\en\");\n" |
| 3579 |
" fpe(\" Namensrauminterne-Kennung Namensraumexterne-Kennung Länge\\[rs]n\");\n" |
| 3580 |
" fpe(\"\\[rs]n\");\n" |
| 3581 |
" fpe(\"Eine Abbildungszeichenkette kann mehrere Datensätze enthalten,\"\n" |
| 3582 |
" \" getrennt durch Kommata;\\[rs]n\");\n" |
| 3583 |
" fpe(\"die Kommata werden vor dem Schreiben in die Abbildungsdateien durch\"\n" |
| 3584 |
" \" Zeilenumbrüche ersetzt.\\[rs]n\");\n" |
| 3585 |
"\\&\n" |
| 3586 |
" exit(EXIT_FAILURE);\n" |
| 3587 |
"}\n" |
| 3588 |
"\\&\n" |
| 3589 |
"/* Aktualisiert die Abbildungsdatei »map_file« mit dem in »mapping«\n" |
| 3590 |
" bereitgestellten Wert, einer Zeichenkette, die eine UID- oder GID-\n" |
| 3591 |
" Abbildung definiert. Eine UID- oder GID-Abbildung besteht aus einem oder\n" |
| 3592 |
" mehreren, durch Zeilenumbrüche getrennten Datensätzen der folgenden Form:\n" |
| 3593 |
"\\&\n" |
| 3594 |
" Namensrauminterne-Kennung Namensraumexterne-Kennung Länge\n" |
| 3595 |
"\\&\n" |
| 3596 |
" Für die Befehlszeile zu verlangen, dass Zeichenketten mit Zeilenumbrüchen\n" |
| 3597 |
" bereitgestellt werden, ist natürlich unbequem. Daher erlauben wir die\n" |
| 3598 |
" Verwendung von Kommata zur Begrenzung von Datensätzen in dieser\n" |
| 3599 |
" Zeichenkette und ersetzen sie vor dem Schreiben in die Datei durch\n" |
| 3600 |
" Zeilenumbrüche. */\n" |
| 3601 |
"\\&\n" |
| 3602 |
"static void\n" |
| 3603 |
"update_map(char *mapping, char *map_file)\n" |
| 3604 |
"{\n" |
| 3605 |
" int fd;\n" |
| 3606 |
" size_t map_len; /* Länge der »mapping« */\n" |
| 3607 |
"\\&\n" |
| 3608 |
" /* Kommata durch Zeilenumbrüche in Abbildungszeichenkette ersetzen. */\n" |
| 3609 |
"\\&\n" |
| 3610 |
" map_len = strlen(mapping);\n" |
| 3611 |
" for (size_t j = 0; j E<lt> map_len; j++)\n" |
| 3612 |
" if (mapping[j] == \\[aq],\\[aq])\n" |
| 3613 |
" mapping[j] = \\[aq]\\[rs]n\\[aq];\n" |
| 3614 |
"\\&\n" |
| 3615 |
" fd = open(map_file, O_RDWR);\n" |
| 3616 |
" if (fd == -1) {\n" |
| 3617 |
" fprintf(stderr, \"FEHLER: open %s: %s\\[rs]n\", map_file,\n" |
| 3618 |
" strerror(errno));\n" |
| 3619 |
" exit(EXIT_FAILURE);\n" |
| 3620 |
" }\n" |
| 3621 |
"\\&\n" |
| 3622 |
" if (write(fd, mapping, map_len) != map_len) {\n" |
| 3623 |
" fprintf(stderr, \"FEHLER: write %s: %s\\en\", map_file,\n" |
| 3624 |
" strerror(errno));\n" |
| 3625 |
" exit(EXIT_FAILURE);\n" |
| 3626 |
" }\n" |
| 3627 |
"\\&\n" |
| 3628 |
" close(fd);\n" |
| 3629 |
"}\n" |
| 3630 |
"\\&\n" |
| 3631 |
"/* Linux 3.19 änderte die Handhabung von setgroups(2) und die Datei\n" |
| 3632 |
" »gid_map«, um ein Sicherheitsproblem zu adressieren. Das Problem erlaubte\n" |
| 3633 |
" *nicht privilegierten* Benutzern einen Benutzernamensraum einzusetzen, um\n" |
| 3634 |
" Gruppen abzugeben. Das Fazit der 3.19er Änderung ist, dass die Verwendung\n" |
| 3635 |
" des Systemaufrufs setgroups() in diesem Benutzernamensraum zuerst durch\n" |
| 3636 |
" Schreiben von »deny« in eine der Dateien /proc/PID/setgroups für diesen\n" |
| 3637 |
" Namensraum erfolgen muss, damit die Datei »gid_maps« aktualisert wird.\n" |
| 3638 |
" Das ist der Zweck der folgenden Funktion. */\n" |
| 3639 |
"\\&\n" |
| 3640 |
"static void\n" |
| 3641 |
"proc_setgroups_write(pid_t child_pid, char *str)\n" |
| 3642 |
"{\n" |
| 3643 |
" char setgroups_path[PATH_MAX];\n" |
| 3644 |
" int fd;\n" |
| 3645 |
"\\&\n" |
| 3646 |
" snprintf(setgroups_path, PATH_MAX, \"/proc/%jd/setgroups\",\n" |
| 3647 |
" (intmax_t) child_pid);\n" |
| 3648 |
"\\&\n" |
| 3649 |
" fd = open(setgroups_path, O_RDWR);\n" |
| 3650 |
" if (fd == -1) {\n" |
| 3651 |
"\\&\n" |
| 3652 |
" /* Vielleicht sind wir auf einem System, das /proc/PID/setgroups\n" |
| 3653 |
" nicht unterstützt. Dann wird diese Datei nicht existieren und das\n" |
| 3654 |
" System wird nicht die Beschränkungen erzwingen, die Linux 3.19\n" |
| 3655 |
" hinzugefügt hat. Das ist OK, wir brauchen nichts zu machen, damit\n" |
| 3656 |
" »gid_map« aktualisiert wird.\n" |
| 3657 |
"\\&\n" |
| 3658 |
" Falls allerdings der Fehler von open() sich von ENOENT\n" |
| 3659 |
" unterscheidet (der in diesem Fall zu erwarten ist), informieren\n" |
| 3660 |
" wir den Benutzer. */\n" |
| 3661 |
"\\&\n" |
| 3662 |
" if (errno != ENOENT)\n" |
| 3663 |
" fprintf(stderr, \"FEHLER: open %s: %s\\[rs]n\", setgroups_path,\n" |
| 3664 |
" strerror(errno));\n" |
| 3665 |
" return;\n" |
| 3666 |
" }\n" |
| 3667 |
"\\&\n" |
| 3668 |
" if (write(fd, str, strlen(str)) == -1)\n" |
| 3669 |
" fprintf(stderr, \"FEHLER: write %s: %s\\[rs]n\", setgroups_path,\n" |
| 3670 |
" strerror(errno));\n" |
| 3671 |
"\\&\n" |
| 3672 |
" close(fd);\n" |
| 3673 |
"}\n" |
| 3674 |
"\\&\n" |
| 3675 |
"static int /* Funktion für geklontes Kind starten */\n" |
| 3676 |
"childFunc(void *arg)\n" |
| 3677 |
"{\n" |
| 3678 |
" struct child_args *args = arg;\n" |
| 3679 |
" char ch;\n" |
| 3680 |
"\\&\n" |
| 3681 |
" /* Warten, bis der Elternprozess seine UID- und GID-Abbildungen\n" |
| 3682 |
" aktualisiert hat. Siehe den Kommentar in main(). Wir warten, bis\n" |
| 3683 |
" auf einer Pipe das Dateiende kommt, die vom Elternprozess geschlossen\n" |
| 3684 |
" wird, sobald er seine Abbildungen aktualisiert hat. */\n" |
| 3685 |
"\\&\n" |
| 3686 |
" close(args-E<gt>pipe_fd[1]); /* Unseren Deskriptor für das Ende des\n" |
| 3687 |
" Schreibens schließen, so dass wir EOF\n" |
| 3688 |
" sehen, wenn der Elternprozess seinen\n" |
| 3689 |
" Deskriptor schließt. */\n" |
| 3690 |
" if (read(args-E<gt>pipe_fd[0], &ch, 1) != 0) {\n" |
| 3691 |
" fprintf(stderr,\n" |
| 3692 |
" \"Fehler im Kind: Lesen von der Pipe lieferte != 0\\[rs]n\");\n" |
| 3693 |
" exit(EXIT_FAILURE);\n" |
| 3694 |
" }\n" |
| 3695 |
"\\&\n" |
| 3696 |
" close(args-E<gt>pipe_fd[0]);\n" |
| 3697 |
"\\&\n" |
| 3698 |
" /* Einen Shell-Befehl ausführen. */\n" |
| 3699 |
"\\&\n" |
| 3700 |
" printf(\"Gleich wird exec %s ausgeführt\\[rs]n\", args-E<gt>argv[0]);\n" |
| 3701 |
" execvp(args-E<gt>argv[0], args-E<gt>argv);\n" |
| 3702 |
" err(EXIT_FAILURE, \"execvp\");\n" |
| 3703 |
"}\n" |
| 3704 |
"\\&\n" |
| 3705 |
"#define STACK_SIZE (1024 * 1024)\n" |
| 3706 |
"\\&\n" |
| 3707 |
"static char child_stack[STACK_SIZE]; /* Platz für den Stack des Kindes */\n" |
| 3708 |
"\\&\n" |
| 3709 |
"int\n" |
| 3710 |
"main(int argc, char *argv[])\n" |
| 3711 |
"{\n" |
| 3712 |
" int flags, opt, map_zero;\n" |
| 3713 |
" pid_t child_pid;\n" |
| 3714 |
" struct child_args args;\n" |
| 3715 |
" char *uid_map, *gid_map;\n" |
| 3716 |
" const int MAP_BUF_SIZE = 100;\n" |
| 3717 |
" char map_buf[MAP_BUF_SIZE];\n" |
| 3718 |
" char map_path[PATH_MAX];\n" |
| 3719 |
"\\&\n" |
| 3720 |
" /* Befehlszeilenoptionen auswerten. Das anfängliche »+«-Zeichen in dem\n" |
| 3721 |
" abschließenden getopt()-Argument verhindert GNU-artige Vertauschungen\n" |
| 3722 |
" der Befehlszeilenoptionen. Das ist nützlich, da manchmal der von\n" |
| 3723 |
" diesem Programm selbst ausgeführte »Befehl« über Befehlszeilenoptionen\n" |
| 3724 |
" verfügt. Wir wollen nicht, dass getopt() solche als Optionen für\n" |
| 3725 |
" dieses Programm behandelt. */\n" |
| 3726 |
"\\&\n" |
| 3727 |
" flags = 0;\n" |
| 3728 |
" verbose = 0;\n" |
| 3729 |
" gid_map = NULL;\n" |
| 3730 |
" uid_map = NULL;\n" |
| 3731 |
" map_zero = 0;\n" |
| 3732 |
" while ((opt = getopt(argc, argv, \"+imnpuUM:G:zv\")) != -1) {\n" |
| 3733 |
" switch (opt) {\n" |
| 3734 |
" case \\[aq]i\\[aq]: flags |= CLONE_NEWIPC; break;\n" |
| 3735 |
" case \\[aq]m\\[aq]: flags |= CLONE_NEWNS; break;\n" |
| 3736 |
" case \\[aq]n\\[aq]: flags |= CLONE_NEWNET; break;\n" |
| 3737 |
" case \\[aq]p\\[aq]: flags |= CLONE_NEWPID; break;\n" |
| 3738 |
" case \\[aq]u\\[aq]: flags |= CLONE_NEWUTS; break;\n" |
| 3739 |
" case \\[aq]v\\[aq]: verbose = 1; break;\n" |
| 3740 |
" case \\[aq]z\\[aq]: map_zero = 1; break;\n" |
| 3741 |
" case \\[aq]M\\[aq]: uid_map = optarg; break;\n" |
| 3742 |
" case \\[aq]G\\[aq]: gid_map = optarg; break;\n" |
| 3743 |
" case \\[aq]U\\[aq]: flags |= CLONE_NEWUSER; break;\n" |
| 3744 |
" default: usage(argv[0]);\n" |
| 3745 |
" }\n" |
| 3746 |
" }\n" |
| 3747 |
"\\&\n" |
| 3748 |
" /* -M oder -G ohne -U ist sinnlos */\n" |
| 3749 |
"\\&\n" |
| 3750 |
" if (((uid_map != NULL || gid_map != NULL || map_zero) &&\n" |
| 3751 |
" !(flags & CLONE_NEWUSER)) ||\n" |
| 3752 |
" (map_zero && (uid_map != NULL || gid_map != NULL)))\n" |
| 3753 |
" usage(argv[0]);\n" |
| 3754 |
"\\&\n" |
| 3755 |
" args.argv = &argv[optind];\n" |
| 3756 |
"\\&\n" |
| 3757 |
" /* Wir verwenden eine Pipe, um den Eltern- und Kindprozess zu\n" |
| 3758 |
" synchronisieren, damit sichergestellt wird, dass der Elternprozess\n" |
| 3759 |
" die UID- und GID-Abbildungen einrichtet, bevor der Kindprozess\n" |
| 3760 |
" execve() aufruft. Dies stellt sicher, dass das Kind seine Capabilitys\n" |
| 3761 |
" während des execve() erhält, wenn der typische Fall vorliegt, dass\n" |
| 3762 |
" wir möchten, dass die effektive Benutzerkennung des Kindprozesses auf\n" |
| 3763 |
" 0 in dem neuen Benutzernamensraum abgebildet wird. Ohne diese\n" |
| 3764 |
" Synchronisation würde der Kindprozess seine Capabilitys verlieren,\n" |
| 3765 |
" falls es ein execve() mit einer von Null verschiedenen Benutzerkennung\n" |
| 3766 |
" durchführen würde (siehe die Handbuchseite capabilities(7) für Details\n" |
| 3767 |
" des Übergangs der Capabilitys eines Prozesses während execve()). */\n" |
| 3768 |
"\\&\n" |
| 3769 |
" if (pipe(args.pipe_fd) == -1)\n" |
| 3770 |
" err(EXIT_FAILURE, \"pipe\");\n" |
| 3771 |
"\\&\n" |
| 3772 |
" /* Den Kindprozess in dem oder den neuen Namensraum/-räumen erstellen. */\n" |
| 3773 |
"\\&\n" |
| 3774 |
" child_pid = clone(childFunc, child_stack + STACK_SIZE,\n" |
| 3775 |
" flags | SIGCHLD, &args);\n" |
| 3776 |
" if (child_pid == -1)\n" |
| 3777 |
" err(EXIT_FAILURE, \"clone\");\n" |
| 3778 |
"\\&\n" |
| 3779 |
" /* Elternprozess fällt bis hierher durch. */\n" |
| 3780 |
"\\&\n" |
| 3781 |
" if (verbose)\n" |
| 3782 |
" printf(\"%s: PID des durch clone() erstellten Kindprozesses lautet %jd\\[rs]n\",\n" |
| 3783 |
" argv[0], (intmax_t) child_pid);\n" |
| 3784 |
"\\&\n" |
| 3785 |
" /* Die UID- und GID-Abbildungen in dem Kindprozess aktualisieren. */\n" |
| 3786 |
"\\&\n" |
| 3787 |
" if (uid_map != NULL || map_zero) {\n" |
| 3788 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/uid_map\",\n" |
| 3789 |
" (intmax_t) child_pid);\n" |
| 3790 |
" if (map_zero) {\n" |
| 3791 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %jd 1\",\n" |
| 3792 |
" (intmax_t) getuid());\n" |
| 3793 |
" uid_map = map_buf;\n" |
| 3794 |
" }\n" |
| 3795 |
" update_map(uid_map, map_path);\n" |
| 3796 |
" }\n" |
| 3797 |
"\\&\n" |
| 3798 |
" if (gid_map != NULL || map_zero) {\n" |
| 3799 |
" proc_setgroups_write(child_pid, \"deny\");\n" |
| 3800 |
"\\&\n" |
| 3801 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/gid_map\",\n" |
| 3802 |
" (intmax_t) child_pid);\n" |
| 3803 |
" if (map_zero) {\n" |
| 3804 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\",\n" |
| 3805 |
" (intmax_t) getgid());\n" |
| 3806 |
" gid_map = map_buf;\n" |
| 3807 |
" }\n" |
| 3808 |
" update_map(gid_map, map_path);\n" |
| 3809 |
" }\n" |
| 3810 |
"\\&\n" |
| 3811 |
" /* Das Schreibe-Ende der Pipe schließen, um dem Kindprozess zu\n" |
| 3812 |
" signalisieren, dass wir die UID- und GID-Abbildungen aktualisiert\n" |
| 3813 |
" haben. */\n" |
| 3814 |
"\\&\n" |
| 3815 |
" close(args.pipe_fd[1]);\n" |
| 3816 |
"\\&\n" |
| 3817 |
" if (waitpid(child_pid, NULL, 0) == -1) /* Warten auf Kindprozess */\n" |
| 3818 |
" err(EXIT_FAILURE, \"waitpid\");\n" |
| 3819 |
"\\&\n" |
| 3820 |
" if (verbose)\n" |
| 3821 |
" printf(\"%s: beende\\[rs]n\", argv[0]);\n" |
| 3822 |
"\\&\n" |
| 3823 |
" exit(EXIT_SUCCESS);\n" |
| 3824 |
"}\n" |
| 3825 |
|
| 3826 |
#. type: TH |
| 3827 |
#: fedora-44 fedora-rawhide |
| 3828 |
#, no-wrap |
| 3829 |
msgid "2025-01-11" |
| 3830 |
msgstr "11. Januar 2025" |
| 3831 |
|
| 3832 |
#. type: TH |
| 3833 |
#: fedora-44 fedora-rawhide |
| 3834 |
#, no-wrap |
| 3835 |
msgid "Linux man-pages 6.13" |
| 3836 |
msgstr "Linux man-pages 6.13" |
| 3837 |
|
| 3838 |
#. type: Plain text |
| 3839 |
#: fedora-44 fedora-rawhide |
| 3840 |
#, no-wrap |
| 3841 |
msgid "" |
| 3842 |
"/* userns_child_exec.c\n" |
| 3843 |
"\\&\n" |
| 3844 |
" Licensed under GNU General Public License v2 or later\n" |
| 3845 |
"\\&\n" |
| 3846 |
" Create a child process that executes a shell command in new\n" |
| 3847 |
" namespace(s); allow UID and GID mappings to be specified when\n" |
| 3848 |
" creating a user namespace.\n" |
| 3849 |
"*/\n" |
| 3850 |
"#define _GNU_SOURCE\n" |
| 3851 |
"#include E<lt>err.hE<gt>\n" |
| 3852 |
"#include E<lt>sched.hE<gt>\n" |
| 3853 |
"#include E<lt>unistd.hE<gt>\n" |
| 3854 |
"#include E<lt>stdint.hE<gt>\n" |
| 3855 |
"#include E<lt>stdlib.hE<gt>\n" |
| 3856 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 3857 |
"#include E<lt>signal.hE<gt>\n" |
| 3858 |
"#include E<lt>fcntl.hE<gt>\n" |
| 3859 |
"#include E<lt>stdio.hE<gt>\n" |
| 3860 |
"#include E<lt>string.hE<gt>\n" |
| 3861 |
"#include E<lt>limits.hE<gt>\n" |
| 3862 |
"#include E<lt>errno.hE<gt>\n" |
| 3863 |
"\\&\n" |
| 3864 |
"struct child_args {\n" |
| 3865 |
" char **argv; /* Command to be executed by child, with args */\n" |
| 3866 |
" int pipe_fd[2]; /* Pipe used to synchronize parent and child */\n" |
| 3867 |
"};\n" |
| 3868 |
"\\&\n" |
| 3869 |
"static int verbose;\n" |
| 3870 |
"\\&\n" |
| 3871 |
"static void\n" |
| 3872 |
"usage(char *pname)\n" |
| 3873 |
"{\n" |
| 3874 |
" fprintf(stderr, \"Usage: %s [options] cmd [arg...]\\[rs]n\\[rs]n\", pname);\n" |
| 3875 |
" fprintf(stderr, \"Create a child process that executes a shell \"\n" |
| 3876 |
" \"command in a new user namespace,\\[rs]n\"\n" |
| 3877 |
" \"and possibly also other new namespace(s).\\[rs]n\\[rs]n\");\n" |
| 3878 |
" fprintf(stderr, \"Options can be:\\[rs]n\\[rs]n\");\n" |
| 3879 |
"#define fpe(str) fprintf(stderr, \" %s\", str);\n" |
| 3880 |
" fpe(\"-i New IPC namespace\\[rs]n\");\n" |
| 3881 |
" fpe(\"-m New mount namespace\\[rs]n\");\n" |
| 3882 |
" fpe(\"-n New network namespace\\[rs]n\");\n" |
| 3883 |
" fpe(\"-p New PID namespace\\[rs]n\");\n" |
| 3884 |
" fpe(\"-u New UTS namespace\\[rs]n\");\n" |
| 3885 |
" fpe(\"-U New user namespace\\[rs]n\");\n" |
| 3886 |
" fpe(\"-M uid_map Specify UID map for user namespace\\[rs]n\");\n" |
| 3887 |
" fpe(\"-G gid_map Specify GID map for user namespace\\[rs]n\");\n" |
| 3888 |
" fpe(\"-z Map user\\[aq]s UID and GID to 0 in user namespace\\[rs]n\");\n" |
| 3889 |
" fpe(\" (equivalent to: -M \\[aq]0 E<lt>uidE<gt> 1\\[aq] -G \\[aq]0 E<lt>gidE<gt> 1\\[aq])\\[rs]n\");\n" |
| 3890 |
" fpe(\"-v Display verbose messages\\[rs]n\");\n" |
| 3891 |
" fpe(\"\\[rs]n\");\n" |
| 3892 |
" fpe(\"If -z, -M, or -G is specified, -U is required.\\[rs]n\");\n" |
| 3893 |
" fpe(\"It is not permitted to specify both -z and either -M or -G.\\[rs]n\");\n" |
| 3894 |
" fpe(\"\\[rs]n\");\n" |
| 3895 |
" fpe(\"Map strings for -M and -G consist of records of the form:\\[rs]n\");\n" |
| 3896 |
" fpe(\"\\[rs]n\");\n" |
| 3897 |
" fpe(\" ID-inside-ns ID-outside-ns size\\[rs]n\");\n" |
| 3898 |
" fpe(\"\\[rs]n\");\n" |
| 3899 |
" fpe(\"A map string can contain multiple records, separated\"\n" |
| 3900 |
" \" by commas;\\[rs]n\");\n" |
| 3901 |
" fpe(\"the commas are replaced by newlines before writing\"\n" |
| 3902 |
" \" to map files.\\[rs]n\");\n" |
| 3903 |
"\\&\n" |
| 3904 |
" exit(EXIT_FAILURE);\n" |
| 3905 |
"}\n" |
| 3906 |
"\\&\n" |
| 3907 |
"/* Update the mapping file \\[aq]map_file\\[aq], with the value provided in\n" |
| 3908 |
" \\[aq]mapping\\[aq], a string that defines a UID or GID mapping. A UID or\n" |
| 3909 |
" GID mapping consists of one or more newline-delimited records\n" |
| 3910 |
" of the form:\n" |
| 3911 |
"\\&\n" |
| 3912 |
" ID_inside-ns ID-outside-ns size\n" |
| 3913 |
"\\&\n" |
| 3914 |
" Requiring the user to supply a string that contains newlines is\n" |
| 3915 |
" of course inconvenient for command-line use. Thus, we permit the\n" |
| 3916 |
" use of commas to delimit records in this string, and replace them\n" |
| 3917 |
" with newlines before writing the string to the file. */\n" |
| 3918 |
"\\&\n" |
| 3919 |
"static void\n" |
| 3920 |
"update_map(char *mapping, char *map_file)\n" |
| 3921 |
"{\n" |
| 3922 |
" int fd;\n" |
| 3923 |
" size_t map_len; /* Length of \\[aq]mapping\\[aq] */\n" |
| 3924 |
"\\&\n" |
| 3925 |
" /* Replace commas in mapping string with newlines. */\n" |
| 3926 |
"\\&\n" |
| 3927 |
" map_len = strlen(mapping);\n" |
| 3928 |
" for (size_t j = 0; j E<lt> map_len; j++)\n" |
| 3929 |
" if (mapping[j] == \\[aq],\\[aq])\n" |
| 3930 |
" mapping[j] = \\[aq]\\[rs]n\\[aq];\n" |
| 3931 |
"\\&\n" |
| 3932 |
" fd = open(map_file, O_RDWR);\n" |
| 3933 |
" if (fd == -1) {\n" |
| 3934 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", map_file,\n" |
| 3935 |
" strerror(errno));\n" |
| 3936 |
" exit(EXIT_FAILURE);\n" |
| 3937 |
" }\n" |
| 3938 |
"\\&\n" |
| 3939 |
" if (write(fd, mapping, map_len) != map_len) {\n" |
| 3940 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", map_file,\n" |
| 3941 |
" strerror(errno));\n" |
| 3942 |
" exit(EXIT_FAILURE);\n" |
| 3943 |
" }\n" |
| 3944 |
"\\&\n" |
| 3945 |
" close(fd);\n" |
| 3946 |
"}\n" |
| 3947 |
"\\&\n" |
| 3948 |
"/* Linux 3.19 made a change in the handling of setgroups(2) and\n" |
| 3949 |
" the \\[aq]gid_map\\[aq] file to address a security issue. The issue\n" |
| 3950 |
" allowed *unprivileged* users to employ user namespaces in\n" |
| 3951 |
" order to drop groups. The upshot of the 3.19 changes is that\n" |
| 3952 |
" in order to update the \\[aq]gid_maps\\[aq] file, use of the setgroups()\n" |
| 3953 |
" system call in this user namespace must first be disabled by\n" |
| 3954 |
" writing \"deny\" to one of the /proc/PID/setgroups files for\n" |
| 3955 |
" this namespace. That is the purpose of the following function. */\n" |
| 3956 |
"\\&\n" |
| 3957 |
"static void\n" |
| 3958 |
"proc_setgroups_write(pid_t child_pid, char *str)\n" |
| 3959 |
"{\n" |
| 3960 |
" char setgroups_path[PATH_MAX];\n" |
| 3961 |
" int fd;\n" |
| 3962 |
"\\&\n" |
| 3963 |
" snprintf(setgroups_path, PATH_MAX, \"/proc/%jd/setgroups\",\n" |
| 3964 |
" (intmax_t) child_pid);\n" |
| 3965 |
"\\&\n" |
| 3966 |
" fd = open(setgroups_path, O_RDWR);\n" |
| 3967 |
" if (fd == -1) {\n" |
| 3968 |
"\\&\n" |
| 3969 |
" /* We may be on a system that doesn\\[aq]t support\n" |
| 3970 |
" /proc/PID/setgroups. In that case, the file won\\[aq]t exist,\n" |
| 3971 |
" and the system won\\[aq]t impose the restrictions that Linux 3.19\n" |
| 3972 |
" added. That\\[aq]s fine: we don\\[aq]t need to do anything in order\n" |
| 3973 |
" to permit \\[aq]gid_map\\[aq] to be updated.\n" |
| 3974 |
"\\&\n" |
| 3975 |
" However, if the error from open() was something other than\n" |
| 3976 |
" the ENOENT error that is expected for that case, let the\n" |
| 3977 |
" user know. */\n" |
| 3978 |
"\\&\n" |
| 3979 |
" if (errno != ENOENT)\n" |
| 3980 |
" fprintf(stderr, \"ERROR: open %s: %s\\[rs]n\", setgroups_path,\n" |
| 3981 |
" strerror(errno));\n" |
| 3982 |
" return;\n" |
| 3983 |
" }\n" |
| 3984 |
"\\&\n" |
| 3985 |
" if (write(fd, str, strlen(str)) == -1)\n" |
| 3986 |
" fprintf(stderr, \"ERROR: write %s: %s\\[rs]n\", setgroups_path,\n" |
| 3987 |
" strerror(errno));\n" |
| 3988 |
"\\&\n" |
| 3989 |
" close(fd);\n" |
| 3990 |
"}\n" |
| 3991 |
"\\&\n" |
| 3992 |
"static int /* Start function for cloned child */\n" |
| 3993 |
"childFunc(void *arg)\n" |
| 3994 |
"{\n" |
| 3995 |
" struct child_args *args = arg;\n" |
| 3996 |
" char ch;\n" |
| 3997 |
"\\&\n" |
| 3998 |
" /* Wait until the parent has updated the UID and GID mappings.\n" |
| 3999 |
" See the comment in main(). We wait for end of file on a\n" |
| 4000 |
" pipe that will be closed by the parent process once it has\n" |
| 4001 |
" updated the mappings. */\n" |
| 4002 |
"\\&\n" |
| 4003 |
" close(args-E<gt>pipe_fd[1]); /* Close our descriptor for the write\n" |
| 4004 |
" end of the pipe so that we see EOF\n" |
| 4005 |
" when parent closes its descriptor. */\n" |
| 4006 |
" if (read(args-E<gt>pipe_fd[0], &ch, 1) != 0) {\n" |
| 4007 |
" fprintf(stderr,\n" |
| 4008 |
" \"Failure in child: read from pipe returned != 0\\[rs]n\");\n" |
| 4009 |
" exit(EXIT_FAILURE);\n" |
| 4010 |
" }\n" |
| 4011 |
"\\&\n" |
| 4012 |
" close(args-E<gt>pipe_fd[0]);\n" |
| 4013 |
"\\&\n" |
| 4014 |
" /* Execute a shell command. */\n" |
| 4015 |
"\\&\n" |
| 4016 |
" printf(\"About to exec %s\\[rs]n\", args-E<gt>argv[0]);\n" |
| 4017 |
" execvp(args-E<gt>argv[0], args-E<gt>argv);\n" |
| 4018 |
" err(EXIT_FAILURE, \"execvp\");\n" |
| 4019 |
"}\n" |
| 4020 |
"\\&\n" |
| 4021 |
"#define STACK_SIZE (1024 * 1024)\n" |
| 4022 |
"\\&\n" |
| 4023 |
"static char child_stack[STACK_SIZE]; /* Space for child\\[aq]s stack */\n" |
| 4024 |
"\\&\n" |
| 4025 |
"int\n" |
| 4026 |
"main(int argc, char *argv[])\n" |
| 4027 |
"{\n" |
| 4028 |
" int flags, opt, map_zero;\n" |
| 4029 |
" pid_t child_pid;\n" |
| 4030 |
" struct child_args args;\n" |
| 4031 |
" char *uid_map, *gid_map;\n" |
| 4032 |
" const int MAP_BUF_SIZE = 100;\n" |
| 4033 |
" char map_buf[MAP_BUF_SIZE];\n" |
| 4034 |
" char map_path[PATH_MAX];\n" |
| 4035 |
"\\&\n" |
| 4036 |
" /* Parse command-line options. The initial \\[aq]+\\[aq] character in\n" |
| 4037 |
" the final getopt() argument prevents GNU-style permutation\n" |
| 4038 |
" of command-line options. That\\[aq]s useful, since sometimes\n" |
| 4039 |
" the \\[aq]command\\[aq] to be executed by this program itself\n" |
| 4040 |
" has command-line options. We don\\[aq]t want getopt() to treat\n" |
| 4041 |
" those as options to this program. */\n" |
| 4042 |
"\\&\n" |
| 4043 |
" flags = 0;\n" |
| 4044 |
" verbose = 0;\n" |
| 4045 |
" gid_map = NULL;\n" |
| 4046 |
" uid_map = NULL;\n" |
| 4047 |
" map_zero = 0;\n" |
| 4048 |
" while ((opt = getopt(argc, argv, \"+imnpuUM:G:zv\")) != -1) {\n" |
| 4049 |
" switch (opt) {\n" |
| 4050 |
" case \\[aq]i\\[aq]: flags |= CLONE_NEWIPC; break;\n" |
| 4051 |
" case \\[aq]m\\[aq]: flags |= CLONE_NEWNS; break;\n" |
| 4052 |
" case \\[aq]n\\[aq]: flags |= CLONE_NEWNET; break;\n" |
| 4053 |
" case \\[aq]p\\[aq]: flags |= CLONE_NEWPID; break;\n" |
| 4054 |
" case \\[aq]u\\[aq]: flags |= CLONE_NEWUTS; break;\n" |
| 4055 |
" case \\[aq]v\\[aq]: verbose = 1; break;\n" |
| 4056 |
" case \\[aq]z\\[aq]: map_zero = 1; break;\n" |
| 4057 |
" case \\[aq]M\\[aq]: uid_map = optarg; break;\n" |
| 4058 |
" case \\[aq]G\\[aq]: gid_map = optarg; break;\n" |
| 4059 |
" case \\[aq]U\\[aq]: flags |= CLONE_NEWUSER; break;\n" |
| 4060 |
" default: usage(argv[0]);\n" |
| 4061 |
" }\n" |
| 4062 |
" }\n" |
| 4063 |
"\\&\n" |
| 4064 |
" /* -M or -G without -U is nonsensical */\n" |
| 4065 |
"\\&\n" |
| 4066 |
" if (((uid_map != NULL || gid_map != NULL || map_zero) &&\n" |
| 4067 |
" !(flags & CLONE_NEWUSER)) ||\n" |
| 4068 |
" (map_zero && (uid_map != NULL || gid_map != NULL)))\n" |
| 4069 |
" usage(argv[0]);\n" |
| 4070 |
"\\&\n" |
| 4071 |
" args.argv = &argv[optind];\n" |
| 4072 |
"\\&\n" |
| 4073 |
" /* We use a pipe to synchronize the parent and child, in order to\n" |
| 4074 |
" ensure that the parent sets the UID and GID maps before the child\n" |
| 4075 |
" calls execve(). This ensures that the child maintains its\n" |
| 4076 |
" capabilities during the execve() in the common case where we\n" |
| 4077 |
" want to map the child\\[aq]s effective user ID to 0 in the new user\n" |
| 4078 |
" namespace. Without this synchronization, the child would lose\n" |
| 4079 |
" its capabilities if it performed an execve() with nonzero\n" |
| 4080 |
" user IDs (see the capabilities(7) man page for details of the\n" |
| 4081 |
" transformation of a process\\[aq]s capabilities during execve()). */\n" |
| 4082 |
"\\&\n" |
| 4083 |
" if (pipe(args.pipe_fd) == -1)\n" |
| 4084 |
" err(EXIT_FAILURE, \"pipe\");\n" |
| 4085 |
"\\&\n" |
| 4086 |
" /* Create the child in new namespace(s). */\n" |
| 4087 |
"\\&\n" |
| 4088 |
" child_pid = clone(childFunc, child_stack + STACK_SIZE,\n" |
| 4089 |
" flags | SIGCHLD, &args);\n" |
| 4090 |
" if (child_pid == -1)\n" |
| 4091 |
" err(EXIT_FAILURE, \"clone\");\n" |
| 4092 |
"\\&\n" |
| 4093 |
" /* Parent falls through to here. */\n" |
| 4094 |
"\\&\n" |
| 4095 |
" if (verbose)\n" |
| 4096 |
" printf(\"%s: PID of child created by clone() is %jd\\[rs]n\",\n" |
| 4097 |
" argv[0], (intmax_t) child_pid);\n" |
| 4098 |
"\\&\n" |
| 4099 |
" /* Update the UID and GID maps in the child. */\n" |
| 4100 |
"\\&\n" |
| 4101 |
" if (uid_map != NULL || map_zero) {\n" |
| 4102 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/uid_map\",\n" |
| 4103 |
" (intmax_t) child_pid);\n" |
| 4104 |
" if (map_zero) {\n" |
| 4105 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %jd 1\",\n" |
| 4106 |
" (intmax_t) getuid());\n" |
| 4107 |
" uid_map = map_buf;\n" |
| 4108 |
" }\n" |
| 4109 |
" update_map(uid_map, map_path);\n" |
| 4110 |
" }\n" |
| 4111 |
"\\&\n" |
| 4112 |
" if (gid_map != NULL || map_zero) {\n" |
| 4113 |
" proc_setgroups_write(child_pid, \"deny\");\n" |
| 4114 |
"\\&\n" |
| 4115 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/gid_map\",\n" |
| 4116 |
" (intmax_t) child_pid);\n" |
| 4117 |
" if (map_zero) {\n" |
| 4118 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\",\n" |
| 4119 |
" (intmax_t) getgid());\n" |
| 4120 |
" gid_map = map_buf;\n" |
| 4121 |
" }\n" |
| 4122 |
" update_map(gid_map, map_path);\n" |
| 4123 |
" }\n" |
| 4124 |
"\\&\n" |
| 4125 |
" /* Close the write end of the pipe, to signal to the child that we\n" |
| 4126 |
" have updated the UID and GID maps. */\n" |
| 4127 |
"\\&\n" |
| 4128 |
" close(args.pipe_fd[1]);\n" |
| 4129 |
"\\&\n" |
| 4130 |
" if (waitpid(child_pid, NULL, 0) == -1) /* Wait for child */\n" |
| 4131 |
" err(EXIT_FAILURE, \"waitpid\");\n" |
| 4132 |
"\\&\n" |
| 4133 |
" if (verbose)\n" |
| 4134 |
" printf(\"%s: terminating\\[rs]n\", argv[0]);\n" |
| 4135 |
"\\&\n" |
| 4136 |
" exit(EXIT_SUCCESS);\n" |
| 4137 |
"}\n" |
| 4138 |
msgstr "" |
| 4139 |
"/* userns_child_exec.c\n" |
| 4140 |
"\\&\n" |
| 4141 |
" Lizenziert unter der GNU General Public License v2 oder neuer\n" |
| 4142 |
"\\&\n" |
| 4143 |
" Erzeugt einen Kindprozess, der einen Shell-Befehl in einem oder mehreren\n" |
| 4144 |
" neuen Namensräumen ausführt; erlaubt UID- und GID-Abbildungen anzugeben,\n" |
| 4145 |
" wenn ein Benutzernamensraum erstellt wird\n" |
| 4146 |
"*/\n" |
| 4147 |
"#define _GNU_SOURCE\n" |
| 4148 |
"#include E<lt>err.hE<gt>\n" |
| 4149 |
"#include E<lt>sched.hE<gt>\n" |
| 4150 |
"#include E<lt>unistd.hE<gt>\n" |
| 4151 |
"#include E<lt>stdint.hE<gt>\n" |
| 4152 |
"#include E<lt>stdlib.hE<gt>\n" |
| 4153 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 4154 |
"#include E<lt>signal.hE<gt>\n" |
| 4155 |
"#include E<lt>fcntl.hE<gt>\n" |
| 4156 |
"#include E<lt>stdio.hE<gt>\n" |
| 4157 |
"#include E<lt>string.hE<gt>\n" |
| 4158 |
"#include E<lt>limits.hE<gt>\n" |
| 4159 |
"#include E<lt>errno.hE<gt>\n" |
| 4160 |
"\\&\n" |
| 4161 |
"struct child_args {\n" |
| 4162 |
" char **argv; /* Vom Kind auszuführender Befehl, mit Argumenten */\n" |
| 4163 |
" int pipe_fd[2]; /* Zur Sychronisation Eltern/Kind verwandte Pipe */\n" |
| 4164 |
"};\n" |
| 4165 |
"\\&\n" |
| 4166 |
"static int verbose;\n" |
| 4167 |
"\\&\n" |
| 4168 |
"static void\n" |
| 4169 |
"usage(char *pname)\n" |
| 4170 |
"{\n" |
| 4171 |
" fprintf(stderr, \"Aufruf: %s [Optionen] Bef [Arg…]\\[rs]n\\[rs]n\", pname);\n" |
| 4172 |
" fprintf(stderr, \"Erstellt einen Kindprozess, der einen Shellbefehl \"\n" |
| 4173 |
" \"in einem neuen Benutzernamensraum ausführt\\[rs]n\"\n" |
| 4174 |
" \"und möglicherweise auch anderen neuen Namensräumen.\\[rs]n\\[rs]n\");\n" |
| 4175 |
" fprintf(stderr, \"Optionen können sein:\\[rs]n\\[rs]n\");\n" |
| 4176 |
"#define fpe(str) fprintf(stderr, \" %s\", str);\n" |
| 4177 |
" fpe(\"-i Neuer IPC-Namensraum\\[rs]n\");\n" |
| 4178 |
" fpe(\"-m Neuer Einhänge-Namensraum\\[rs]n\");\n" |
| 4179 |
" fpe(\"-n Neuer Netzwerk-Namensraum\\[rs]n\");\n" |
| 4180 |
" fpe(\"-p Neuer PID-Namensraum\\[rs]n\");\n" |
| 4181 |
" fpe(\"-u Neuer UTS-Namensraum\\[rs]n\");\n" |
| 4182 |
" fpe(\"-U Neuer Benutzernamensraum\\[rs]n\");\n" |
| 4183 |
" fpe(\"-M uid_map Angabe einer UID-Abbildung für Benutzernamensraum\\[rs]n\");\n" |
| 4184 |
" fpe(\"-G gid_map Angabe einer GID-Abbildung für Benutzernamensraum\\[rs]n\");\n" |
| 4185 |
" fpe(\"-z Benutzer-UID und -GID auf 0 im Benutzernamensraum abbilden\\[rs]n\");\n" |
| 4186 |
" fpe(\" (äquivalent zu: -M \\[aq]0 E<lt>uidE<gt> 1\\[aq] -G \\[aq]0 E<lt>gidE<gt> 1\\[aq])\\[rs]n\");\n" |
| 4187 |
" fpe(\"-v Anzeige ausführlicher Meldungen\\[rs]n\");\n" |
| 4188 |
" fpe(\"\\[rs]n\");\n" |
| 4189 |
" fpe(\"Falls -z, -M oder -G angegeben wird, ist -U verpflichtend.\\[rs]n\");\n" |
| 4190 |
" fpe(\"Es ist nicht erlaubt, sowohl -z als auch entweder -M oder -G anzugeben.\\[rs]n\");\n" |
| 4191 |
" fpe(\"\\[rs]n\");\n" |
| 4192 |
" fpe(\"Abbildungszeichenketten für -M und -G bestehen aus Datensätzen der folgenden Form:\\[rs]n\");\n" |
| 4193 |
" fpe(\"\\en\");\n" |
| 4194 |
" fpe(\" Namensrauminterne-Kennung Namensraumexterne-Kennung Größe\\[rs]n\");\n" |
| 4195 |
" fpe(\"\\[rs]n\");\n" |
| 4196 |
" fpe(\"Eine Abbildungszeichenkette kann mehrere Datensätze enthalten,\"\n" |
| 4197 |
" \" getrennt durch Kommata;\\[rs]n\");\n" |
| 4198 |
" fpe(\"die Kommata werden vor dem Schreiben in die Abbildungsdateien durch\"\n" |
| 4199 |
" \" Zeilenumbrüche ersetzt.\\[rs]n\");\n" |
| 4200 |
"\\&\n" |
| 4201 |
" exit(EXIT_FAILURE);\n" |
| 4202 |
"}\n" |
| 4203 |
"\\&\n" |
| 4204 |
"/* Aktualisiert die Abbildungsdatei »map_file« mit dem in »mapping«\n" |
| 4205 |
" bereitgestellten Wert, einer Zeichenkette, die eine UID- oder GID-\n" |
| 4206 |
" Abbildung definiert. Eine UID- oder GID-Abbildung besteht aus einem oder\n" |
| 4207 |
" mehreren, durch Zeilenumbrüche getrennten Datensätzen der folgenden Form:\n" |
| 4208 |
"\\&\n" |
| 4209 |
" Namensrauminterne-Kennung Namensraumexterne-Kennung Größe\n" |
| 4210 |
"\\&\n" |
| 4211 |
" Für die Befehlszeile zu verlangen, dass Zeichenketten mit Zeilenumbrüchen\n" |
| 4212 |
" bereitgestellt werden, ist natürlich unbequem. Daher erlauben wir die\n" |
| 4213 |
" Verwendung von Kommata zur Begrenzung von Datensätzen in dieser\n" |
| 4214 |
" Zeichenkette und ersetzen sie vor dem Schreiben in die Datei durch\n" |
| 4215 |
" Zeilenumbrüche. */\n" |
| 4216 |
"\\&\n" |
| 4217 |
"static void\n" |
| 4218 |
"update_map(char *mapping, char *map_file)\n" |
| 4219 |
"{\n" |
| 4220 |
" int fd;\n" |
| 4221 |
" size_t map_len; /* Länge der »mapping« */\n" |
| 4222 |
"\\&\n" |
| 4223 |
" /* Kommata durch Zeilenumbrüche in Abbildungszeichenkette ersetzen. */\n" |
| 4224 |
"\\&\n" |
| 4225 |
" map_len = strlen(mapping);\n" |
| 4226 |
" for (size_t j = 0; j E<lt> map_len; j++)\n" |
| 4227 |
" if (mapping[j] == \\[aq],\\[aq])\n" |
| 4228 |
" mapping[j] = \\[aq]\\[rs]n\\[aq];\n" |
| 4229 |
"\\&\n" |
| 4230 |
" fd = open(map_file, O_RDWR);\n" |
| 4231 |
" if (fd == -1) {\n" |
| 4232 |
" fprintf(stderr, \"FEHLER: open %s: %s\\[rs]n\", map_file,\n" |
| 4233 |
" strerror(errno));\n" |
| 4234 |
" exit(EXIT_FAILURE);\n" |
| 4235 |
" }\n" |
| 4236 |
"\\&\n" |
| 4237 |
" if (write(fd, mapping, map_len) != map_len) {\n" |
| 4238 |
" fprintf(stderr, \"FEHLER: write %s: %s\\en\", map_file,\n" |
| 4239 |
" strerror(errno));\n" |
| 4240 |
" exit(EXIT_FAILURE);\n" |
| 4241 |
" }\n" |
| 4242 |
"\\&\n" |
| 4243 |
" close(fd);\n" |
| 4244 |
"}\n" |
| 4245 |
"\\&\n" |
| 4246 |
"/* Linux 3.19 änderte die Handhabung von setgroups(2) und die Datei\n" |
| 4247 |
" »gid_map«, um ein Sicherheitsproblem zu adressieren. Das Problem erlaubte\n" |
| 4248 |
" *nicht privilegierten* Benutzern einen Benutzernamensraum einzusetzen, um\n" |
| 4249 |
" Gruppen abzugeben. Das Fazit der 3.19er Änderung ist, dass die Verwendung\n" |
| 4250 |
" des Systemaufrufs setgroups() in diesem Benutzernamensraum zuerst durch\n" |
| 4251 |
" Schreiben von »deny« in eine der Dateien /proc/PID/setgroups für diesen\n" |
| 4252 |
" Namensraum erfolgen muss, damit die Datei »gid_maps« aktualisert wird.\n" |
| 4253 |
" Das ist der Zweck der folgenden Funktion. */\n" |
| 4254 |
"\\&\n" |
| 4255 |
"static void\n" |
| 4256 |
"proc_setgroups_write(pid_t child_pid, char *str)\n" |
| 4257 |
"{\n" |
| 4258 |
" char setgroups_path[PATH_MAX];\n" |
| 4259 |
" int fd;\n" |
| 4260 |
"\\&\n" |
| 4261 |
" snprintf(setgroups_path, PATH_MAX, \"/proc/%jd/setgroups\",\n" |
| 4262 |
" (intmax_t) child_pid);\n" |
| 4263 |
"\\&\n" |
| 4264 |
" fd = open(setgroups_path, O_RDWR);\n" |
| 4265 |
" if (fd == -1) {\n" |
| 4266 |
"\\&\n" |
| 4267 |
" /* Vielleicht sind wir auf einem System, das /proc/PID/setgroups\n" |
| 4268 |
" nicht unterstützt. Dann wird diese Datei nicht existieren und das\n" |
| 4269 |
" System wird nicht die Beschränkungen erzwingen, die Linux 3.19\n" |
| 4270 |
" hinzugefügt hat. Das ist OK, wir brauchen nichts zu machen, damit\n" |
| 4271 |
" »gid_map« aktualisiert wird.\n" |
| 4272 |
"\\&\n" |
| 4273 |
" Falls allerdings der Fehler von open() sich von ENOENT\n" |
| 4274 |
" unterscheidet (der in diesem Fall zu erwarten ist), informieren\n" |
| 4275 |
" wir den Benutzer. */\n" |
| 4276 |
"\\&\n" |
| 4277 |
" if (errno != ENOENT)\n" |
| 4278 |
" fprintf(stderr, \"FEHLER: open %s: %s\\[rs]n\", setgroups_path,\n" |
| 4279 |
" strerror(errno));\n" |
| 4280 |
" return;\n" |
| 4281 |
" }\n" |
| 4282 |
"\\&\n" |
| 4283 |
" if (write(fd, str, strlen(str)) == -1)\n" |
| 4284 |
" fprintf(stderr, \"FEHLER: write %s: %s\\[rs]n\", setgroups_path,\n" |
| 4285 |
" strerror(errno));\n" |
| 4286 |
"\\&\n" |
| 4287 |
" close(fd);\n" |
| 4288 |
"}\n" |
| 4289 |
"\\&\n" |
| 4290 |
"static int /* Funktion für geklontes Kind starten */\n" |
| 4291 |
"childFunc(void *arg)\n" |
| 4292 |
"{\n" |
| 4293 |
" struct child_args *args = arg;\n" |
| 4294 |
" char ch;\n" |
| 4295 |
"\\&\n" |
| 4296 |
" /* Warten, bis der Elternprozess seine UID- und GID-Abbildungen\n" |
| 4297 |
" aktualisiert hat. Siehe den Kommentar in main(). Wir warten, bis\n" |
| 4298 |
" auf einer Pipe das Dateiende kommt, die vom Elternprozess geschlossen\n" |
| 4299 |
" wird, sobald er seine Abbildungen aktualisiert hat. */\n" |
| 4300 |
"\\&\n" |
| 4301 |
" close(args-E<gt>pipe_fd[1]); /* Unseren Deskriptor für das Ende des\n" |
| 4302 |
" Schreibens schließen, so dass wir EOF\n" |
| 4303 |
" sehen, wenn der Elternprozess seinen\n" |
| 4304 |
" Deskriptor schließt. */\n" |
| 4305 |
" if (read(args-E<gt>pipe_fd[0], &ch, 1) != 0) {\n" |
| 4306 |
" fprintf(stderr,\n" |
| 4307 |
" \"Fehler im Kind: Lesen von der Pipe lieferte != 0\\[rs]n\");\n" |
| 4308 |
" exit(EXIT_FAILURE);\n" |
| 4309 |
" }\n" |
| 4310 |
"\\&\n" |
| 4311 |
" close(args-E<gt>pipe_fd[0]);\n" |
| 4312 |
"\\&\n" |
| 4313 |
" /* Einen Shell-Befehl ausführen. */\n" |
| 4314 |
"\\&\n" |
| 4315 |
" printf(\"Gleich wird exec %s ausgeführt\\[rs]n\", args-E<gt>argv[0]);\n" |
| 4316 |
" execvp(args-E<gt>argv[0], args-E<gt>argv);\n" |
| 4317 |
" err(EXIT_FAILURE, \"execvp\");\n" |
| 4318 |
"}\n" |
| 4319 |
"\\&\n" |
| 4320 |
"#define STACK_SIZE (1024 * 1024)\n" |
| 4321 |
"\\&\n" |
| 4322 |
"static char child_stack[STACK_SIZE]; /* Platz für den Stack des Kindes */\n" |
| 4323 |
"\\&\n" |
| 4324 |
"int\n" |
| 4325 |
"main(int argc, char *argv[])\n" |
| 4326 |
"{\n" |
| 4327 |
" int flags, opt, map_zero;\n" |
| 4328 |
" pid_t child_pid;\n" |
| 4329 |
" struct child_args args;\n" |
| 4330 |
" char *uid_map, *gid_map;\n" |
| 4331 |
" const int MAP_BUF_SIZE = 100;\n" |
| 4332 |
" char map_buf[MAP_BUF_SIZE];\n" |
| 4333 |
" char map_path[PATH_MAX];\n" |
| 4334 |
"\\&\n" |
| 4335 |
" /* Befehlszeilenoptionen auswerten. Das anfängliche »+«-Zeichen in dem\n" |
| 4336 |
" abschließenden getopt()-Argument verhindert GNU-artige Vertauschungen\n" |
| 4337 |
" der Befehlszeilenoptionen. Das ist nützlich, da manchmal der von\n" |
| 4338 |
" diesem Programm selbst ausgeführte »Befehl« über Befehlszeilenoptionen\n" |
| 4339 |
" verfügt. Wir wollen nicht, dass getopt() solche als Optionen für\n" |
| 4340 |
" dieses Programm behandelt. */\n" |
| 4341 |
"\\&\n" |
| 4342 |
" flags = 0;\n" |
| 4343 |
" verbose = 0;\n" |
| 4344 |
" gid_map = NULL;\n" |
| 4345 |
" uid_map = NULL;\n" |
| 4346 |
" map_zero = 0;\n" |
| 4347 |
" while ((opt = getopt(argc, argv, \"+imnpuUM:G:zv\")) != -1) {\n" |
| 4348 |
" switch (opt) {\n" |
| 4349 |
" case \\[aq]i\\[aq]: flags |= CLONE_NEWIPC; break;\n" |
| 4350 |
" case \\[aq]m\\[aq]: flags |= CLONE_NEWNS; break;\n" |
| 4351 |
" case \\[aq]n\\[aq]: flags |= CLONE_NEWNET; break;\n" |
| 4352 |
" case \\[aq]p\\[aq]: flags |= CLONE_NEWPID; break;\n" |
| 4353 |
" case \\[aq]u\\[aq]: flags |= CLONE_NEWUTS; break;\n" |
| 4354 |
" case \\[aq]v\\[aq]: verbose = 1; break;\n" |
| 4355 |
" case \\[aq]z\\[aq]: map_zero = 1; break;\n" |
| 4356 |
" case \\[aq]M\\[aq]: uid_map = optarg; break;\n" |
| 4357 |
" case \\[aq]G\\[aq]: gid_map = optarg; break;\n" |
| 4358 |
" case \\[aq]U\\[aq]: flags |= CLONE_NEWUSER; break;\n" |
| 4359 |
" default: usage(argv[0]);\n" |
| 4360 |
" }\n" |
| 4361 |
" }\n" |
| 4362 |
"\\&\n" |
| 4363 |
" /* -M oder -G ohne -U ist sinnlos */\n" |
| 4364 |
"\\&\n" |
| 4365 |
" if (((uid_map != NULL || gid_map != NULL || map_zero) &&\n" |
| 4366 |
" !(flags & CLONE_NEWUSER)) ||\n" |
| 4367 |
" (map_zero && (uid_map != NULL || gid_map != NULL)))\n" |
| 4368 |
" usage(argv[0]);\n" |
| 4369 |
"\\&\n" |
| 4370 |
" args.argv = &argv[optind];\n" |
| 4371 |
"\\&\n" |
| 4372 |
" /* Wir verwenden eine Pipe, um den Eltern- und Kindprozess zu\n" |
| 4373 |
" synchronisieren, damit sichergestellt wird, dass der Elternprozess\n" |
| 4374 |
" die UID- und GID-Abbildungen einrichtet, bevor der Kindprozess\n" |
| 4375 |
" execve() aufruft. Dies stellt sicher, dass das Kind seine Capabilitys\n" |
| 4376 |
" während des execve() erhält, wenn der typische Fall vorliegt, dass\n" |
| 4377 |
" wir möchten, dass die effektive Benutzerkennung des Kindprozesses auf\n" |
| 4378 |
" 0 in dem neuen Benutzernamensraum abgebildet wird. Ohne diese\n" |
| 4379 |
" Synchronisation würde der Kindprozess seine Capabilitys verlieren,\n" |
| 4380 |
" falls es ein execve() mit einer von Null verschiedenen Benutzerkennung\n" |
| 4381 |
" durchführen würde (siehe die Handbuchseite capabilities(7) für Details\n" |
| 4382 |
" des Übergangs der Capabilitys eines Prozesses während execve()). */\n" |
| 4383 |
"\\&\n" |
| 4384 |
" if (pipe(args.pipe_fd) == -1)\n" |
| 4385 |
" err(EXIT_FAILURE, \"pipe\");\n" |
| 4386 |
"\\&\n" |
| 4387 |
" /* Den Kindprozess in dem oder den neuen Namensraum/-räumen erstellen. */\n" |
| 4388 |
"\\&\n" |
| 4389 |
" child_pid = clone(childFunc, child_stack + STACK_SIZE,\n" |
| 4390 |
" flags | SIGCHLD, &args);\n" |
| 4391 |
" if (child_pid == -1)\n" |
| 4392 |
" err(EXIT_FAILURE, \"clone\");\n" |
| 4393 |
"\\&\n" |
| 4394 |
" /* Elternprozess fällt bis hierher durch. */\n" |
| 4395 |
"\\&\n" |
| 4396 |
" if (verbose)\n" |
| 4397 |
" printf(\"%s: PID des durch clone() erstellten Kindprozesses lautet %jd\\[rs]n\",\n" |
| 4398 |
" argv[0], (intmax_t) child_pid);\n" |
| 4399 |
"\\&\n" |
| 4400 |
" /* Die UID- und GID-Abbildungen in dem Kindprozess aktualisieren. */\n" |
| 4401 |
"\\&\n" |
| 4402 |
" if (uid_map != NULL || map_zero) {\n" |
| 4403 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/uid_map\",\n" |
| 4404 |
" (intmax_t) child_pid);\n" |
| 4405 |
" if (map_zero) {\n" |
| 4406 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %jd 1\",\n" |
| 4407 |
" (intmax_t) getuid());\n" |
| 4408 |
" uid_map = map_buf;\n" |
| 4409 |
" }\n" |
| 4410 |
" update_map(uid_map, map_path);\n" |
| 4411 |
" }\n" |
| 4412 |
"\\&\n" |
| 4413 |
" if (gid_map != NULL || map_zero) {\n" |
| 4414 |
" proc_setgroups_write(child_pid, \"deny\");\n" |
| 4415 |
"\\&\n" |
| 4416 |
" snprintf(map_path, PATH_MAX, \"/proc/%jd/gid_map\",\n" |
| 4417 |
" (intmax_t) child_pid);\n" |
| 4418 |
" if (map_zero) {\n" |
| 4419 |
" snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\",\n" |
| 4420 |
" (intmax_t) getgid());\n" |
| 4421 |
" gid_map = map_buf;\n" |
| 4422 |
" }\n" |
| 4423 |
" update_map(gid_map, map_path);\n" |
| 4424 |
" }\n" |
| 4425 |
"\\&\n" |
| 4426 |
" /* Das Schreibe-Ende der Pipe schließen, um dem Kindprozess zu\n" |
| 4427 |
" signalisieren, dass wir die UID- und GID-Abbildungen aktualisiert\n" |
| 4428 |
" haben. */\n" |
| 4429 |
"\\&\n" |
| 4430 |
" close(args.pipe_fd[1]);\n" |
| 4431 |
"\\&\n" |
| 4432 |
" if (waitpid(child_pid, NULL, 0) == -1) /* Warten auf Kindprozess */\n" |
| 4433 |
" err(EXIT_FAILURE, \"waitpid\");\n" |
| 4434 |
"\\&\n" |
| 4435 |
" if (verbose)\n" |
| 4436 |
" printf(\"%s: beende\\[rs]n\", argv[0]);\n" |
| 4437 |
"\\&\n" |
| 4438 |
" exit(EXIT_SUCCESS);\n" |
| 4439 |
"}\n" |
| 4440 |
|
| 4441 |
#. type: TH |
| 4442 |
#: mageia-cauldron |
| 4443 |
#, no-wrap |
| 4444 |
msgid "Linux man-pages 6.17" |
| 4445 |
msgstr "Linux man-pages 6.17" |
| 4446 |
|
| 4447 |
#. type: TH |
| 4448 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 4449 |
#, no-wrap |
| 4450 |
msgid "Linux man-pages (unreleased)" |
| 4451 |
msgstr "Linux man-pages (unveröffentlicht)" |