Debian Codegraph @

templates/man2/setns.2.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:43+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "setns"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "setns - reassociate thread with a namespace"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid ""
77 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
78 "B<#include E<lt>sched.hE<gt>>\n"
79 msgstr ""
80
81 #. type: Plain text
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 #, no-wrap
85 msgid "B<int setns(int >I<fd>B<, int >I<nstype>B<);>\n"
86 msgstr ""
87
88 #. type: SH
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 #, no-wrap
92 msgid "DESCRIPTION"
93 msgstr ""
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 msgid ""
99 "The B<setns>() system call allows the calling thread to move into different "
100 "namespaces. The I<fd> argument is one of the following:"
101 msgstr ""
102
103 #. type: IP
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 #, no-wrap
107 msgid "\\[bu]"
108 msgstr ""
109
110 #. type: Plain text
111 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
112 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
113 msgid ""
114 "a file descriptor referring to one of the magic links in a I</proc/>pidI</ns/"
115 "> directory (or a bind mount to such a link);"
116 msgstr ""
117
118 #. type: Plain text
119 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
120 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
121 msgid "a PID file descriptor (see B<pidfd_open>(2))."
122 msgstr ""
123
124 #. type: Plain text
125 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
126 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
127 msgid "The I<nstype> argument is interpreted differently in each case."
128 msgstr ""
129
130 #. type: SS
131 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
132 #: opensuse-tumbleweed
133 #, no-wrap
134 msgid "fd refers to a \\f[I]/proc/\\fBpid\\f[I]/ns/\\fB link"
135 msgstr ""
136
137 #. type: Plain text
138 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
139 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
140 msgid ""
141 "If I<fd> refers to a I</proc/>pidI</ns/> link, then B<setns>() reassociates "
142 "the calling thread with the namespace associated with that link, subject to "
143 "any constraints imposed by the I<nstype> argument. In this usage, each call "
144 "to B<setns>() changes just one of the caller's namespace memberships."
145 msgstr ""
146
147 #. type: Plain text
148 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
149 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
150 msgid ""
151 "The I<nstype> argument specifies which type of namespace the calling thread "
152 "may be reassociated with. This argument can have I<one> of the following "
153 "values:"
154 msgstr ""
155
156 #. type: TP
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 #, no-wrap
160 msgid "B<0>"
161 msgstr ""
162
163 #. type: Plain text
164 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
165 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
166 msgid "Allow any type of namespace to be joined."
167 msgstr ""
168
169 #. type: TP
170 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
171 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
172 #, no-wrap
173 msgid "B<CLONE_NEWCGROUP> (since Linux 4.6)"
174 msgstr ""
175
176 #. type: Plain text
177 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
178 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
179 msgid "I<fd> must refer to a cgroup namespace."
180 msgstr ""
181
182 #. type: TP
183 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
184 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
185 #, no-wrap
186 msgid "B<CLONE_NEWIPC> (since Linux 3.0)"
187 msgstr ""
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 "I<fd> must refer to an IPC namespace."
193 msgstr ""
194
195 #. type: TP
196 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
197 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
198 #, no-wrap
199 msgid "B<CLONE_NEWNET> (since Linux 3.0)"
200 msgstr ""
201
202 #. type: Plain text
203 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
204 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
205 msgid "I<fd> must refer to a network namespace."
206 msgstr ""
207
208 #. type: TP
209 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
210 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
211 #, no-wrap
212 msgid "B<CLONE_NEWNS> (since Linux 3.8)"
213 msgstr ""
214
215 #. type: Plain text
216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
218 msgid "I<fd> must refer to a mount namespace."
219 msgstr ""
220
221 #. type: TP
222 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
223 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
224 #, no-wrap
225 msgid "B<CLONE_NEWPID> (since Linux 3.8)"
226 msgstr ""
227
228 #. type: Plain text
229 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
230 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
231 msgid "I<fd> must refer to a descendant PID namespace."
232 msgstr ""
233
234 #. type: TP
235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
237 #, no-wrap
238 msgid "B<CLONE_NEWTIME> (since Linux 5.8)"
239 msgstr ""
240
241 #. commit 76c12881a38aaa83e1eb4ce2fada36c3a732bad4
242 #. type: Plain text
243 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
244 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
245 msgid "I<fd> must refer to a time namespace."
246 msgstr ""
247
248 #. type: TP
249 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
250 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
251 #, no-wrap
252 msgid "B<CLONE_NEWUSER> (since Linux 3.8)"
253 msgstr ""
254
255 #. type: Plain text
256 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
257 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
258 msgid "I<fd> must refer to a user namespace."
259 msgstr ""
260
261 #. type: TP
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 #, no-wrap
265 msgid "B<CLONE_NEWUTS> (since Linux 3.0)"
266 msgstr ""
267
268 #. type: Plain text
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 msgid "I<fd> must refer to a UTS namespace."
272 msgstr ""
273
274 #. type: Plain text
275 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
276 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
277 msgid ""
278 "Specifying I<nstype> as 0 suffices if the caller knows (or does not care) "
279 "what type of namespace is referred to by I<fd>. Specifying a nonzero value "
280 "for I<nstype> is useful if the caller does not know what type of namespace "
281 "is referred to by I<fd> and wants to ensure that the namespace is of a "
282 "particular type. (The caller might not know the type of the namespace "
283 "referred to by I<fd> if the file descriptor was opened by another process "
284 "and, for example, passed to the caller via a UNIX domain socket.)"
285 msgstr ""
286
287 #. type: SS
288 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
289 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
290 #, no-wrap
291 msgid "fd is a PID file descriptor"
292 msgstr ""
293
294 #. type: Plain text
295 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
296 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
297 msgid ""
298 "Since Linux 5.8, I<fd> may refer to a PID file descriptor obtained from "
299 "B<pidfd_open>(2) or B<clone>(2). In this usage, B<setns>() atomically "
300 "moves the calling thread into one or more of the same namespaces as the "
301 "thread referred to by I<fd>."
302 msgstr ""
303
304 #. type: Plain text
305 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
306 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
307 msgid ""
308 "The I<nstype> argument is a bit mask specified by ORing together I<one or "
309 "more> of the B<CLONE_NEW*> namespace constants listed above. The caller is "
310 "moved into each of the target thread's namespaces that is specified in "
311 "I<nstype>; the caller's memberships in the remaining namespaces are left "
312 "unchanged."
313 msgstr ""
314
315 #. type: Plain text
316 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
317 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
318 msgid ""
319 "For example, the following code would move the caller into the same user, "
320 "network, and UTS namespaces as PID 1234, but would leave the caller's other "
321 "namespace memberships unchanged:"
322 msgstr ""
323
324 #. type: Plain text
325 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
326 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
327 #, no-wrap
328 msgid ""
329 "int fd = pidfd_open(1234, 0);\n"
330 "setns(fd, CLONE_NEWUSER | CLONE_NEWNET | CLONE_NEWUTS);\n"
331 msgstr ""
332
333 #. type: SS
334 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
335 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
336 #, no-wrap
337 msgid "Details for specific namespace types"
338 msgstr ""
339
340 #. type: Plain text
341 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
342 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
343 msgid ""
344 "Note the following details and restrictions when reassociating with specific "
345 "namespace types:"
346 msgstr ""
347
348 #. type: TP
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 #, no-wrap
352 msgid "User namespaces"
353 msgstr ""
354
355 #. See kernel/user_namespace.c:userns_install() [3.8 source]
356 #. type: Plain text
357 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
358 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
359 msgid ""
360 "A process reassociating itself with a user namespace must have the "
361 "B<CAP_SYS_ADMIN> capability in the target user namespace. (This necessarily "
362 "implies that it is only possible to join a descendant user namespace.) Upon "
363 "successfully joining a user namespace, a process is granted all capabilities "
364 "in that namespace, regardless of its user and group IDs."
365 msgstr ""
366
367 #. type: Plain text
368 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
369 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
370 msgid "A multithreaded process may not change user namespace with B<setns>()."
371 msgstr ""
372
373 #. type: Plain text
374 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
375 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
376 msgid ""
377 "It is not permitted to use B<setns>() to reenter the caller's current user "
378 "namespace. This prevents a caller that has dropped capabilities from "
379 "regaining those capabilities via a call to B<setns>()."
380 msgstr ""
381
382 #. commit e66eded8309ebf679d3d3c1f5820d1f2ca332c71
383 #. https://lwn.net/Articles/543273/
384 #. type: Plain text
385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
387 msgid ""
388 "For security reasons, a process can't join a new user namespace if it is "
389 "sharing filesystem-related attributes (the attributes whose sharing is "
390 "controlled by the B<clone>(2) B<CLONE_FS> flag) with another process."
391 msgstr ""
392
393 #. type: Plain text
394 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
395 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
396 msgid "For further details on user namespaces, see B<user_namespaces>(7)."
397 msgstr ""
398
399 #. type: TP
400 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
401 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
402 #, no-wrap
403 msgid "Mount namespaces"
404 msgstr ""
405
406 #. type: Plain text
407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
409 msgid ""
410 "Changing the mount namespace requires that the caller possess both "
411 "B<CAP_SYS_CHROOT> and B<CAP_SYS_ADMIN> capabilities in its own user "
412 "namespace and B<CAP_SYS_ADMIN> in the user namespace that owns the target "
413 "mount namespace."
414 msgstr ""
415
416 #. Above check is in fs/namespace.c:mntns_install() [3.8 source]
417 #. type: Plain text
418 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
419 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
420 msgid ""
421 "A process can't join a new mount namespace if it is sharing filesystem-"
422 "related attributes (the attributes whose sharing is controlled by the "
423 "B<clone>(2) B<CLONE_FS> flag) with another process."
424 msgstr ""
425
426 #. type: Plain text
427 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
428 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
429 msgid ""
430 "See B<user_namespaces>(7) for details on the interaction of user namespaces "
431 "and mount namespaces."
432 msgstr ""
433
434 #. type: TP
435 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
436 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
437 #, no-wrap
438 msgid "PID namespaces"
439 msgstr ""
440
441 #. type: Plain text
442 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
443 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
444 msgid ""
445 "In order to reassociate itself with a new PID namespace, the caller must "
446 "have the B<CAP_SYS_ADMIN> capability both in its own user namespace and in "
447 "the user namespace that owns the target PID namespace."
448 msgstr ""
449
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 "Reassociating the PID namespace has somewhat different from other namespace "
455 "types. Reassociating the calling thread with a PID namespace changes only "
456 "the PID namespace that subsequently created child processes of the caller "
457 "will be placed in; it does not change the PID namespace of the caller itself."
458 msgstr ""
459
460 #. type: Plain text
461 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
462 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
463 msgid ""
464 "Reassociating with a PID namespace is allowed only if the target PID "
465 "namespace is a descendant (child, grandchild, etc.) of, or is the same as, "
466 "the current PID namespace of the caller."
467 msgstr ""
468
469 #. type: Plain text
470 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
471 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
472 msgid "For further details on PID namespaces, see B<pid_namespaces>(7)."
473 msgstr ""
474
475 #. type: TP
476 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
477 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
478 #, no-wrap
479 msgid "Cgroup namespaces"
480 msgstr ""
481
482 #. type: Plain text
483 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
484 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
485 msgid ""
486 "In order to reassociate itself with a new cgroup namespace, the caller must "
487 "have the B<CAP_SYS_ADMIN> capability both in its own user namespace and in "
488 "the user namespace that owns the target cgroup namespace."
489 msgstr ""
490
491 #. type: Plain text
492 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
493 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
494 msgid ""
495 "Using B<setns>() to change the caller's cgroup namespace does not change "
496 "the caller's cgroup memberships."
497 msgstr ""
498
499 #. type: TP
500 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
501 #: opensuse-leap-16-1 opensuse-tumbleweed
502 #, no-wrap
503 msgid "Time namespaces"
504 msgstr ""
505
506 #. type: Plain text
507 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
508 #: opensuse-leap-16-1 opensuse-tumbleweed
509 msgid ""
510 "In order to reassociate itself with a new time namespace, the caller must "
511 "have the B<CAP_SYS_ADMIN> capability both in its own user namespace and in "
512 "the user namespace that owns the target namespace."
513 msgstr ""
514
515 #. type: Plain text
516 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
517 #: opensuse-leap-16-1 opensuse-tumbleweed
518 msgid "A multithreaded process may not change time namespace with B<setns>()."
519 msgstr ""
520
521 #. type: TP
522 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
523 #: opensuse-leap-16-1 opensuse-tumbleweed
524 #, no-wrap
525 msgid "Network, IPC, and UTS namespaces"
526 msgstr ""
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 "In order to reassociate itself with a new network, IPC, time, or UTS "
533 "namespace, the caller must have the B<CAP_SYS_ADMIN> capability both in its "
534 "own user namespace and in the user namespace that owns the target namespace."
535 msgstr ""
536
537 #. type: SH
538 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
539 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
540 #, no-wrap
541 msgid "RETURN VALUE"
542 msgstr ""
543
544 #. type: Plain text
545 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
546 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
547 msgid ""
548 "On success, B<setns>() returns 0. On failure, -1 is returned and I<errno> "
549 "is set to indicate the error."
550 msgstr ""
551
552 #. type: SH
553 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
554 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
555 #, no-wrap
556 msgid "ERRORS"
557 msgstr ""
558
559 #. type: TP
560 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
561 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
562 #, no-wrap
563 msgid "B<EBADF>"
564 msgstr ""
565
566 #. type: Plain text
567 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
568 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
569 msgid "I<fd> is not a valid file descriptor."
570 msgstr ""
571
572 #. type: TP
573 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
574 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
575 #, no-wrap
576 msgid "B<EINVAL>"
577 msgstr ""
578
579 #. type: Plain text
580 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
581 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
582 msgid ""
583 "I<fd> refers to a namespace whose type does not match that specified in "
584 "I<nstype>."
585 msgstr ""
586
587 #. type: Plain text
588 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
589 #: opensuse-tumbleweed
590 msgid ""
591 "There is a problem with reassociating the thread with the specified "
592 "namespace."
593 msgstr ""
594
595 #. type: Plain text
596 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
597 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
598 msgid ""
599 "The caller tried to join an ancestor (parent, grandparent, and so on) PID "
600 "namespace."
601 msgstr ""
602
603 #. type: Plain text
604 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
605 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
606 msgid ""
607 "The caller attempted to join the user namespace in which it is already a "
608 "member."
609 msgstr ""
610
611 #. commit e66eded8309ebf679d3d3c1f5820d1f2ca332c71
612 #. type: Plain text
613 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
614 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
615 msgid ""
616 "The caller shares filesystem (B<CLONE_FS>) state (in particular, the root "
617 "directory) with other processes and tried to join a new user namespace."
618 msgstr ""
619
620 #. See kernel/user_namespace.c::userns_install() [kernel 3.15 sources]
621 #. type: Plain text
622 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
623 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
624 msgid "The caller is multithreaded and tried to join a new user namespace."
625 msgstr ""
626
627 #. type: Plain text
628 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
629 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
630 msgid ""
631 "I<fd> is a PID file descriptor and I<nstype> is invalid (e.g., it is 0)."
632 msgstr ""
633
634 #. type: TP
635 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
636 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
637 #, no-wrap
638 msgid "B<ENOMEM>"
639 msgstr ""
640
641 #. type: Plain text
642 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
643 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
644 msgid "Cannot allocate sufficient memory to change the specified namespace."
645 msgstr ""
646
647 #. type: TP
648 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
649 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
650 #, no-wrap
651 msgid "B<EPERM>"
652 msgstr ""
653
654 #. type: Plain text
655 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
656 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
657 msgid ""
658 "The calling thread did not have the required capability for this operation."
659 msgstr ""
660
661 #. type: TP
662 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
663 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
664 #, no-wrap
665 msgid "B<ESRCH>"
666 msgstr ""
667
668 #. type: Plain text
669 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
670 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
671 msgid ""
672 "I<fd> is a PID file descriptor but the process it refers to no longer exists "
673 "(i.e., it has terminated and been waited on)."
674 msgstr ""
675
676 #. type: SH
677 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
678 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
679 #, no-wrap
680 msgid "STANDARDS"
681 msgstr ""
682
683 #. type: Plain text
684 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
685 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
686 msgid "Linux."
687 msgstr ""
688
689 #. type: SH
690 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
691 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
692 #, no-wrap
693 msgid "VERSIONS"
694 msgstr ""
695
696 #. type: Plain text
697 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
698 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
699 msgid "Linux 3.0, glibc 2.14."
700 msgstr ""
701
702 #. type: SH
703 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
704 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
705 #, no-wrap
706 msgid "NOTES"
707 msgstr ""
708
709 #. type: Plain text
710 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
711 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
712 msgid ""
713 "For further information on the I</proc/>pidI</ns/> magic links, see "
714 "B<namespaces>(7)."
715 msgstr ""
716
717 #. type: Plain text
718 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
719 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
720 msgid ""
721 "Not all of the attributes that can be shared when a new thread is created "
722 "using B<clone>(2) can be changed using B<setns>()."
723 msgstr ""
724
725 #. type: SH
726 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
727 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
728 #, no-wrap
729 msgid "EXAMPLES"
730 msgstr ""
731
732 #. type: Plain text
733 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
734 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
735 msgid ""
736 "The program below takes two or more arguments. The first argument specifies "
737 "the pathname of a namespace file in an existing I</proc/>pidI</ns/> "
738 "directory. The remaining arguments specify a command and its arguments. "
739 "The program opens the namespace file, joins that namespace using B<setns>(), "
740 "and executes the specified command inside that namespace."
741 msgstr ""
742
743 #. type: Plain text
744 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
745 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
746 msgid ""
747 "The following shell session demonstrates the use of this program (compiled "
748 "as a binary named I<ns_exec>) in conjunction with the B<CLONE_NEWUTS> "
749 "example program in the B<clone>(2) man page (complied as a binary named "
750 "I<newuts>)."
751 msgstr ""
752
753 #. type: Plain text
754 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
755 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
756 msgid ""
757 "We begin by executing the example program in B<clone>(2) in the "
758 "background. That program creates a child in a separate UTS namespace. The "
759 "child changes the hostname in its namespace, and then both processes display "
760 "the hostnames in their UTS namespaces, so that we can see that they are "
761 "different."
762 msgstr ""
763
764 #. type: Plain text
765 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
766 #: opensuse-tumbleweed
767 #, no-wrap
768 msgid ""
769 "$B< su>; # Need privilege for namespace operations\n"
770 "Password:\n"
771 "#B< ./newuts bizarro &>\n"
772 "[1] 3549\n"
773 "clone() returned 3550\n"
774 "uts.nodename in child: bizarro\n"
775 "uts.nodename in parent: antero\n"
776 "#B< uname -n>; # Verify hostname in the shell\n"
777 "antero\n"
778 msgstr ""
779
780 #. type: Plain text
781 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
782 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
783 msgid ""
784 "We then run the program shown below, using it to execute a shell. Inside "
785 "that shell, we verify that the hostname is the one set by the child created "
786 "by the first program:"
787 msgstr ""
788
789 #. type: Plain text
790 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
791 #: opensuse-tumbleweed
792 #, no-wrap
793 msgid ""
794 "#B< ./ns_exec /proc/3550/ns/uts /bin/bash>;\n"
795 "#B< uname -n>; # Executed in shell started by ns_exec\n"
796 "bizarro\n"
797 msgstr ""
798
799 #. type: SS
800 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
801 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
802 #, no-wrap
803 msgid "Program source"
804 msgstr ""
805
806 #. type: Plain text
807 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
808 #: opensuse-tumbleweed
809 #, no-wrap
810 msgid ""
811 "#define _GNU_SOURCE\n"
812 "#include E<lt>err.hE<gt>\n"
813 "#include E<lt>fcntl.hE<gt>\n"
814 "#include E<lt>sched.hE<gt>\n"
815 "#include E<lt>stdio.hE<gt>\n"
816 "#include E<lt>stdlib.hE<gt>\n"
817 "#include E<lt>unistd.hE<gt>\n"
818 "\\&\n"
819 "int\n"
820 "main(int argc, char *argv[])\n"
821 "{\n"
822 " int fd;\n"
823 "\\&\n"
824 " if (argc E<lt> 3) {\n"
825 " fprintf(stderr, \"%s /proc/PID/ns/FILE cmd args...\\[rs]n\", argv[0]);\n"
826 " exit(EXIT_FAILURE);\n"
827 " }\n"
828 "\\&\n"
829 " /* Get file descriptor for namespace; the file descriptor is opened\n"
830 " with O_CLOEXEC so as to ensure that it is not inherited by the\n"
831 " program that is later executed. */\n"
832 "\\&\n"
833 " fd = open(argv[1], O_RDONLY | O_CLOEXEC);\n"
834 " if (fd == -1)\n"
835 " err(EXIT_FAILURE, \"open\");\n"
836 "\\&\n"
837 " if (setns(fd, 0) == -1) /* Join that namespace */\n"
838 " err(EXIT_FAILURE, \"setns\");\n"
839 "\\&\n"
840 " execvp(argv[2], &argv[2]); /* Execute a command in namespace */\n"
841 " err(EXIT_FAILURE, \"execvp\");\n"
842 "}\n"
843 msgstr ""
844
845 #. SRC END
846 #. type: SH
847 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
848 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
849 #, no-wrap
850 msgid "SEE ALSO"
851 msgstr ""
852
853 #. type: Plain text
854 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
855 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
856 msgid ""
857 "B<nsenter>(1), B<clone>(2), B<fork>(2), B<unshare>(2), B<vfork>(2), "
858 "B<namespaces>(7), B<unix>(7)"
859 msgstr ""
860
861 #. type: TH
862 #: debian-trixie
863 #, no-wrap
864 msgid "2024-06-15"
865 msgstr ""
866
867 #. type: TH
868 #: debian-trixie
869 #, no-wrap
870 msgid "Linux man-pages 6.9.1"
871 msgstr ""
872
873 #. type: Plain text
874 #: debian-trixie
875 msgid "Standard C library (I<libc>, I<-lc>)"
876 msgstr ""
877
878 #. type: SS
879 #: debian-trixie fedora-44 fedora-rawhide
880 #, no-wrap
881 msgid "fd refers to a I</proc/>pidI</ns/> link"
882 msgstr ""
883
884 #. type: TP
885 #: debian-trixie
886 #, no-wrap
887 msgid "Network, IPC, time, and UTS namespaces"
888 msgstr ""
889
890 #. type: Plain text
891 #: debian-trixie fedora-44 fedora-rawhide
892 msgid ""
893 "There is problem with reassociating the thread with the specified namespace."
894 msgstr ""
895
896 #. type: Plain text
897 #: debian-trixie fedora-44 fedora-rawhide
898 #, no-wrap
899 msgid ""
900 "$ B<su> # Need privilege for namespace operations\n"
901 "Password:\n"
902 "# B<./newuts bizarro &>\n"
903 "[1] 3549\n"
904 "clone() returned 3550\n"
905 "uts.nodename in child: bizarro\n"
906 "uts.nodename in parent: antero\n"
907 "# B<uname -n> # Verify hostname in the shell\n"
908 "antero\n"
909 msgstr ""
910
911 #. type: Plain text
912 #: debian-trixie fedora-44 fedora-rawhide
913 #, no-wrap
914 msgid ""
915 "# B<./ns_exec /proc/3550/ns/uts /bin/bash>\n"
916 "# B<uname -n> # Executed in shell started by ns_exec\n"
917 "bizarro\n"
918 msgstr ""
919
920 #. type: Plain text
921 #: debian-trixie fedora-44 fedora-rawhide
922 #, no-wrap
923 msgid ""
924 "#define _GNU_SOURCE\n"
925 "#include E<lt>err.hE<gt>\n"
926 "#include E<lt>fcntl.hE<gt>\n"
927 "#include E<lt>sched.hE<gt>\n"
928 "#include E<lt>stdio.hE<gt>\n"
929 "#include E<lt>stdlib.hE<gt>\n"
930 "#include E<lt>unistd.hE<gt>\n"
931 "\\&\n"
932 "int\n"
933 "main(int argc, char *argv[])\n"
934 "{\n"
935 " int fd;\n"
936 "\\&\n"
937 " if (argc E<lt> 3) {\n"
938 " fprintf(stderr, \"%s /proc/PID/ns/FILE cmd args...\\[rs]n\", argv[0]);\n"
939 " exit(EXIT_FAILURE);\n"
940 " }\n"
941 "\\&\n"
942 " /* Get file descriptor for namespace; the file descriptor is opened\n"
943 " with O_CLOEXEC so as to ensure that it is not inherited by the\n"
944 " program that is later executed. */\n"
945 "\\&\n"
946 " fd = open(argv[1], O_RDONLY | O_CLOEXEC);\n"
947 " if (fd == -1)\n"
948 " err(EXIT_FAILURE, \"open\");\n"
949 "\\&\n"
950 " if (setns(fd, 0) == -1) /* Join that namespace */\n"
951 " err(EXIT_FAILURE, \"setns\");\n"
952 "\\&\n"
953 " execvp(argv[2], &argv[2]); /* Execute a command in namespace */\n"
954 " err(EXIT_FAILURE, \"execvp\");\n"
955 "}\n"
956 msgstr ""
957
958 #. type: TH
959 #: fedora-44 fedora-rawhide
960 #, no-wrap
961 msgid "2025-01-07"
962 msgstr ""
963
964 #. type: TH
965 #: fedora-44 fedora-rawhide
966 #, no-wrap
967 msgid "Linux man-pages 6.13"
968 msgstr ""
969
970 #. type: TH
971 #: mageia-cauldron
972 #, no-wrap
973 msgid "Linux man-pages 6.17"
974 msgstr ""
975
976 #. type: TH
977 #: opensuse-leap-16-1 opensuse-tumbleweed
978 #, no-wrap
979 msgid "Linux man-pages (unreleased)"
980 msgstr ""