Unit Instance
Units API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/units/1788479/?format=api
{ "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookjail_index/ru/?format=api", "source": [ "In [.filename]#kern_jail.c#, the function `jail()` then calls function `jail_attach()` with a given `jid`. And `jail_attach()` calls function `change_root()` to change the root directory of the calling process. The `jail_attach()` then creates a new `ucred` structure, and attaches the newly created `ucred` structure to the calling process after it has successfully attached the `prison` structure to the `ucred` structure. From then on, the calling process is recognized as jailed. When the kernel routine `jailed()` is called in the kernel with the newly created `ucred` structure as its argument, it returns 1 to tell that the credential is connected with a jail. The public ancestor process of all the process forked within the jail, is the process which runs man:jail[8], as it calls the man:jail[2] system call. When a program is executed through man:execve[2], it inherits the jailed property of its parent's `ucred` structure, therefore it has a jailed `ucred` structure." ], "previous_source": "", "target": [ "В файле [.filename]#kern_jail.c# функция `jail()` вызывает функцию `jail_attach()` с заданным `jid`. Затем `jail_attach()` вызывает функцию `change_root()` для изменения корневого каталога вызывающего процесса. Функция `jail_attach()` создаёт новую структуру `ucred` и присоединяет её к вызывающему процессу после успешного присоединения структуры `prison` к структуре `ucred`. С этого момента вызывающий процесс считается находящимся в клетке. Когда в ядре вызывается функция `jailed()` с вновь созданной структурой `ucred` в качестве аргумента, она возвращает 1, указывая, что учётные данные связаны с клеткой. Общим родительским процессом для всех процессов, созданных внутри клетки, является процесс, запускающий man:jail[8], так как он вызывает системный вызов man:jail[2]. При выполнении программы через man:execve[2] она наследует свойство клетки из структуры `ucred` родительского процесса, следовательно, у неё структура `ucred` тоже со свойством клетки." ], "id_hash": -5312930558792477038, "content_hash": -5312930558792477038, "location": "documentation/content/en/books/arch-handbook/jail/_index.adoc:281", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 50, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 149, "source_unit": "https://translate-dev.freebsd.org/api/units/1127708/?format=api", "priority": 100, "id": 1788479, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookjail_index/ru/?checksum=3644adce4edb5692", "url": "https://translate-dev.freebsd.org/api/units/1788479/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2025-05-25T08:04:48.350299Z" }