diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
commit | fc22b3d6507c6745911b9dfcc68f1e665ae13dbc (patch) | |
tree | ce1e3bce06471410239a6f41282e328770aa404a /po/ru/man2/pivot_root.2.po | |
parent | Initial commit. (diff) | |
download | manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.tar.xz manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.zip |
Adding upstream version 4.22.0.upstream/4.22.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'po/ru/man2/pivot_root.2.po')
-rw-r--r-- | po/ru/man2/pivot_root.2.po | 1230 |
1 files changed, 1230 insertions, 0 deletions
diff --git a/po/ru/man2/pivot_root.2.po b/po/ru/man2/pivot_root.2.po new file mode 100644 index 00000000..8fbb39e8 --- /dev/null +++ b/po/ru/man2/pivot_root.2.po @@ -0,0 +1,1230 @@ +# Russian translation of manpages +# This file is distributed under the same license as the manpages-l10n package. +# Copyright © of this file: +# Alexey, 2016. +# Azamat Hackimov <azamat.hackimov@gmail.com>, 2014-2017. +# kogamatranslator49 <r.podarov@yandex.ru>, 2015. +# Kogan, Darima <silverdk99@gmail.com>, 2014. +# Max Is <ismax799@gmail.com>, 2016. +# Yuri Kozlov <yuray@komyakino.ru>, 2011-2019. +# Иван Павлов <pavia00@gmail.com>, 2017. +msgid "" +msgstr "" +"Project-Id-Version: manpages-l10n\n" +"POT-Creation-Date: 2024-03-01 17:03+0100\n" +"PO-Revision-Date: 2022-12-23 11:11+0100\n" +"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n" +"Language-Team: Russian <man-pages-ru-talks@lists.sourceforge.net>\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " +"(n%100>=11 && n%100<=14)? 2 : 3);\n" +"X-Generator: Lokalize 2.0\n" + +#. type: TH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "pivot_root" +msgstr "pivot_root" + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "2023-10-31" +msgstr "31 октября 2023 г." + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "Linux man-pages 6.06" +msgstr "Linux man-pages 6.06" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "NAME" +msgstr "ИМЯ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "pivot_root - change the root filesystem" +msgid "pivot_root - change the root mount" +msgstr "pivot_root - изменяет корневую файловую систему" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "LIBRARY" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "Standard C library (I<libc>, I<-lc>)" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SYNOPSIS" +msgstr "СИНТАКСИС" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"B<#include E<lt>sys/syscall.hE<gt>> /* Definition of B<SYS_*> constants */\n" +"B<#include E<lt>unistd.hE<gt>>\n" +msgstr "" +"B<#include E<lt>sys/syscall.hE<gt>> /* определения констант B<SYS_*> */\n" +"B<#include E<lt>unistd.hE<gt>>\n" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<int syscall(SYS_pivot_root, const char *>I<new_root>B<, const char *>I<put_old>B<);>\n" +msgstr "B<int syscall(SYS_pivot_root, const char *>I<new_root>B<, const char *>I<put_old>B<);>\n" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"I<Note>: glibc provides no wrapper for B<pivot_root>(), necessitating the " +"use of B<syscall>(2)." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "DESCRIPTION" +msgstr "ОПИСАНИЕ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "B<pivot_root>() changes the root filesystem in the mount namespace of " +#| "the calling process. More precisely, it moves the root filesystem to the " +#| "directory I<put_old> and makes I<new_root> the new root filesystem. The " +#| "calling process must have the B<CAP_SYS_ADMIN> capability in the user " +#| "namespace that owns the caller's mount namespace." +msgid "" +"B<pivot_root>() changes the root mount in the mount namespace of the " +"calling process. More precisely, it moves the root mount to the directory " +"I<put_old> and makes I<new_root> the new root mount. The calling process " +"must have the B<CAP_SYS_ADMIN> capability in the user namespace that owns " +"the caller's mount namespace." +msgstr "" +"Системный вызов B<pivot_root>() изменяет корневую файловую систему в " +"пространстве имён монтирования вызывающего процесса. Точнее говоря, он " +"перемещает корневую файловую систему в каталог I<put_old> и делает " +"I<new_root> новой корневой файловой системой. Вызывающий процесс должен " +"иметь мандат B<CAP_SYS_ADMIN> в пользовательском пространстве имён, которому " +"принадлежит пространство имён монтирования вызывающего." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "The paragraph above is intentionally vague because at the time when " +#| "B<pivot_root>() was first implemented, it was unclear whether its affect " +#| "on other process's root and current working directories\\(emand the " +#| "caller's current working directory\\(emmight change in the future. " +#| "However, the behavior has remained consistent since this system call was " +#| "first implemented: B<pivot_root>() changes the root directory and the " +#| "current working directory of each process or thread in the same mount " +#| "namespace to I<new_root> if they point to the old root directory. (See " +#| "also NOTES.) On the other hand, B<pivot_root>() does not change the " +#| "caller's current working directory (unless it is on the old root " +#| "directory), and thus it should be followed by a B<chdir(\"/\")> call." +msgid "" +"B<pivot_root>() changes the root directory and the current working " +"directory of each process or thread in the same mount namespace to " +"I<new_root> if they point to the old root directory. (See also NOTES.) On " +"the other hand, B<pivot_root>() does not change the caller's current " +"working directory (unless it is on the old root directory), and thus it " +"should be followed by a B<chdir(\"/\")> call." +msgstr "" +"Параграф выше намеренно написан абстрактно, так как на момент первой " +"реализации B<pivot_root>() было неясно, изменится ли его влияние на другие " +"процессы корня и текущие рабочие каталоги — как и на текущий рабочий каталог " +"вызывающего — в будущем. Однако поведение не изменилось с момента первой " +"реализации системного вызова: B<pivot_root>() изменяет корневой каталог и " +"текущий рабочий каталог каждого процесс или нити в одном пространстве имён " +"монтирования на I<new_root>, если они указывают на старый корневой каталог " +"(смотрите ЗАМЕЧАНИЯ). С другой стороны, B<pivot_root>() не изменяет текущий " +"рабочий каталог вызывающего (если это старый корневой каталог), и поэтому он " +"должен запускаться после вызова B<chdir(\"/\")>." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "The following restrictions apply:" +msgstr "Накладываются следующие ограничения:" + +#. type: IP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "\\[bu]" +msgstr "\\[bu]" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "I<new_root> and I<put_old> must be directories." +msgstr "Аргументы I<new_root> и I<put_old> должны быть каталогами." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "I<new_root> and I<put_old> must be directories." +msgid "" +"I<new_root> and I<put_old> must not be on the same mount as the current root." +msgstr "Аргументы I<new_root> и I<put_old> должны быть каталогами." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "I<put_old> must be at or underneath I<new_root>; that is, adding a " +#| "nonnegative number of I</..> to the string pointed to by I<put_old> must " +#| "yield the same directory as I<new_root>." +msgid "" +"I<put_old> must be at or underneath I<new_root>; that is, adding some " +"nonnegative number of \"I</..>\" suffixes to the pathname pointed to by " +"I<put_old> must yield the same directory as I<new_root>." +msgstr "" +"Аргумент I<put_old> должен быть равен или ниже I<new_root>, т. е., при " +"добавлении неотрицательного количества I</..> в строку, на которую указывает " +"I<put_old>, должен получаться каталог, равный I<new_root>." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "I<new_root> must be a mount point. (If it is not otherwise a mount " +#| "point, it suffices to bind mount I<new_root> on top of itself.)" +msgid "" +"I<new_root> must be a path to a mount point, but can't be I<\"/\">. A path " +"that is not already a mount point can be converted into one by bind mounting " +"the path onto itself." +msgstr "" +"Значение I<new_root> должно быть точкой монтирования (если это не точка " +"монтирования, то достаточно привязать монтирование I<new_root> поверх самой " +"себя)." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The propagation type of the parent mount of I<new_root> and the parent mount " +"of the current root directory must not be B<MS_SHARED>; similarly, if " +"I<put_old> is an existing mount point, its propagation type must not be " +"B<MS_SHARED>. These restrictions ensure that B<pivot_root>() never " +"propagates any changes to another mount namespace." +msgstr "" +"Тип распространения родительского монтирования I<new_root> и родительского " +"монтирования текущего корневого каталога не должно быть равно B<MS_SHARED>; " +"схожим образом, если I<put_old> — существующая точка монтирования, то её тип " +"распространения не должен быть B<MS_SHARED>. Эти ограничения гарантируют, " +"что B<pivot_root>() никогда не распространит изменения в другие пространства " +"имён монтирования." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "The current root directory must be a mount point." +msgstr "Текущий корневой каталог должен быть точкой монтирования." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "RETURN VALUE" +msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "On success, zero is returned. On error, -1 is returned, and I<errno> is " +#| "set appropriately." +msgid "" +"On success, zero is returned. On error, -1 is returned, and I<errno> is set " +"to indicate the error." +msgstr "" +"При успешном выполнении возвращается 0. В случае ошибки возвращается -1, а " +"I<errno> устанавливается в соответствующее значение." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "ERRORS" +msgstr "ОШИБКИ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<pivot_root>() may fail with any of the same errors as B<stat>(2). " +"Additionally, it may fail with the following errors:" +msgstr "" +"Вызов B<pivot_root>() может завершиться любой из ошибок что и B<stat>(2). " +"Кроме это, могут возвращаться следующие ошибки:" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<EBUSY>" +msgstr "B<EBUSY>" + +#. Reconfirmed that the following error occurs on Linux 5.0 by +#. specifying 'new_root' as "/rootfs" and 'put_old' as +#. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of +#. itself. Of course, this is an odd situation, since a later check +#. in the kernel code will in any case yield EINVAL if 'new_root' is +#. not a mount point. However, when the system call was first added, +#. 'new_root' was not required to be a mount point. So, this +#. error is nowadays probably just the result of crufty accumulation. +#. This error can also occur if we bind mount "/" on top of itself +#. and try to specify "/" as the 'new' (again, an odd situation). So, +#. the EBUSY check in the kernel does still seem necessary to prevent +#. that case. Furthermore, the "or put_old" piece is probably +#. redundant text (although the check is in the kernel), since, +#. in another check, 'put_old' is required to be under 'new_root'. +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "I<new_root> or I<put_old> is on the current root filesystem. (This error " +#| "covers the pathological case where I<new_root> is I<\"/\">.)" +msgid "" +"I<new_root> or I<put_old> is on the current root mount. (This error covers " +"the pathological case where I<new_root> is I<\"/\">.)" +msgstr "" +"Аргумент I<new_root> или I<put_old> находится в текущей корневой файловой " +"системе (эта ошибка возникает при патологическом случае когда значение " +"I<new_root> равно I<\"/\">)." + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<EINVAL>" +msgstr "B<EINVAL>" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "I<new_root> is not a mount point." +msgstr "Значение I<new_root> не является точкой монтирования." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "I<put_old> is not underneath I<new_root>." +msgid "I<put_old> is not at or underneath I<new_root>." +msgstr "Аргумент I<put_old> не находится в дереве каталогов I<new_root>." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The current root directory is not a mount point (because of an earlier " +"B<chroot>(2))." +msgstr "" +"Текущий корневой каталог не является точкой монтирования (из-за " +"предшествующего B<chroot>(2))." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "The current root is on the rootfs (initial ramfs) filesystem; see NOTES." +msgid "The current root is on the rootfs (initial ramfs) mount; see NOTES." +msgstr "" +"Текущий корень расположен на файловой системе rootfs (начальная ramfs); " +"смотрите ЗАМЕЧАНИЯ." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Either the mount point at I<new_root>, or the parent mount of that mount " +"point, has propagation type B<MS_SHARED>." +msgstr "" +"Точка монтирования I<new_root> и её родительское монтирование имеет тип " +"распространения B<MS_SHARED>." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "I<put_old> is a mount point and has the propagation type B<MS_SHARED>." +msgstr "" +"Значение I<put_old> является точкой монтирования и имеет тип распространения " +"B<MS_SHARED>." + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<ENOTDIR>" +msgstr "B<ENOTDIR>" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "I<new_root> or I<put_old> is not a directory." +msgstr "Аргумент I<new_root> или I<put_old> не является каталогом." + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<EPERM>" +msgstr "B<EPERM>" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability." +msgstr "Вызывающий процесс не имеет мандата B<CAP_SYS_ADMIN>." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "STANDARDS" +msgstr "СТАНДАРТЫ" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +msgid "Linux." +msgstr "Linux." + +#. type: SH +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "HISTORY" +msgstr "ИСТОРИЯ" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "util-linux 2.37.4" +msgid "Linux 2.3.41." +msgstr "util-linux 2.37.4" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "NOTES" +msgstr "ЗАМЕЧАНИЯ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"A command-line interface for this system call is provided by " +"B<pivot_root>(8)." +msgstr "" +"Интерфейсом командной строки для этого системного вызова является программа " +"B<pivot_root>(8)." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "B<pivot_root>() allows the caller to switch to a new root filesystem " +#| "while at the same time placing the old root mount at a location under " +#| "I<new_root> from where it can subsequently be unmounted. (The fact that " +#| "it moves all processes that have a root directory or current working " +#| "directory on the old root filesystem to the new root filesystem frees the " +#| "old root filesystem of users, allowing it to be unmounted more easily.)" +msgid "" +"B<pivot_root>() allows the caller to switch to a new root filesystem while " +"at the same time placing the old root mount at a location under I<new_root> " +"from where it can subsequently be unmounted. (The fact that it moves all " +"processes that have a root directory or current working directory on the old " +"root directory to the new root frees the old root directory of users, " +"allowing the old root mount to be unmounted more easily.)" +msgstr "" +"Программа B<pivot_root>() позволяет вызывающему переключиться в новую " +"корневую файловую систему и одновременно помещает монтирование старого корня " +"ниже I<new_root>, откуда он может быть в последствии отмонтирован " +"(фактически, она перемещает все процессы, у которых корневой каталог или " +"текущий рабочий каталог расположен в старой корневой файловой системе, в " +"новую корневую файловую систему, и освобождает старую корневую файловую " +"систему от пользователей, облегчая её размонтирование)." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "A typical use of B<pivot_root>() is during system startup, when the " +#| "system mounts a temporary root filesystem (e.g., an B<initrd>), then " +#| "mounts the real root filesystem, and eventually turns the latter into the " +#| "current root of all relevant processes or threads. A modern use is to " +#| "set up a root filesystem during the creation of a container." +msgid "" +"One use of B<pivot_root>() is during system startup, when the system mounts " +"a temporary root filesystem (e.g., an B<initrd>(4)), then mounts the real " +"root filesystem, and eventually turns the latter into the root directory of " +"all relevant processes and threads. A modern use is to set up a root " +"filesystem during the creation of a container." +msgstr "" +"Обычно, B<pivot_root>() используется при загрузке, когда система монтирует " +"временную корневую файловую систему (например, B<initrd>), а затем монтирует " +"настоящую корневую файловую систему, делая, тем самым, её корневой для всех " +"последующих процессов или нитей. Теперь она ещё используется для настройки " +"корневой файловой системы при создании контейнера." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "The fact that B<pivot_root>() modifies process root and current working " +#| "directories in the manner noted in DESCRIPTION is necessary in order to " +#| "prevent kernel threads from keeping the old root directory busy with " +#| "their root and current working directory, even if they never access the " +#| "filesystem in any way." +msgid "" +"The fact that B<pivot_root>() modifies process root and current working " +"directories in the manner noted in DESCRIPTION is necessary in order to " +"prevent kernel threads from keeping the old root mount busy with their root " +"and current working directories, even if they never access the filesystem in " +"any way." +msgstr "" +"Действие B<pivot_root>() по изменению текущего рабочего каталога и корня " +"процесса, раскрытое в ОПИСАНИИ, необходимо для того, чтобы не дать нитям " +"ядра оставить занятым старый корневой каталог в качестве своего корня и " +"текущего рабочего каталога даже, если они никогда не обращаются к файловой " +"системе." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The rootfs (initial ramfs) cannot be B<pivot_root>()ed. The recommended " +"method of changing the root filesystem in this case is to delete everything " +"in rootfs, overmount rootfs with the new root, attach I<stdin>/I<stdout>/" +"I<stderr> to the new I</dev/console>, and exec the new B<init>(1). Helper " +"programs for this process exist; see B<switch_root>(8)." +msgstr "" +"Для rootfs (начальная ramfs) нельзя вызвать B<pivot_root>(). Рекомендуемым " +"методом изменения корневой файловой системы в этом случае является удаление " +"всего в rootfs, перемонтирование в rootfs нового корня, присоединение " +"I<stdin>/I<stdout>/I<stderr> к новой I</dev/console> и запуск нового " +"B<init>(1). Для этого существуют вспомогательные программы; смотрите " +"B<switch_root>(8)." + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "pivot_root(\\[dq].\\[dq], \\[dq].\\[dq])" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"I<new_root> and I<put_old> may be the same directory. In particular, the " +"following sequence allows a pivot-root operation without needing to create " +"and remove a temporary directory:" +msgstr "" +"Значения I<new_root> и I<put_old> могут быть одним каталогом. В частности, " +"разрешена следующая последовательность операции pivot-root без необходимости " +"создания и удаления временного каталога:" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"chdir(new_root);\n" +"pivot_root(\".\", \".\");\n" +"umount2(\".\", MNT_DETACH);\n" +msgstr "" +"chdir(new_root);\n" +"pivot_root(\".\", \".\");\n" +"umount2(\".\", MNT_DETACH);\n" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "This sequence succeeds because the B<pivot_root>() call stacks the old " +#| "root mount point (I<old_root>) on top of the new root mount point at I</" +#| ">. At that point, the calling process's root directory and current " +#| "working directory refer to the new root mount point (I<new_root>). " +#| "During the subsequent B<umount>() call, resolution of I<\".\"> starts " +#| "with I<new_root> and then moves up the list of mounts stacked at I</>, " +#| "with the result that I<old_root> is unmounted." +msgid "" +"This sequence succeeds because the B<pivot_root>() call stacks the old root " +"mount point on top of the new root mount point at I</>. At that point, the " +"calling process's root directory and current working directory refer to the " +"new root mount point (I<new_root>). During the subsequent B<umount>() " +"call, resolution of I<\".\"> starts with I<new_root> and then moves up the " +"list of mounts stacked at I</>, with the result that old root mount point is " +"unmounted." +msgstr "" +"Эта последовательность выполняется успешно, так как вызов B<pivot_root>() " +"укладывает точку монтирования старого корня (I<old_root>) сверху точки " +"монтирования нового корня в I</>. В этот момент корневой каталог и текущий " +"рабочий каталог вызывающего процесса указывают на точку монтирования нового " +"корня (I<new_root>). При последующем вызове B<umount>() определение I<\".\"> " +"начинается с I<new_root> и затем перемещается вверх по списку уложенных " +"монтирований в I</>, что в конце заканчивается размонтированием I<old_root>." + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Historical notes" +msgstr "Исторические замечания" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "For many years, this manual page carried the following text:" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "B<pivot_root>() may or may not change the current root and the current " +#| "working directory of any processes or threads that use the old root " +#| "directory and which are in the same mount namespace as the caller of " +#| "B<pivot_root>(). The caller of B<pivot_root>() should ensure that " +#| "processes with root or current working directory at the old root operate " +#| "correctly in either case. An easy way to ensure this is to change their " +#| "root and current working directory to I<new_root> before invoking " +#| "B<pivot_root>(). Note also that B<pivot_root>() may or may not affect " +#| "the calling process's current working directory. It is therefore " +#| "recommended to call B<chdir(\"/\")> immediately after B<pivot_root>()." +msgid "" +"B<pivot_root>() may or may not change the current root and the current " +"working directory of any processes or threads which use the old root " +"directory. The caller of B<pivot_root>() must ensure that processes with " +"root or current working directory at the old root operate correctly in " +"either case. An easy way to ensure this is to change their root and current " +"working directory to I<new_root> before invoking B<pivot_root>()." +msgstr "" +"Системный вызов B<pivot_root>() может изменить или может не изменить текущий " +"корень и текущий рабочий каталог всех процессов или нитей, которые " +"используют старый корневой каталог и которые находятся в том же пространстве " +"имён монтирования что и вызывающий B<pivot_root>(). В любом случае, " +"вызывающий B<pivot_root>() должен проверить, что процессы с корневым или " +"текущим рабочим каталогом старого корня работают правильно. Простым способом " +"проверки является смена их корня и текущего рабочего каталога на " +"I<new_root> до вызова B<pivot_root>(). Заметим, что B<pivot_root>() может " +"повлиять или может не повлиять на текущий рабочий каталог вызывающего " +"процесса. Поэтому рекомендуется вызвать B<chdir(\"/\")> сразу после " +"B<pivot_root>()." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"This text, written before the system call implementation was even finalized " +"in the kernel, was probably intended to warn users at that time that the " +"implementation might change before final release. However, the behavior " +"stated in DESCRIPTION has remained consistent since this system call was " +"first implemented and will not change now." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "EXAMPLES" +msgstr "ПРИМЕРЫ" + +#. FIXME +#. Would it be better, because simpler, to use unshare(2) +#. rather than clone(2) in the example below? +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The program below demonstrates the use of B<pivot_root>() inside a mount " +"namespace that is created using B<clone>(2). After pivoting to the root " +"directory named in the program's first command-line argument, the child " +"created by B<clone>(2) then executes the program named in the remaining " +"command-line arguments." +msgstr "" +"Представленная ниже программа демонстрирует использование B<pivot_root>() " +"внутри пространства монтирования, которое создаётся с помощью B<clone>(2). " +"После перехода (pivoting) в корневой каталог с именем из первого параметра " +"командной строки, потомок, созданный B<clone>(2), выполняет программу с " +"именем из оставшихся параметров командной строки." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"We demonstrate the program by creating a directory that will serve as the " +"new root filesystem and placing a copy of the (statically linked) " +"B<busybox>(1) executable in that directory." +msgstr "" +"Для работы программы создадим каталог, который будет служить новой корневой " +"файловой системой, и поместим копию исполняемого файла B<busybox>(1) " +"(скомпонованного статически) в этот каталог." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy, no-wrap +#| msgid "" +#| "$ B<mkdir /tmp/rootfs>\n" +#| "$ B<ls -id /tmp/rootfs> # Show inode number of new root directory\n" +#| "319459 /tmp/rootfs\n" +#| "$ B<cp $(which busybox) /tmp/rootfs>\n" +#| "$ B<PS1=\\(aqbbsh$ \\(aq sudo ./pivot_root_demo /tmp/rootfs /busybox sh>\n" +#| "bbsh$ B<PATH=/>\n" +#| "bbsh$ B<busybox ln busybox ln>\n" +#| "bbsh$ B<ln busybox echo>\n" +#| "bbsh$ B<ln busybox ls>\n" +#| "bbsh$ B<ls>\n" +#| "busybox echo ln ls\n" +#| "bbsh$ B<ls -id /> # Compare with inode number above\n" +#| "319459 /\n" +#| "bbsh$ B<echo \\(aqhello world\\(aq>\n" +#| "hello world\n" +msgid "" +"$ B<mkdir /tmp/rootfs>\n" +"$ B<ls -id /tmp/rootfs> # Show inode number of new root directory\n" +"319459 /tmp/rootfs\n" +"$ B<cp $(which busybox) /tmp/rootfs>\n" +"$ B<PS1=\\[aq]bbsh$ \\[aq] sudo ./pivot_root_demo /tmp/rootfs /busybox sh>\n" +"bbsh$ B<PATH=/>\n" +"bbsh$ B<busybox ln busybox ln>\n" +"bbsh$ B<ln busybox echo>\n" +"bbsh$ B<ln busybox ls>\n" +"bbsh$ B<ls>\n" +"busybox echo ln ls\n" +"bbsh$ B<ls -id /> # Compare with inode number above\n" +"319459 /\n" +"bbsh$ B<echo \\[aq]hello world\\[aq]>\n" +"hello world\n" +msgstr "" +"$ B<mkdir /tmp/rootfs>\n" +"$ B<ls -id /tmp/rootfs> # выведем номер иноды нового корневого каталога\n" +"319459 /tmp/rootfs\n" +"$ B<cp $(which busybox) /tmp/rootfs>\n" +"$ B<PS1=\\(aqbbsh$ \\(aq sudo ./pivot_root_demo /tmp/rootfs /busybox sh>\n" +"bbsh$ B<PATH=/>\n" +"bbsh$ B<busybox ln busybox ln>\n" +"bbsh$ B<ln busybox echo>\n" +"bbsh$ B<ln busybox ls>\n" +"bbsh$ B<ls>\n" +"busybox echo ln ls\n" +"bbsh$ B<ls -id /> # сравните с номером иноды выше\n" +"319459 /\n" +"bbsh$ B<echo \\(aqhello world\\(aq>\n" +"hello world\n" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Program source" +msgstr "Исходный код программы" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid "" +"/* pivot_root_demo.c */\n" +"\\&\n" +"#define _GNU_SOURCE\n" +"#include E<lt>err.hE<gt>\n" +"#include E<lt>limits.hE<gt>\n" +"#include E<lt>sched.hE<gt>\n" +"#include E<lt>signal.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>sys/mman.hE<gt>\n" +"#include E<lt>sys/mount.hE<gt>\n" +"#include E<lt>sys/stat.hE<gt>\n" +"#include E<lt>sys/syscall.hE<gt>\n" +"#include E<lt>sys/wait.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +"\\&\n" +"static int\n" +"pivot_root(const char *new_root, const char *put_old)\n" +"{\n" +" return syscall(SYS_pivot_root, new_root, put_old);\n" +"}\n" +"\\&\n" +"#define STACK_SIZE (1024 * 1024)\n" +"\\&\n" +"static int /* Startup function for cloned child */\n" +"child(void *arg)\n" +"{\n" +" char path[PATH_MAX];\n" +" char **args = arg;\n" +" char *new_root = args[0];\n" +" const char *put_old = \"/oldrootfs\";\n" +"\\&\n" +" /* Ensure that \\[aq]new_root\\[aq] and its parent mount don\\[aq]t have\n" +" shared propagation (which would cause pivot_root() to\n" +" return an error), and prevent propagation of mount\n" +" events to the initial mount namespace. */\n" +"\\&\n" +" if (mount(NULL, \"/\", NULL, MS_REC | MS_PRIVATE, NULL) == -1)\n" +" err(EXIT_FAILURE, \"mount-MS_PRIVATE\");\n" +"\\&\n" +" /* Ensure that \\[aq]new_root\\[aq] is a mount point. */\n" +"\\&\n" +" if (mount(new_root, new_root, NULL, MS_BIND, NULL) == -1)\n" +" err(EXIT_FAILURE, \"mount-MS_BIND\");\n" +"\\&\n" +" /* Create directory to which old root will be pivoted. */\n" +"\\&\n" +" snprintf(path, sizeof(path), \"%s/%s\", new_root, put_old);\n" +" if (mkdir(path, 0777) == -1)\n" +" err(EXIT_FAILURE, \"mkdir\");\n" +"\\&\n" +" /* And pivot the root filesystem. */\n" +"\\&\n" +" if (pivot_root(new_root, path) == -1)\n" +" err(EXIT_FAILURE, \"pivot_root\");\n" +"\\&\n" +" /* Switch the current working directory to \"/\". */\n" +"\\&\n" +" if (chdir(\"/\") == -1)\n" +" err(EXIT_FAILURE, \"chdir\");\n" +"\\&\n" +" /* Unmount old root and remove mount point. */\n" +"\\&\n" +" if (umount2(put_old, MNT_DETACH) == -1)\n" +" perror(\"umount2\");\n" +" if (rmdir(put_old) == -1)\n" +" perror(\"rmdir\");\n" +"\\&\n" +" /* Execute the command specified in argv[1]... */\n" +"\\&\n" +" execv(args[1], &args[1]);\n" +" err(EXIT_FAILURE, \"execv\");\n" +"}\n" +"\\&\n" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" char *stack;\n" +"\\&\n" +" /* Create a child process in a new mount namespace. */\n" +"\\&\n" +" stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,\n" +" MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);\n" +" if (stack == MAP_FAILED)\n" +" err(EXIT_FAILURE, \"mmap\");\n" +"\\&\n" +" if (clone(child, stack + STACK_SIZE,\n" +" CLONE_NEWNS | SIGCHLD, &argv[1]) == -1)\n" +" err(EXIT_FAILURE, \"clone\");\n" +"\\&\n" +" /* Parent falls through to here; wait for child. */\n" +"\\&\n" +" if (wait(NULL) == -1)\n" +" err(EXIT_FAILURE, \"wait\");\n" +"\\&\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. SRC END +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SEE ALSO" +msgstr "СМ. ТАКЖЕ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<chdir>(2), B<chroot>(2), B<mount>(2), B<stat>(2), B<initrd>(4), " +"B<mount_namespaces>(7), B<pivot_root>(8), B<switch_root>(8)" +msgstr "" +"B<chdir>(2), B<chroot>(2), B<mount>(2), B<stat>(2), B<initrd>(4), " +"B<mount_namespaces>(7), B<pivot_root>(8), B<switch_root>(8)" + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "2023-02-05" +msgstr "5 февраля 2023 г." + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "Linux man-pages 6.03" +msgstr "Linux man-pages 6.03" + +#. type: SH +#: debian-bookworm +#, no-wrap +msgid "VERSIONS" +msgstr "ВЕРСИИ" + +#. type: Plain text +#: debian-bookworm +msgid "B<pivot_root>() was introduced in Linux 2.3.41." +msgstr "Вызов B<pivot_root>() появился в Linux 2.3.41." + +#. type: Plain text +#: debian-bookworm +msgid "B<pivot_root>() is Linux-specific and hence is not portable." +msgstr "" +"Вызов B<pivot_root>() есть только в Linux и поэтому его использование не " +"переносимо." + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "/* pivot_root_demo.c */\n" +msgstr "/* pivot_root_demo.c */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"#define _GNU_SOURCE\n" +"#include E<lt>err.hE<gt>\n" +"#include E<lt>limits.hE<gt>\n" +"#include E<lt>sched.hE<gt>\n" +"#include E<lt>signal.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>sys/mman.hE<gt>\n" +"#include E<lt>sys/mount.hE<gt>\n" +"#include E<lt>sys/stat.hE<gt>\n" +"#include E<lt>sys/syscall.hE<gt>\n" +"#include E<lt>sys/wait.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +msgstr "" +"#define _GNU_SOURCE\n" +"#include E<lt>err.hE<gt>\n" +"#include E<lt>limits.hE<gt>\n" +"#include E<lt>sched.hE<gt>\n" +"#include E<lt>signal.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>sys/mman.hE<gt>\n" +"#include E<lt>sys/mount.hE<gt>\n" +"#include E<lt>sys/stat.hE<gt>\n" +"#include E<lt>sys/syscall.hE<gt>\n" +"#include E<lt>sys/wait.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"static int\n" +"pivot_root(const char *new_root, const char *put_old)\n" +"{\n" +" return syscall(SYS_pivot_root, new_root, put_old);\n" +"}\n" +msgstr "" +"static int\n" +"pivot_root(const char *new_root, const char *put_old)\n" +"{\n" +" return syscall(SYS_pivot_root, new_root, put_old);\n" +"}\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "#define STACK_SIZE (1024 * 1024)\n" +msgstr "#define STACK_SIZE (1024 * 1024)\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"static int /* Startup function for cloned child */\n" +"child(void *arg)\n" +"{\n" +" char path[PATH_MAX];\n" +" char **args = arg;\n" +" char *new_root = args[0];\n" +" const char *put_old = \"/oldrootfs\";\n" +msgstr "" +"static int /* начальная функция клонированного потомка */\n" +"child(void *arg)\n" +"{\n" +" char path[PATH_MAX];\n" +" char **args = arg;\n" +" char *new_root = args[0];\n" +" const char *put_old = \"/oldrootfs\";\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| " /* Ensure that \\(aqnew_root\\(aq and its parent mount don\\(aqt have\n" +#| " shared propagation (which would cause pivot_root() to\n" +#| " return an error), and prevent propagation of mount\n" +#| " events to the initial mount namespace. */\n" +msgid "" +" /* Ensure that \\[aq]new_root\\[aq] and its parent mount don\\[aq]t have\n" +" shared propagation (which would cause pivot_root() to\n" +" return an error), and prevent propagation of mount\n" +" events to the initial mount namespace. */\n" +msgstr "" +" /* Проверим, что \\(aqnew_root\\(aq и его родительское монтирование \n" +" не имеют общего распространения (из-за чего pivot_root() вернул бы\n" +" ошибку), и отключим распространение событий монтирования в\n" +" первоначальное пространство имён монтирования. */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (mount(NULL, \"/\", NULL, MS_REC | MS_PRIVATE, NULL) == -1)\n" +" err(EXIT_FAILURE, \"mount-MS_PRIVATE\");\n" +msgstr "" +" if (mount(NULL, \"/\", NULL, MS_REC | MS_PRIVATE, NULL) == -1)\n" +" err(EXIT_FAILURE, \"mount-MS_PRIVATE\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid " /* Ensure that \\(aqnew_root\\(aq is a mount point. */\n" +msgid " /* Ensure that \\[aq]new_root\\[aq] is a mount point. */\n" +msgstr " /* Проверим, что \\(aqnew_root\\(aq является точкой монтирования. */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (mount(new_root, new_root, NULL, MS_BIND, NULL) == -1)\n" +" err(EXIT_FAILURE, \"mount-MS_BIND\");\n" +msgstr "" +" if (mount(new_root, new_root, NULL, MS_BIND, NULL) == -1)\n" +" err(EXIT_FAILURE, \"mount-MS_BIND\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " /* Create directory to which old root will be pivoted. */\n" +msgstr " /* Создадим каталог, в котором перейдёт старый корень. */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" snprintf(path, sizeof(path), \"%s/%s\", new_root, put_old);\n" +" if (mkdir(path, 0777) == -1)\n" +" err(EXIT_FAILURE, \"mkdir\");\n" +msgstr "" +" snprintf(path, sizeof(path), \"%s/%s\", new_root, put_old);\n" +" if (mkdir(path, 0777) == -1)\n" +" err(EXIT_FAILURE, \"mkdir\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " /* And pivot the root filesystem. */\n" +msgstr " /* и переведём корневую файловую систему. */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (pivot_root(new_root, path) == -1)\n" +" err(EXIT_FAILURE, \"pivot_root\");\n" +msgstr "" +" if (pivot_root(new_root, path) == -1)\n" +" err(EXIT_FAILURE, \"pivot_root\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " /* Switch the current working directory to \"/\". */\n" +msgstr " /* сменим текущий рабочий каталог на «/». */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (chdir(\"/\") == -1)\n" +" err(EXIT_FAILURE, \"chdir\");\n" +msgstr "" +" if (chdir(\"/\") == -1)\n" +" err(EXIT_FAILURE, \"chdir\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " /* Unmount old root and remove mount point. */\n" +msgstr " /* размонтируем старый корень и удалим точку монтирования. */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (umount2(put_old, MNT_DETACH) == -1)\n" +" perror(\"umount2\");\n" +" if (rmdir(put_old) == -1)\n" +" perror(\"rmdir\");\n" +msgstr "" +" if (umount2(put_old, MNT_DETACH) == -1)\n" +" perror(\"umount2\");\n" +" if (rmdir(put_old) == -1)\n" +" perror(\"rmdir\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " /* Execute the command specified in argv[1]... */\n" +msgstr " /* запустим команду, указанную в argv[1]... */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" execv(args[1], &args[1]);\n" +" err(EXIT_FAILURE, \"execv\");\n" +"}\n" +msgstr "" +" execv(args[1], &args[1]);\n" +" err(EXIT_FAILURE, \"execv\");\n" +"}\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" char *stack;\n" +msgstr "" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" char *stack;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " /* Create a child process in a new mount namespace. */\n" +msgstr " /* создадим дочерний процесс в новом пространстве имён монтирования. */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,\n" +" MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);\n" +" if (stack == MAP_FAILED)\n" +" err(EXIT_FAILURE, \"mmap\");\n" +msgstr "" +" stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,\n" +" MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);\n" +" if (stack == MAP_FAILED)\n" +" err(EXIT_FAILURE, \"mmap\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (clone(child, stack + STACK_SIZE,\n" +" CLONE_NEWNS | SIGCHLD, &argv[1]) == -1)\n" +" err(EXIT_FAILURE, \"clone\");\n" +msgstr "" +" if (clone(child, stack + STACK_SIZE,\n" +" CLONE_NEWNS | SIGCHLD, &argv[1]) == -1)\n" +" err(EXIT_FAILURE, \"clone\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " /* Parent falls through to here; wait for child. */\n" +msgstr " /* предок попадает сюда; ждём потомка. */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (wait(NULL) == -1)\n" +" err(EXIT_FAILURE, \"wait\");\n" +msgstr "" +" if (wait(NULL) == -1)\n" +" err(EXIT_FAILURE, \"wait\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" +" exit(EXIT_SUCCESS);\n" +"}\n" + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "2023-05-03" +msgstr "3 мая 2023 г." + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "Linux man-pages 6.05.01" +msgstr "Linux man-pages 6.05.01" + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "2023-03-30" +msgstr "30 марта 2023 г." + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "Linux man-pages 6.04" +msgstr "Linux man-pages 6.04" |