Debian Codegraph @

po/ru/man7/landlock.7.po

raw
1 # Russian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Artyom Kunyov <[email protected]>, 2012.
5 # Azamat Hackimov <[email protected]>, 2012, 2017.
6 # Dmitry Bolkhovskikh <[email protected]>, 2017.
7 # Katrin Kutepova <[email protected]>, 2018.
8 # Konstantin Shvaykovskiy <[email protected]>, 2012.
9 # Yuri Kozlov <[email protected]>, 2011-2019.
10 # Иван Павлов <[email protected]>, 2017, 2019.
11 msgid ""
12 msgstr ""
13 "Project-Id-Version: manpages-l10n\n"
14 "POT-Creation-Date: 2026-06-05 06:29+0200\n"
15 "PO-Revision-Date: 2024-12-21 19:50+0300\n"
16 "Last-Translator: Yuri Kozlov <[email protected]>\n"
17 "Language-Team: Russian <[email protected]>\n"
18 "Language: ru\n"
19 "MIME-Version: 1.0\n"
20 "Content-Type: text/plain; charset=UTF-8\n"
21 "Content-Transfer-Encoding: 8bit\n"
22 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
23 "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
24 "(n%100>=11 && n%100<=14)? 2 : 3);\n"
25 "X-Generator: Lokalize 2.0\n"
26
27 #. type: TH
28 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
29 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
30 #, no-wrap
31 msgid "Landlock"
32 msgstr ""
33
34 #. type: TH
35 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
36 #, no-wrap
37 msgid "2026-04-21"
38 msgstr "21 апреля 2026 г."
39
40 #. type: TH
41 #: archlinux debian-unstable
42 #, fuzzy, no-wrap
43 #| msgid "Linux man-pages 6.17"
44 msgid "Linux man-pages 6.18"
45 msgstr "Справочные страницы Linux 6.17"
46
47 #. type: SH
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 #, no-wrap
51 msgid "NAME"
52 msgstr "НАИМЕНОВАНИЕ"
53
54 #. type: Plain text
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 msgid "Landlock - unprivileged access-control"
58 msgstr ""
59
60 #. type: SH
61 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 #, no-wrap
64 msgid "DESCRIPTION"
65 msgstr "ОПИСАНИЕ"
66
67 #. type: Plain text
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 msgid ""
71 "Landlock is an access-control system that enables any processes to securely "
72 "restrict themselves and their future children. Because Landlock is a "
73 "stackable Linux Security Module (LSM), it makes it possible to create safe "
74 "security sandboxes as new security layers in addition to the existing system-"
75 "wide access-controls. This kind of sandbox is expected to help mitigate the "
76 "security impact of bugs, and unexpected or malicious behaviors in "
77 "applications."
78 msgstr ""
79
80 #. type: Plain text
81 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
82 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
83 msgid ""
84 "A Landlock security policy is a set of access rights (e.g., open a file in "
85 "read-only, make a directory, etc.) tied to a file hierarchy. Such policy "
86 "can be configured and enforced by processes for themselves using three "
87 "system calls:"
88 msgstr ""
89
90 #. type: IP
91 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
92 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
93 #, no-wrap
94 msgid "\\[bu]"
95 msgstr "\\[bu]"
96
97 #. type: Plain text
98 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
99 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
100 msgid "B<landlock_create_ruleset>(2) creates a new ruleset;"
101 msgstr ""
102
103 #. type: Plain text
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 msgid "B<landlock_add_rule>(2) adds a new rule to a ruleset;"
107 msgstr ""
108
109 #. type: Plain text
110 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
111 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
112 msgid "B<landlock_restrict_self>(2) enforces a ruleset on the calling thread."
113 msgstr ""
114
115 #. type: Plain text
116 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
117 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
118 msgid ""
119 "To be able to use these system calls, the running kernel must support "
120 "Landlock and it must be enabled at boot time."
121 msgstr ""
122
123 #. type: SS
124 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
125 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
126 #, no-wrap
127 msgid "Landlock rules"
128 msgstr ""
129
130 #. type: Plain text
131 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
132 #: opensuse-leap-16-1 opensuse-tumbleweed
133 msgid ""
134 "A Landlock rule describes an action on an object which the process intends "
135 "to perform. A set of rules is aggregated in a ruleset, which can then "
136 "restrict the thread enforcing it, and its future children."
137 msgstr ""
138
139 #. type: Plain text
140 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
141 #: opensuse-leap-16-1 opensuse-tumbleweed
142 msgid "The two existing types of rules are:"
143 msgstr ""
144
145 #. type: TP
146 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
147 #: opensuse-leap-16-1 opensuse-tumbleweed
148 #, fuzzy, no-wrap
149 #| msgid "filesystem"
150 msgid "B<Filesystem rules>"
151 msgstr "filesystem (файловая система)"
152
153 #. type: Plain text
154 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
155 #: opensuse-leap-16-1 opensuse-tumbleweed
156 msgid ""
157 "For these rules, the object is a file hierarchy, and the related filesystem "
158 "actions are defined with I<filesystem access rights>."
159 msgstr ""
160
161 #. type: TP
162 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
163 #: opensuse-leap-16-1 opensuse-tumbleweed
164 #, no-wrap
165 msgid "B<Network rules> (since ABI v4)"
166 msgstr ""
167
168 #. type: Plain text
169 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
170 #: opensuse-leap-16-1 opensuse-tumbleweed
171 msgid ""
172 "For these rules, the object is a TCP port, and the related actions are "
173 "defined with I<network access rights>."
174 msgstr ""
175
176 #. type: SS
177 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
178 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
179 #, fuzzy, no-wrap
180 #| msgid "filesystem"
181 msgid "Filesystem actions"
182 msgstr "filesystem (файловая система)"
183
184 #. type: Plain text
185 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
186 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
187 msgid ""
188 "These flags enable to restrict a sandboxed process to a set of actions on "
189 "files and directories. Files or directories opened before the sandboxing "
190 "are not subject to these restrictions. See B<landlock_add_rule>(2) and "
191 "B<landlock_create_ruleset>(2) for more context."
192 msgstr ""
193
194 #. type: Plain text
195 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
196 #: opensuse-leap-16-1 opensuse-tumbleweed
197 #, fuzzy
198 #| msgid "The following values may be written to the file:"
199 msgid "The following access rights apply only to files:"
200 msgstr "В файл могут быть записаны следующие значения:"
201
202 #. type: TP
203 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
204 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
205 #, no-wrap
206 msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
207 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
208
209 #. type: Plain text
210 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
211 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
212 msgid "Execute a file."
213 msgstr ""
214
215 #. type: TP
216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
218 #, no-wrap
219 msgid "B<LANDLOCK_ACCESS_FS_WRITE_FILE>"
220 msgstr "B<LANDLOCK_ACCESS_FS_WRITE_FILE>"
221
222 #. type: Plain text
223 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
224 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
225 msgid "Open a file with write access."
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 ""
232 "When opening files for writing, you will often additionally need the "
233 "B<LANDLOCK_ACCESS_FS_TRUNCATE> right. In many cases, these system calls "
234 "truncate existing files when overwriting them (e.g., B<creat>(2))."
235 msgstr ""
236
237 #. type: TP
238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
240 #, no-wrap
241 msgid "B<LANDLOCK_ACCESS_FS_READ_FILE>"
242 msgstr "B<LANDLOCK_ACCESS_FS_READ_FILE>"
243
244 #. type: Plain text
245 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
246 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
247 msgid "Open a file with read access."
248 msgstr ""
249
250 #. type: TP
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 #, fuzzy, no-wrap
254 #| msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
255 msgid "B<LANDLOCK_ACCESS_FS_TRUNCATE>"
256 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
257
258 #. type: Plain text
259 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
260 #: opensuse-leap-16-1 opensuse-tumbleweed
261 msgid ""
262 "Truncate a file with B<truncate>(2), B<ftruncate>(2), B<creat>(2), or "
263 "B<open>(2) with B<O_TRUNC>."
264 msgstr ""
265
266 #. type: Plain text
267 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
268 #: opensuse-leap-16-1 opensuse-tumbleweed
269 msgid ""
270 "This access right is available since the third version of the Landlock ABI."
271 msgstr ""
272
273 #. type: TP
274 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
275 #: opensuse-leap-16-1 opensuse-tumbleweed
276 #, fuzzy, no-wrap
277 #| msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
278 msgid "B<LANDLOCK_ACCESS_FS_IOCTL_DEV>"
279 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
280
281 #. type: Plain text
282 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
283 #: opensuse-leap-16-1 opensuse-tumbleweed
284 msgid "Invoke B<ioctl>(2) commands on an opened character or block device."
285 msgstr ""
286
287 #. type: Plain text
288 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
289 #: opensuse-leap-16-1 opensuse-tumbleweed
290 msgid ""
291 "This access right applies to all B<ioctl>(2) commands implemented by device "
292 "drivers. However, the following common IOCTL commands continue to be "
293 "invokable independent of the B<LANDLOCK_ACCESS_FS_IOCTL_DEV> right:"
294 msgstr ""
295
296 #. type: Plain text
297 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
298 #: opensuse-leap-16-1 opensuse-tumbleweed
299 msgid "IOCTL commands targeting file descriptors (B<FIOCLEX>, B<FIONCLEX>),"
300 msgstr ""
301
302 #. type: Plain text
303 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
304 #: opensuse-leap-16-1 opensuse-tumbleweed
305 msgid "IOCTL commands targeting file descriptions (B<FIONBIO>, B<FIOASYNC>),"
306 msgstr ""
307
308 #. type: Plain text
309 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
310 #: opensuse-leap-16-1 opensuse-tumbleweed
311 msgid ""
312 "IOCTL commands targeting file systems (B<FIFREEZE>, B<FITHAW>, B<FIGETBSZ>, "
313 "B<FS_IOC_GETFSUUID>, B<FS_IOC_GETFSSYSFSPATH>)"
314 msgstr ""
315
316 #. type: Plain text
317 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
318 #: opensuse-leap-16-1 opensuse-tumbleweed
319 msgid ""
320 "Some IOCTL commands which do not make sense when used with devices, but "
321 "whose implementations are safe and return the right error codes "
322 "(B<FS_IOC_FIEMAP>, B<FICLONE>, B<FICLONERANGE>, B<FIDEDUPERANGE>)"
323 msgstr ""
324
325 #. type: Plain text
326 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
327 #: opensuse-leap-16-1 opensuse-tumbleweed
328 msgid ""
329 "This access right is available since the fifth version of the Landlock ABI."
330 msgstr ""
331
332 #. type: Plain text
333 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
334 #: opensuse-leap-16-1 opensuse-tumbleweed
335 msgid ""
336 "Whether an opened file can be truncated with B<ftruncate>(2) or used with "
337 "B<ioctl>(2) is determined during B<open>(2), in the same way as read and "
338 "write permissions are checked during B<open>(2) using "
339 "B<LANDLOCK_ACCESS_FS_READ_FILE> and B<LANDLOCK_ACCESS_FS_WRITE_FILE>."
340 msgstr ""
341
342 #. type: Plain text
343 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
344 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
345 msgid ""
346 "A directory can receive access rights related to files or directories. The "
347 "following access right is applied to the directory itself, and the "
348 "directories beneath it:"
349 msgstr ""
350
351 #. type: TP
352 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
353 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
354 #, no-wrap
355 msgid "B<LANDLOCK_ACCESS_FS_READ_DIR>"
356 msgstr "B<LANDLOCK_ACCESS_FS_READ_DIR>"
357
358 #. type: Plain text
359 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
360 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
361 msgid "Open a directory or list its content."
362 msgstr ""
363
364 #. type: Plain text
365 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
366 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
367 msgid ""
368 "However, the following access rights only apply to the content of a "
369 "directory, not the directory itself:"
370 msgstr ""
371
372 #. type: TP
373 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
374 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
375 #, no-wrap
376 msgid "B<LANDLOCK_ACCESS_FS_REMOVE_DIR>"
377 msgstr "B<LANDLOCK_ACCESS_FS_REMOVE_DIR>"
378
379 #. type: Plain text
380 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
381 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
382 msgid "Remove an empty directory or rename one."
383 msgstr ""
384
385 #. type: TP
386 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
387 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
388 #, no-wrap
389 msgid "B<LANDLOCK_ACCESS_FS_REMOVE_FILE>"
390 msgstr "B<LANDLOCK_ACCESS_FS_REMOVE_FILE>"
391
392 #. type: Plain text
393 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
394 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
395 msgid "Unlink (or rename) a file."
396 msgstr ""
397
398 #. type: TP
399 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
400 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
401 #, no-wrap
402 msgid "B<LANDLOCK_ACCESS_FS_MAKE_CHAR>"
403 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_CHAR>"
404
405 #. type: Plain text
406 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
407 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
408 #, fuzzy
409 #| msgid "This is a character device."
410 msgid "Create (or rename or link) a character device."
411 msgstr "символьное устройство"
412
413 #. type: TP
414 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
415 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
416 #, no-wrap
417 msgid "B<LANDLOCK_ACCESS_FS_MAKE_DIR>"
418 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_DIR>"
419
420 #. type: Plain text
421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
423 msgid "Create (or rename) a directory."
424 msgstr ""
425
426 #. type: TP
427 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
428 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
429 #, no-wrap
430 msgid "B<LANDLOCK_ACCESS_FS_MAKE_REG>"
431 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_REG>"
432
433 #. type: Plain text
434 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
435 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
436 msgid "Create (or rename or link) a regular file."
437 msgstr ""
438
439 #. type: TP
440 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
441 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
442 #, no-wrap
443 msgid "B<LANDLOCK_ACCESS_FS_MAKE_SOCK>"
444 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_SOCK>"
445
446 #. type: Plain text
447 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
448 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
449 #, fuzzy
450 #| msgid "This is a UNIX domain socket."
451 msgid "Create (or rename or link) a UNIX domain socket."
452 msgstr "доменный сокет UNIX"
453
454 #. type: TP
455 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
456 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
457 #, no-wrap
458 msgid "B<LANDLOCK_ACCESS_FS_MAKE_FIFO>"
459 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_FIFO>"
460
461 #. type: Plain text
462 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
463 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
464 msgid "Create (or rename or link) a named pipe."
465 msgstr ""
466
467 #. type: TP
468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
470 #, no-wrap
471 msgid "B<LANDLOCK_ACCESS_FS_MAKE_BLOCK>"
472 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_BLOCK>"
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 "Create (or rename or link) a block device."
478 msgstr ""
479
480 #. type: TP
481 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
482 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
483 #, no-wrap
484 msgid "B<LANDLOCK_ACCESS_FS_MAKE_SYM>"
485 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_SYM>"
486
487 #. type: Plain text
488 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
489 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
490 msgid "Create (or rename or link) a symbolic link."
491 msgstr ""
492
493 #. type: TP
494 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
495 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
496 #, fuzzy, no-wrap
497 #| msgid "B<LANDLOCK_ACCESS_FS_READ_FILE>"
498 msgid "B<LANDLOCK_ACCESS_FS_REFER>"
499 msgstr "B<LANDLOCK_ACCESS_FS_READ_FILE>"
500
501 #. type: Plain text
502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
504 msgid ""
505 "Link or rename a file from or to a different directory (i.e., reparent a "
506 "file hierarchy)."
507 msgstr ""
508
509 #. type: Plain text
510 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
511 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
512 msgid ""
513 "This access right is available since the second version of the Landlock ABI."
514 msgstr ""
515
516 #. type: Plain text
517 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
518 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
519 msgid ""
520 "This is the only access right which is denied by default by any ruleset, "
521 "even if the right is not specified as handled at ruleset creation time. The "
522 "only way to make a ruleset grant this right is to explicitly allow it for a "
523 "specific directory by adding a matching rule to the ruleset."
524 msgstr ""
525
526 #. type: Plain text
527 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
528 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
529 msgid ""
530 "In particular, when using the first Landlock ABI version, Landlock will "
531 "always deny attempts to reparent files between different directories."
532 msgstr ""
533
534 #. type: Plain text
535 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
536 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
537 msgid ""
538 "In addition to the source and destination directories having the "
539 "B<LANDLOCK_ACCESS_FS_REFER> access right, the attempted link or rename "
540 "operation must meet the following constraints:"
541 msgstr ""
542
543 #. type: Plain text
544 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
545 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
546 msgid ""
547 "The reparented file may not gain more access rights in the destination "
548 "directory than it previously had in the source directory. If this is "
549 "attempted, the operation results in an B<EXDEV> error."
550 msgstr ""
551
552 #. type: Plain text
553 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
554 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
555 msgid ""
556 "When linking or renaming, the B<LANDLOCK_ACCESS_FS_MAKE_>I<*> right for the "
557 "respective file type must be granted for the destination directory. "
558 "Otherwise, the operation results in an B<EACCES> error."
559 msgstr ""
560
561 #. type: Plain text
562 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
563 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
564 msgid ""
565 "When renaming, the B<LANDLOCK_ACCESS_FS_REMOVE_>I<*> right for the "
566 "respective file type must be granted for the source directory. Otherwise, "
567 "the operation results in an B<EACCES> error."
568 msgstr ""
569
570 #. type: Plain text
571 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
572 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
573 msgid ""
574 "If multiple requirements are not met, the B<EACCES> error code takes "
575 "precedence over B<EXDEV>."
576 msgstr ""
577
578 #. type: SS
579 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
580 #: opensuse-leap-16-1 opensuse-tumbleweed
581 #, no-wrap
582 msgid "Network flags"
583 msgstr ""
584
585 #. type: Plain text
586 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
587 #: opensuse-leap-16-1 opensuse-tumbleweed
588 msgid ""
589 "These flags enable to restrict a sandboxed process to a set of network "
590 "actions."
591 msgstr ""
592
593 #. type: Plain text
594 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
595 #: opensuse-leap-16-1 opensuse-tumbleweed
596 msgid "This is supported since Landlock ABI version 4."
597 msgstr ""
598
599 #. type: Plain text
600 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
601 #: opensuse-leap-16-1 opensuse-tumbleweed
602 msgid "The following access rights apply to TCP port numbers:"
603 msgstr ""
604
605 #. type: TP
606 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
607 #: opensuse-leap-16-1 opensuse-tumbleweed
608 #, fuzzy, no-wrap
609 #| msgid "B<LANDLOCK_ACCESS_FS_MAKE_BLOCK>"
610 msgid "B<LANDLOCK_ACCESS_NET_BIND_TCP>"
611 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_BLOCK>"
612
613 #. type: Plain text
614 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
615 #: opensuse-leap-16-1 opensuse-tumbleweed
616 msgid "Bind a TCP socket to a local port."
617 msgstr ""
618
619 #. type: TP
620 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
621 #: opensuse-leap-16-1 opensuse-tumbleweed
622 #, fuzzy, no-wrap
623 #| msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
624 msgid "B<LANDLOCK_ACCESS_NET_CONNECT_TCP>"
625 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
626
627 #. type: Plain text
628 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
629 #: opensuse-leap-16-1 opensuse-tumbleweed
630 msgid "Connect an active TCP socket to a remote port."
631 msgstr ""
632
633 #. type: SS
634 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
635 #: opensuse-leap-16-1 opensuse-tumbleweed
636 #, fuzzy, no-wrap
637 #| msgid "flags"
638 msgid "Scope flags"
639 msgstr "флаги"
640
641 #. type: Plain text
642 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
643 #: opensuse-leap-16-1 opensuse-tumbleweed
644 msgid ""
645 "These flags enable isolating a sandboxed process from a set of IPC actions. "
646 "Setting a flag for a ruleset will isolate the Landlock domain to forbid "
647 "connections to resources outside the domain."
648 msgstr ""
649
650 #. type: Plain text
651 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
652 #: opensuse-leap-16-1 opensuse-tumbleweed
653 msgid "This is supported since Landlock ABI version 6."
654 msgstr ""
655
656 #. type: Plain text
657 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
658 #: opensuse-leap-16-1 opensuse-tumbleweed
659 #, fuzzy
660 #| msgid "The following options are understood:"
661 msgid "The following scopes exist:"
662 msgstr "Понимаются следующие параметры:"
663
664 #. type: TP
665 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
666 #: opensuse-leap-16-1 opensuse-tumbleweed
667 #, fuzzy, no-wrap
668 #| msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
669 msgid "B<LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET>"
670 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
671
672 #. type: Plain text
673 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
674 #: opensuse-leap-16-1 opensuse-tumbleweed
675 msgid ""
676 "Restrict a sandboxed process from connecting to an abstract UNIX socket "
677 "created by a process outside the related Landlock domain (e.g., a parent "
678 "domain or a non-sandboxed process)."
679 msgstr ""
680
681 #. type: TP
682 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
683 #: opensuse-leap-16-1 opensuse-tumbleweed
684 #, fuzzy, no-wrap
685 #| msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
686 msgid "B<LANDLOCK_SCOPE_SIGNAL>"
687 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
688
689 #. type: Plain text
690 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
691 #: opensuse-leap-16-1 opensuse-tumbleweed
692 msgid ""
693 "Restrict a sandboxed process from sending a signal to another process "
694 "outside the domain."
695 msgstr ""
696
697 #. type: SS
698 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
699 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
700 #, no-wrap
701 msgid "Layers of file path access rights"
702 msgstr ""
703
704 #. type: Plain text
705 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
706 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
707 msgid ""
708 "Each time a thread enforces a ruleset on itself, it updates its Landlock "
709 "domain with a new layer of policy. Indeed, this complementary policy is "
710 "composed with the potentially other rulesets already restricting this "
711 "thread. A sandboxed thread can then safely add more constraints to itself "
712 "with a new enforced ruleset."
713 msgstr ""
714
715 #. type: Plain text
716 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
717 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
718 msgid ""
719 "One policy layer grants access to a file path if at least one of its rules "
720 "encountered on the path grants the access. A sandboxed thread can only "
721 "access a file path if all its enforced policy layers grant the access as "
722 "well as all the other system access controls (e.g., filesystem DAC, other "
723 "LSM policies, etc.)."
724 msgstr ""
725
726 #. type: SS
727 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
728 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
729 #, no-wrap
730 msgid "Bind mounts and OverlayFS"
731 msgstr ""
732
733 #. type: Plain text
734 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
735 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
736 msgid ""
737 "Landlock enables restricting access to file hierarchies, which means that "
738 "these access rights can be propagated with bind mounts (cf. "
739 "B<mount_namespaces>(7)) but not with OverlayFS."
740 msgstr ""
741
742 #. type: Plain text
743 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
744 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
745 msgid ""
746 "A bind mount mirrors a source file hierarchy to a destination. The "
747 "destination hierarchy is then composed of the exact same files, on which "
748 "Landlock rules can be tied, either via the source or the destination path. "
749 "These rules restrict access when they are encountered on a path, which means "
750 "that they can restrict access to multiple file hierarchies at the same time, "
751 "whether these hierarchies are the result of bind mounts or not."
752 msgstr ""
753
754 #. type: Plain text
755 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
756 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
757 msgid ""
758 "An OverlayFS mount point consists of upper and lower layers. These layers "
759 "are combined in a merge directory, result of the mount point. This merge "
760 "hierarchy may include files from the upper and lower layers, but "
761 "modifications performed on the merge hierarchy only reflect on the upper "
762 "layer. From a Landlock policy point of view, each of the OverlayFS layers "
763 "and merge hierarchies is standalone and contains its own set of files and "
764 "directories, which is different from a bind mount. A policy restricting an "
765 "OverlayFS layer will not restrict the resulted merged hierarchy, and vice "
766 "versa. Landlock users should then only think about file hierarchies they "
767 "want to allow access to, regardless of the underlying filesystem."
768 msgstr ""
769
770 #. type: SS
771 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
772 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
773 #, no-wrap
774 msgid "Inheritance"
775 msgstr ""
776
777 #. type: Plain text
778 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
779 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
780 msgid ""
781 "Every new thread resulting from a B<clone>(2) inherits Landlock domain "
782 "restrictions from its parent. This is similar to the B<seccomp>(2) "
783 "inheritance or any other LSM dealing with tasks' B<credentials>(7). For "
784 "instance, one process's thread may apply Landlock rules to itself, but they "
785 "will not be automatically applied to other sibling threads (unlike POSIX "
786 "thread credential changes, cf. B<nptl>(7))."
787 msgstr ""
788
789 #. type: Plain text
790 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
791 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
792 msgid ""
793 "When a thread sandboxes itself, we have the guarantee that the related "
794 "security policy will stay enforced on all this thread's descendants. This "
795 "allows creating standalone and modular security policies per application, "
796 "which will automatically be composed between themselves according to their "
797 "run-time parent policies."
798 msgstr ""
799
800 #. type: SS
801 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
802 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
803 #, no-wrap
804 msgid "Ptrace restrictions"
805 msgstr ""
806
807 #. type: Plain text
808 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
809 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
810 msgid ""
811 "A sandboxed process has less privileges than a non-sandboxed process and "
812 "must then be subject to additional restrictions when manipulating another "
813 "process. To be allowed to use B<ptrace>(2) and related syscalls on a "
814 "target process, a sandboxed process should have a subset of the target "
815 "process rules, which means the tracee must be in a sub-domain of the tracer."
816 msgstr ""
817
818 #. type: SS
819 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
820 #: opensuse-leap-16-1 opensuse-tumbleweed
821 #, no-wrap
822 msgid "IPC scoping"
823 msgstr ""
824
825 #. type: Plain text
826 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
827 #: opensuse-leap-16-1 opensuse-tumbleweed
828 msgid ""
829 "Similar to the implicit B<Ptrace restrictions>, we may want to further "
830 "restrict interactions between sandboxes. Therefore, at ruleset creation "
831 "time, each Landlock domain can restrict the scope for certain operations, so "
832 "that these operations can only reach out to processes within the same "
833 "Landlock domain or in a nested Landlock domain (the \"scope\")."
834 msgstr ""
835
836 #. type: Plain text
837 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
838 #: opensuse-leap-16-1 opensuse-tumbleweed
839 msgid "The operations which can be scoped are:"
840 msgstr ""
841
842 #. type: Plain text
843 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
844 #: opensuse-leap-16-1 opensuse-tumbleweed
845 msgid ""
846 "This limits the sending of signals to target processes which run within the "
847 "same or a nested Landlock domain."
848 msgstr ""
849
850 #. type: Plain text
851 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
852 #: opensuse-leap-16-1 opensuse-tumbleweed
853 msgid ""
854 "This limits the set of abstract B<unix>(7) sockets to which we can "
855 "B<connect>(2) to socket addresses which were created by a process in the "
856 "same or a nested Landlock domain."
857 msgstr ""
858
859 #. type: Plain text
860 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
861 #: opensuse-leap-16-1 opensuse-tumbleweed
862 msgid ""
863 "A B<sendto>(2) on a non-connected datagram socket is treated as if it were "
864 "doing an implicit B<connect>(2) and will be blocked if the remote end does "
865 "not stem from the same or a nested Landlock domain."
866 msgstr ""
867
868 #. type: Plain text
869 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
870 #: opensuse-leap-16-1 opensuse-tumbleweed
871 msgid ""
872 "A B<sendto>(2) on a socket which was previously connected will not be "
873 "restricted. This works for both datagram and stream sockets."
874 msgstr ""
875
876 #. type: Plain text
877 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
878 #: opensuse-leap-16-1 opensuse-tumbleweed
879 msgid ""
880 "IPC scoping does not support exceptions via B<landlock_add_rule>(2). If an "
881 "operation is scoped within a domain, no rules can be added to allow access "
882 "to resources or processes outside of the scope."
883 msgstr ""
884
885 #. type: SS
886 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
887 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
888 #, no-wrap
889 msgid "Truncating files"
890 msgstr ""
891
892 #. type: Plain text
893 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
894 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
895 msgid ""
896 "The operations covered by B<LANDLOCK_ACCESS_FS_WRITE_FILE> and "
897 "B<LANDLOCK_ACCESS_FS_TRUNCATE> both change the contents of a file and "
898 "sometimes overlap in non-intuitive ways. It is recommended to always "
899 "specify both of these together."
900 msgstr ""
901
902 #. type: Plain text
903 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
904 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
905 msgid ""
906 "A particularly surprising example is B<creat>(2). The name suggests that "
907 "this system call requires the rights to create and write files. However, it "
908 "also requires the truncate right if an existing file under the same name is "
909 "already present."
910 msgstr ""
911
912 #. type: Plain text
913 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
914 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
915 msgid ""
916 "It should also be noted that truncating files does not require the "
917 "B<LANDLOCK_ACCESS_FS_WRITE_FILE> right. Apart from the B<truncate>(2) "
918 "system call, this can also be done through B<open>(2) with the flags "
919 "I<O_RDONLY\\ |\\ O_TRUNC>."
920 msgstr ""
921
922 #. type: Plain text
923 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
924 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
925 msgid ""
926 "When opening a file, the availability of the B<LANDLOCK_ACCESS_FS_TRUNCATE> "
927 "right is associated with the newly created file descriptor and will be used "
928 "for subsequent truncation attempts using B<ftruncate>(2). The behavior is "
929 "similar to opening a file for reading or writing, where permissions are "
930 "checked during B<open>(2), but not during the subsequent B<read>(2) and "
931 "B<write>(2) calls."
932 msgstr ""
933
934 #. type: Plain text
935 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
936 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
937 msgid ""
938 "As a consequence, it is possible to have multiple open file descriptors for "
939 "the same file, where one grants the right to truncate the file and the other "
940 "does not. It is also possible to pass such file descriptors between "
941 "processes, keeping their Landlock properties, even when these processes do "
942 "not have an enforced Landlock ruleset."
943 msgstr ""
944
945 #. type: SH
946 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
947 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
948 #, no-wrap
949 msgid "VERSIONS"
950 msgstr "ВЕРСИИ"
951
952 #. type: Plain text
953 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
954 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
955 msgid "Landlock was introduced in Linux 5.13."
956 msgstr ""
957
958 #. type: Plain text
959 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
960 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
961 msgid ""
962 "To determine which Landlock features are available, users should query the "
963 "Landlock ABI version:"
964 msgstr ""
965
966 #. type: tbl table
967 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
968 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
969 #, fuzzy, no-wrap
970 #| msgid "AB"
971 msgid "ABI"
972 msgstr "AB"
973
974 #. type: tbl table
975 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
976 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
977 #, no-wrap
978 msgid "Kernel"
979 msgstr "Ядро"
980
981 #. type: tbl table
982 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
983 #, no-wrap
984 msgid "Newly introduced constants"
985 msgstr ""
986
987 #. type: tbl table
988 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
989 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
990 #, no-wrap
991 msgid "_"
992 msgstr "_"
993
994 #. type: tbl table
995 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
996 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
997 #, no-wrap
998 msgid "1"
999 msgstr "1"
1000
1001 #. type: tbl table
1002 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1003 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1004 #, no-wrap
1005 msgid "5.13"
1006 msgstr "5.13"
1007
1008 #. type: tbl table
1009 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1010 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1011 #, fuzzy, no-wrap
1012 #| msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1013 msgid "LANDLOCK_ACCESS_FS_EXECUTE"
1014 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1015
1016 #. type: tbl table
1017 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1018 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1019 #, no-wrap
1020 msgid "\\^"
1021 msgstr "\\^"
1022
1023 #. type: tbl table
1024 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1025 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1026 #, fuzzy, no-wrap
1027 #| msgid "B<LANDLOCK_ACCESS_FS_WRITE_FILE>"
1028 msgid "LANDLOCK_ACCESS_FS_WRITE_FILE"
1029 msgstr "B<LANDLOCK_ACCESS_FS_WRITE_FILE>"
1030
1031 #. type: tbl table
1032 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1033 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1034 #, fuzzy, no-wrap
1035 #| msgid "B<LANDLOCK_ACCESS_FS_READ_FILE>"
1036 msgid "LANDLOCK_ACCESS_FS_READ_FILE"
1037 msgstr "B<LANDLOCK_ACCESS_FS_READ_FILE>"
1038
1039 #. type: tbl table
1040 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1041 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1042 #, fuzzy, no-wrap
1043 #| msgid "B<LANDLOCK_ACCESS_FS_READ_DIR>"
1044 msgid "LANDLOCK_ACCESS_FS_READ_DIR"
1045 msgstr "B<LANDLOCK_ACCESS_FS_READ_DIR>"
1046
1047 #. type: tbl table
1048 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1049 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1050 #, fuzzy, no-wrap
1051 #| msgid "B<LANDLOCK_ACCESS_FS_REMOVE_DIR>"
1052 msgid "LANDLOCK_ACCESS_FS_REMOVE_DIR"
1053 msgstr "B<LANDLOCK_ACCESS_FS_REMOVE_DIR>"
1054
1055 #. type: tbl table
1056 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1057 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1058 #, fuzzy, no-wrap
1059 #| msgid "B<LANDLOCK_ACCESS_FS_REMOVE_FILE>"
1060 msgid "LANDLOCK_ACCESS_FS_REMOVE_FILE"
1061 msgstr "B<LANDLOCK_ACCESS_FS_REMOVE_FILE>"
1062
1063 #. type: tbl table
1064 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1065 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1066 #, fuzzy, no-wrap
1067 #| msgid "B<LANDLOCK_ACCESS_FS_MAKE_CHAR>"
1068 msgid "LANDLOCK_ACCESS_FS_MAKE_CHAR"
1069 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_CHAR>"
1070
1071 #. type: tbl table
1072 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1073 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1074 #, fuzzy, no-wrap
1075 #| msgid "B<LANDLOCK_ACCESS_FS_MAKE_DIR>"
1076 msgid "LANDLOCK_ACCESS_FS_MAKE_DIR"
1077 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_DIR>"
1078
1079 #. type: tbl table
1080 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1081 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1082 #, fuzzy, no-wrap
1083 #| msgid "B<LANDLOCK_ACCESS_FS_MAKE_REG>"
1084 msgid "LANDLOCK_ACCESS_FS_MAKE_REG"
1085 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_REG>"
1086
1087 #. type: tbl table
1088 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1089 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1090 #, fuzzy, no-wrap
1091 #| msgid "B<LANDLOCK_ACCESS_FS_MAKE_SOCK>"
1092 msgid "LANDLOCK_ACCESS_FS_MAKE_SOCK"
1093 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_SOCK>"
1094
1095 #. type: tbl table
1096 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1097 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1098 #, fuzzy, no-wrap
1099 #| msgid "B<LANDLOCK_ACCESS_FS_MAKE_FIFO>"
1100 msgid "LANDLOCK_ACCESS_FS_MAKE_FIFO"
1101 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_FIFO>"
1102
1103 #. type: tbl table
1104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1106 #, fuzzy, no-wrap
1107 #| msgid "B<LANDLOCK_ACCESS_FS_MAKE_BLOCK>"
1108 msgid "LANDLOCK_ACCESS_FS_MAKE_BLOCK"
1109 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_BLOCK>"
1110
1111 #. type: tbl table
1112 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1113 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1114 #, fuzzy, no-wrap
1115 #| msgid "B<LANDLOCK_ACCESS_FS_MAKE_SYM>"
1116 msgid "LANDLOCK_ACCESS_FS_MAKE_SYM"
1117 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_SYM>"
1118
1119 #. type: tbl table
1120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1122 #, no-wrap
1123 msgid "2"
1124 msgstr "2"
1125
1126 #. type: tbl table
1127 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1128 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1129 #, no-wrap
1130 msgid "5.19"
1131 msgstr ""
1132
1133 #. type: tbl table
1134 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1135 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1136 #, fuzzy, no-wrap
1137 #| msgid "B<LANDLOCK_ACCESS_FS_READ_FILE>"
1138 msgid "LANDLOCK_ACCESS_FS_REFER"
1139 msgstr "B<LANDLOCK_ACCESS_FS_READ_FILE>"
1140
1141 #. type: tbl table
1142 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1143 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1144 #, no-wrap
1145 msgid "3"
1146 msgstr "3"
1147
1148 #. type: tbl table
1149 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1150 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1151 #, no-wrap
1152 msgid "6.2"
1153 msgstr "6.2"
1154
1155 #. type: tbl table
1156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1158 #, fuzzy, no-wrap
1159 #| msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1160 msgid "LANDLOCK_ACCESS_FS_TRUNCATE"
1161 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1162
1163 #. type: tbl table
1164 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1165 #: opensuse-leap-16-1 opensuse-tumbleweed
1166 #, no-wrap
1167 msgid "4"
1168 msgstr "4"
1169
1170 #. type: tbl table
1171 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1172 #: opensuse-leap-16-1 opensuse-tumbleweed
1173 #, fuzzy, no-wrap
1174 #| msgid "67"
1175 msgid "6.7"
1176 msgstr "67"
1177
1178 #. type: tbl table
1179 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1180 #: opensuse-leap-16-1 opensuse-tumbleweed
1181 #, fuzzy, no-wrap
1182 #| msgid "B<LANDLOCK_ACCESS_FS_MAKE_BLOCK>"
1183 msgid "LANDLOCK_ACCESS_NET_BIND_TCP"
1184 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_BLOCK>"
1185
1186 #. type: tbl table
1187 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1188 #: opensuse-leap-16-1 opensuse-tumbleweed
1189 #, fuzzy, no-wrap
1190 #| msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1191 msgid "LANDLOCK_ACCESS_NET_CONNECT_TCP"
1192 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1193
1194 #. type: tbl table
1195 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1196 #: opensuse-leap-16-1 opensuse-tumbleweed
1197 #, no-wrap
1198 msgid "5"
1199 msgstr "5"
1200
1201 #. type: tbl table
1202 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1203 #: opensuse-leap-16-1 opensuse-tumbleweed
1204 #, no-wrap
1205 msgid "6.10"
1206 msgstr ""
1207
1208 #. type: tbl table
1209 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1210 #: opensuse-leap-16-1 opensuse-tumbleweed
1211 #, fuzzy, no-wrap
1212 #| msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1213 msgid "LANDLOCK_ACCESS_FS_IOCTL_DEV"
1214 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1215
1216 #. type: tbl table
1217 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1218 #: opensuse-leap-16-1 opensuse-tumbleweed
1219 #, no-wrap
1220 msgid "6"
1221 msgstr "6"
1222
1223 #. type: tbl table
1224 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1225 #: opensuse-leap-16-1 opensuse-tumbleweed
1226 #, no-wrap
1227 msgid "6.12"
1228 msgstr ""
1229
1230 #. type: tbl table
1231 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1232 #: opensuse-leap-16-1 opensuse-tumbleweed
1233 #, fuzzy, no-wrap
1234 #| msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1235 msgid "LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET"
1236 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1237
1238 #. type: tbl table
1239 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1240 #: opensuse-leap-16-1 opensuse-tumbleweed
1241 #, fuzzy, no-wrap
1242 #| msgid "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1243 msgid "LANDLOCK_SCOPE_SIGNAL"
1244 msgstr "B<LANDLOCK_ACCESS_FS_EXECUTE>"
1245
1246 #. type: tbl table
1247 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
1248 #, no-wrap
1249 msgid "7"
1250 msgstr "7"
1251
1252 #. type: tbl table
1253 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
1254 #, no-wrap
1255 msgid "6.15"
1256 msgstr ""
1257
1258 #. type: tbl table
1259 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
1260 #, no-wrap
1261 msgid "LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF"
1262 msgstr ""
1263
1264 #. type: tbl table
1265 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
1266 #, no-wrap
1267 msgid "LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON"
1268 msgstr ""
1269
1270 #. type: tbl table
1271 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
1272 #, no-wrap
1273 msgid "LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF"
1274 msgstr ""
1275
1276 #. type: tbl table
1277 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
1278 #, no-wrap
1279 msgid "8"
1280 msgstr "8"
1281
1282 #. type: tbl table
1283 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
1284 #, fuzzy, no-wrap
1285 #| msgid "70"
1286 msgid "7.0"
1287 msgstr "70"
1288
1289 #. type: tbl table
1290 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
1291 #, fuzzy, no-wrap
1292 #| msgid "B<LANDLOCK_ACCESS_FS_MAKE_SYM>"
1293 msgid "LANDLOCK_RESTRICT_SELF_TSYNC"
1294 msgstr "B<LANDLOCK_ACCESS_FS_MAKE_SYM>"
1295
1296 #. type: Plain text
1297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1299 msgid ""
1300 "Users should use the Landlock ABI version rather than the kernel version to "
1301 "determine which features are available. The mainline kernel versions listed "
1302 "here are only included for orientation. Kernels from other sources may "
1303 "contain backported features, and their version numbers may not match."
1304 msgstr ""
1305
1306 #. type: Plain text
1307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1309 msgid ""
1310 "To query the running kernel's Landlock ABI version, programs may pass the "
1311 "B<LANDLOCK_CREATE_RULESET_VERSION> flag to B<landlock_create_ruleset>(2)."
1312 msgstr ""
1313
1314 #. type: Plain text
1315 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1316 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1317 msgid ""
1318 "When building fallback mechanisms for compatibility with older kernels, "
1319 "users are advised to consider the special semantics of the "
1320 "B<LANDLOCK_ACCESS_FS_REFER> access right: In ABI v1, linking and moving of "
1321 "files between different directories is always forbidden, so programs relying "
1322 "on such operations are only compatible with Landlock ABI v2 and higher."
1323 msgstr ""
1324
1325 #. type: SH
1326 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1327 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1328 #, no-wrap
1329 msgid "NOTES"
1330 msgstr "ПРИМЕЧАНИЯ"
1331
1332 #. type: Plain text
1333 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1334 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1335 msgid ""
1336 "Landlock is enabled by B<CONFIG_SECURITY_LANDLOCK>. The "
1337 "I<lsm=lsm1,...,lsmN> command line parameter controls the sequence of the "
1338 "initialization of Linux Security Modules. It must contain the string "
1339 "I<landlock> to enable Landlock. If the command line parameter is not "
1340 "specified, the initialization falls back to the value of the deprecated "
1341 "I<security=> command line parameter and further to the value of "
1342 "B<CONFIG_LSM>. We can check that Landlock is enabled by looking for "
1343 "I<landlock: Up and running.> in kernel logs."
1344 msgstr ""
1345
1346 #. type: SH
1347 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1348 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1349 #, no-wrap
1350 msgid "CAVEATS"
1351 msgstr ""
1352
1353 #. type: Plain text
1354 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1355 #: opensuse-leap-16-1 opensuse-tumbleweed
1356 msgid ""
1357 "It is currently not possible to restrict some file-related actions "
1358 "accessible through these system call families: B<chdir>(2), B<stat>(2), "
1359 "B<flock>(2), B<chmod>(2), B<chown>(2), B<setxattr>(2), B<utime>(2), "
1360 "B<fcntl>(2), B<access>(2). Future Landlock evolutions will enable to "
1361 "restrict them."
1362 msgstr ""
1363
1364 #. type: SH
1365 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1366 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1367 #, no-wrap
1368 msgid "EXAMPLES"
1369 msgstr "ПРИМЕРЫ"
1370
1371 #. type: Plain text
1372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1374 msgid "We first need to create the ruleset that will contain our rules."
1375 msgstr ""
1376
1377 #. type: Plain text
1378 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1379 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1380 msgid ""
1381 "For this example, the ruleset will contain rules that only allow read "
1382 "actions, but write actions will be denied. The ruleset then needs to handle "
1383 "both of these kinds of actions. See the B<DESCRIPTION> section for the "
1384 "description of filesystem actions."
1385 msgstr ""
1386
1387 #. type: Plain text
1388 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
1389 #: opensuse-leap-16-1 opensuse-tumbleweed
1390 #, fuzzy, no-wrap
1391 #| msgid ""
1392 #| "attr.handled_access_fs =\n"
1393 #| " LANDLOCK_ACCESS_FS_EXECUTE |\n"
1394 #| " LANDLOCK_ACCESS_FS_WRITE_FILE |\n"
1395 #| " LANDLOCK_ACCESS_FS_READ_FILE |\n"
1396 #| " LANDLOCK_ACCESS_FS_READ_DIR |\n"
1397 #| " LANDLOCK_ACCESS_FS_REMOVE_DIR |\n"
1398 #| " LANDLOCK_ACCESS_FS_REMOVE_FILE |\n"
1399 #| " LANDLOCK_ACCESS_FS_MAKE_CHAR |\n"
1400 #| " LANDLOCK_ACCESS_FS_MAKE_DIR |\n"
1401 #| " LANDLOCK_ACCESS_FS_MAKE_REG |\n"
1402 #| " LANDLOCK_ACCESS_FS_MAKE_SOCK |\n"
1403 #| " LANDLOCK_ACCESS_FS_MAKE_FIFO |\n"
1404 #| " LANDLOCK_ACCESS_FS_MAKE_BLOCK |\n"
1405 #| " LANDLOCK_ACCESS_FS_MAKE_SYM;\n"
1406 msgid ""
1407 "struct landlock_ruleset_attr attr = {0};\n"
1408 "int ruleset_fd;\n"
1409 "\\&\n"
1410 "attr.handled_access_fs =\n"
1411 " LANDLOCK_ACCESS_FS_EXECUTE |\n"
1412 " LANDLOCK_ACCESS_FS_WRITE_FILE |\n"
1413 " LANDLOCK_ACCESS_FS_READ_FILE |\n"
1414 " LANDLOCK_ACCESS_FS_READ_DIR |\n"
1415 " LANDLOCK_ACCESS_FS_REMOVE_DIR |\n"
1416 " LANDLOCK_ACCESS_FS_REMOVE_FILE |\n"
1417 " LANDLOCK_ACCESS_FS_MAKE_CHAR |\n"
1418 " LANDLOCK_ACCESS_FS_MAKE_DIR |\n"
1419 " LANDLOCK_ACCESS_FS_MAKE_REG |\n"
1420 " LANDLOCK_ACCESS_FS_MAKE_SOCK |\n"
1421 " LANDLOCK_ACCESS_FS_MAKE_FIFO |\n"
1422 " LANDLOCK_ACCESS_FS_MAKE_BLOCK |\n"
1423 " LANDLOCK_ACCESS_FS_MAKE_SYM |\n"
1424 " LANDLOCK_ACCESS_FS_REFER |\n"
1425 " LANDLOCK_ACCESS_FS_TRUNCATE |\n"
1426 " LANDLOCK_ACCESS_FS_IOCTL_DEV;\n"
1427 msgstr ""
1428 "attr.handled_access_fs =\n"
1429 " LANDLOCK_ACCESS_FS_EXECUTE |\n"
1430 " LANDLOCK_ACCESS_FS_WRITE_FILE |\n"
1431 " LANDLOCK_ACCESS_FS_READ_FILE |\n"
1432 " LANDLOCK_ACCESS_FS_READ_DIR |\n"
1433 " LANDLOCK_ACCESS_FS_REMOVE_DIR |\n"
1434 " LANDLOCK_ACCESS_FS_REMOVE_FILE |\n"
1435 " LANDLOCK_ACCESS_FS_MAKE_CHAR |\n"
1436 " LANDLOCK_ACCESS_FS_MAKE_DIR |\n"
1437 " LANDLOCK_ACCESS_FS_MAKE_REG |\n"
1438 " LANDLOCK_ACCESS_FS_MAKE_SOCK |\n"
1439 " LANDLOCK_ACCESS_FS_MAKE_FIFO |\n"
1440 " LANDLOCK_ACCESS_FS_MAKE_BLOCK |\n"
1441 " LANDLOCK_ACCESS_FS_MAKE_SYM;\n"
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 "To be compatible with older Linux versions, we detect the available Landlock "
1448 "ABI version, and only use the available subset of access rights:"
1449 msgstr ""
1450
1451 #. type: Plain text
1452 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1453 #: opensuse-tumbleweed
1454 #, no-wrap
1455 msgid ""
1456 "/*\n"
1457 " * Table of available file system access rights by ABI version,\n"
1458 " * numbers hardcoded to keep the example short.\n"
1459 " */\n"
1460 "__u64 landlock_fs_access_rights[] = {\n"
1461 " (LANDLOCK_ACCESS_FS_MAKE_SYM E<lt>E<lt> 1) - 1, /* v1 */\n"
1462 " (LANDLOCK_ACCESS_FS_REFER E<lt>E<lt> 1) - 1, /* v2: add \"refer\" */\n"
1463 " (LANDLOCK_ACCESS_FS_TRUNCATE E<lt>E<lt> 1) - 1, /* v3: add \"truncate\" */\n"
1464 " (LANDLOCK_ACCESS_FS_TRUNCATE E<lt>E<lt> 1) - 1, /* v4: TCP support */\n"
1465 " (LANDLOCK_ACCESS_FS_IOCTL_DEV E<lt>E<lt> 1) - 1, /* v5: add \"ioctl_dev\" */\n"
1466 "};\n"
1467 "\\&\n"
1468 "int abi = landlock_create_ruleset(NULL, 0,\n"
1469 " LANDLOCK_CREATE_RULESET_VERSION);\n"
1470 "if (abi == -1) {\n"
1471 " /*\n"
1472 " * Kernel too old, not compiled with Landlock,\n"
1473 " * or Landlock was not enabled at boot time.\n"
1474 " */\n"
1475 " perror(\"Unable to use Landlock\");\n"
1476 " return; /* Graceful fallback: Do nothing. */\n"
1477 "}\n"
1478 "abi = MIN(abi, 3);\n"
1479 "\\&\n"
1480 "/* Only use the available rights in the ruleset. */\n"
1481 "attr.handled_access_fs &= landlock_fs_access_rights[abi - 1];\n"
1482 msgstr ""
1483
1484 #. type: Plain text
1485 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1486 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1487 msgid ""
1488 "The available access rights for each ABI version are listed in the "
1489 "B<VERSIONS> section."
1490 msgstr ""
1491
1492 #. type: Plain text
1493 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1494 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1495 msgid ""
1496 "If our program needed to create hard links or rename files between different "
1497 "directories (B<LANDLOCK_ACCESS_FS_REFER>), we would require the following "
1498 "change to the backwards compatibility logic: Directory reparenting is not "
1499 "possible in a process restricted with Landlock ABI version 1. Therefore, if "
1500 "the program needed to do file reparenting, and if only Landlock ABI version "
1501 "1 was available, we could not restrict the process."
1502 msgstr ""
1503
1504 #. type: Plain text
1505 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1506 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1507 msgid ""
1508 "Now that the ruleset attributes are determined, we create the Landlock "
1509 "ruleset and acquire a file descriptor as a handle to it, using "
1510 "B<landlock_create_ruleset>(2):"
1511 msgstr ""
1512
1513 #. type: Plain text
1514 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1515 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1516 #, no-wrap
1517 msgid ""
1518 "ruleset_fd = landlock_create_ruleset(&attr, sizeof(attr), 0);\n"
1519 "if (ruleset_fd == -1) {\n"
1520 " perror(\"Failed to create a ruleset\");\n"
1521 " exit(EXIT_FAILURE);\n"
1522 "}\n"
1523 msgstr ""
1524
1525 #. type: Plain text
1526 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1527 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1528 msgid ""
1529 "We can now add a new rule to the ruleset through the ruleset's file "
1530 "descriptor. The requested access rights must be a subset of the access "
1531 "rights which were specified in I<attr.handled_access_fs> at ruleset creation "
1532 "time."
1533 msgstr ""
1534
1535 #. type: Plain text
1536 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1537 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1538 msgid ""
1539 "In this example, the rule will only allow reading the file hierarchy I</"
1540 "usr>. Without another rule, write actions would then be denied by the "
1541 "ruleset. To add I</usr> to the ruleset, we open it with the I<O_PATH> flag "
1542 "and fill the I<struct landlock_path_beneath_attr> with this file descriptor."
1543 msgstr ""
1544
1545 #. type: Plain text
1546 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1547 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1548 #, no-wrap
1549 msgid ""
1550 "struct landlock_path_beneath_attr path_beneath = {0};\n"
1551 "int err;\n"
1552 "\\&\n"
1553 "path_beneath.allowed_access =\n"
1554 " LANDLOCK_ACCESS_FS_EXECUTE |\n"
1555 " LANDLOCK_ACCESS_FS_READ_FILE |\n"
1556 " LANDLOCK_ACCESS_FS_READ_DIR;\n"
1557 "\\&\n"
1558 "path_beneath.parent_fd = open(\"/usr\", O_PATH | O_CLOEXEC);\n"
1559 "if (path_beneath.parent_fd == -1) {\n"
1560 " perror(\"Failed to open file\");\n"
1561 " close(ruleset_fd);\n"
1562 " exit(EXIT_FAILURE);\n"
1563 "}\n"
1564 "err = landlock_add_rule(ruleset_fd, LANDLOCK_RULE_PATH_BENEATH,\n"
1565 " &path_beneath, 0);\n"
1566 "close(path_beneath.parent_fd);\n"
1567 "if (err) {\n"
1568 " perror(\"Failed to update ruleset\");\n"
1569 " close(ruleset_fd);\n"
1570 " exit(EXIT_FAILURE);\n"
1571 "}\n"
1572 msgstr ""
1573
1574 #. type: Plain text
1575 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1576 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1577 msgid ""
1578 "We now have a ruleset with one rule allowing read access to I</usr> while "
1579 "denying all other handled accesses for the filesystem. The next step is to "
1580 "restrict the current thread from gaining more privileges (e.g., thanks to a "
1581 "set-user-ID binary)."
1582 msgstr ""
1583
1584 #. type: Plain text
1585 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1586 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1587 #, no-wrap
1588 msgid ""
1589 "if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {\n"
1590 " perror(\"Failed to restrict privileges\");\n"
1591 " close(ruleset_fd);\n"
1592 " exit(EXIT_FAILURE);\n"
1593 "}\n"
1594 msgstr ""
1595
1596 #. type: Plain text
1597 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1598 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1599 msgid "The current thread is now ready to sandbox itself with the ruleset."
1600 msgstr ""
1601
1602 #. type: Plain text
1603 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1604 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1605 #, no-wrap
1606 msgid ""
1607 "if (landlock_restrict_self(ruleset_fd, 0)) {\n"
1608 " perror(\"Failed to enforce ruleset\");\n"
1609 " close(ruleset_fd);\n"
1610 " exit(EXIT_FAILURE);\n"
1611 "}\n"
1612 "close(ruleset_fd);\n"
1613 msgstr ""
1614
1615 #. type: Plain text
1616 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1617 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1618 msgid ""
1619 "If the B<landlock_restrict_self>(2) system call succeeds, the current "
1620 "thread is now restricted and this policy will be enforced on all its "
1621 "subsequently created children as well. Once a thread is landlocked, there "
1622 "is no way to remove its security policy; only adding more restrictions is "
1623 "allowed. These threads are now in a new Landlock domain, merge of their "
1624 "parent one (if any) with the new ruleset."
1625 msgstr ""
1626
1627 #. type: Plain text
1628 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1629 #: opensuse-tumbleweed
1630 msgid ""
1631 "Full working code can be found in E<.UR https:\\://git.kernel.org/\\:pub/"
1632 "\\:scm/\\:linux/\\:kernel/\\:git/\\:stable/\\:linux.git/\\:tree/\\:samples/"
1633 "\\:landlock/\\:sandboxer.c> E<.UE>"
1634 msgstr ""
1635
1636 #. type: SH
1637 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1638 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1639 #, no-wrap
1640 msgid "SEE ALSO"
1641 msgstr "СМОТРИТЕ ТАКЖЕ"
1642
1643 #. type: Plain text
1644 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1645 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1646 msgid ""
1647 "B<landlock_create_ruleset>(2), B<landlock_add_rule>(2), "
1648 "B<landlock_restrict_self>(2)"
1649 msgstr ""
1650 "B<landlock_create_ruleset>(2), B<landlock_add_rule>(2), "
1651 "B<landlock_restrict_self>(2)"
1652
1653 #. type: Plain text
1654 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1655 #: opensuse-tumbleweed
1656 #, fuzzy
1657 #| msgid "E<.UR https://landlock.io/> E<.UE>"
1658 msgid "E<.UR https:\\://landlock.io/> E<.UE>"
1659 msgstr "E<.UR https://landlock.io/> E<.UE>"
1660
1661 #. type: TH
1662 #: debian-trixie
1663 #, no-wrap
1664 msgid "2024-05-02"
1665 msgstr "2 мая 2024 г."
1666
1667 #. type: TH
1668 #: debian-trixie
1669 #, no-wrap
1670 msgid "Linux man-pages 6.9.1"
1671 msgstr "Страницы руководства Linux 6.9.1"
1672
1673 #. type: Plain text
1674 #: debian-trixie
1675 msgid ""
1676 "A Landlock rule describes an action on an object. An object is currently a "
1677 "file hierarchy, and the related filesystem actions are defined with access "
1678 "rights (see B<landlock_add_rule>(2)). A set of rules is aggregated in a "
1679 "ruleset, which can then restrict the thread enforcing it, and its future "
1680 "children."
1681 msgstr ""
1682
1683 #. type: Plain text
1684 #: debian-trixie
1685 msgid "A file can only receive these access rights:"
1686 msgstr ""
1687
1688 #. type: Plain text
1689 #: debian-trixie
1690 msgid ""
1691 "Truncate a file with B<truncate>(2), B<ftruncate>(2), B<creat>(2), or "
1692 "B<open>(2) with B<O_TRUNC>. Whether an opened file can be truncated with "
1693 "B<ftruncate>(2) is determined during B<open>(2), in the same way as read "
1694 "and write permissions are checked during B<open>(2) using "
1695 "B<LANDLOCK_ACCESS_FS_READ_FILE> and B<LANDLOCK_ACCESS_FS_WRITE_FILE>. This "
1696 "access right is available since the third version of the Landlock ABI."
1697 msgstr ""
1698
1699 #. type: tbl table
1700 #: debian-trixie fedora-44 fedora-rawhide mageia-cauldron
1701 #, no-wrap
1702 msgid "Newly introduced access rights"
1703 msgstr ""
1704
1705 #. type: Plain text
1706 #: debian-trixie
1707 msgid ""
1708 "It is currently not possible to restrict some file-related actions "
1709 "accessible through these system call families: B<chdir>(2), B<stat>(2), "
1710 "B<flock>(2), B<chmod>(2), B<chown>(2), B<setxattr>(2), B<utime>(2), "
1711 "B<ioctl>(2), B<fcntl>(2), B<access>(2). Future Landlock evolutions will "
1712 "enable to restrict them."
1713 msgstr ""
1714
1715 #. type: Plain text
1716 #: debian-trixie
1717 #, fuzzy, no-wrap
1718 #| msgid ""
1719 #| "attr.handled_access_fs =\n"
1720 #| " LANDLOCK_ACCESS_FS_EXECUTE |\n"
1721 #| " LANDLOCK_ACCESS_FS_WRITE_FILE |\n"
1722 #| " LANDLOCK_ACCESS_FS_READ_FILE |\n"
1723 #| " LANDLOCK_ACCESS_FS_READ_DIR |\n"
1724 #| " LANDLOCK_ACCESS_FS_REMOVE_DIR |\n"
1725 #| " LANDLOCK_ACCESS_FS_REMOVE_FILE |\n"
1726 #| " LANDLOCK_ACCESS_FS_MAKE_CHAR |\n"
1727 #| " LANDLOCK_ACCESS_FS_MAKE_DIR |\n"
1728 #| " LANDLOCK_ACCESS_FS_MAKE_REG |\n"
1729 #| " LANDLOCK_ACCESS_FS_MAKE_SOCK |\n"
1730 #| " LANDLOCK_ACCESS_FS_MAKE_FIFO |\n"
1731 #| " LANDLOCK_ACCESS_FS_MAKE_BLOCK |\n"
1732 #| " LANDLOCK_ACCESS_FS_MAKE_SYM;\n"
1733 msgid ""
1734 "struct landlock_ruleset_attr attr = {0};\n"
1735 "int ruleset_fd;\n"
1736 "\\&\n"
1737 "attr.handled_access_fs =\n"
1738 " LANDLOCK_ACCESS_FS_EXECUTE |\n"
1739 " LANDLOCK_ACCESS_FS_WRITE_FILE |\n"
1740 " LANDLOCK_ACCESS_FS_READ_FILE |\n"
1741 " LANDLOCK_ACCESS_FS_READ_DIR |\n"
1742 " LANDLOCK_ACCESS_FS_REMOVE_DIR |\n"
1743 " LANDLOCK_ACCESS_FS_REMOVE_FILE |\n"
1744 " LANDLOCK_ACCESS_FS_MAKE_CHAR |\n"
1745 " LANDLOCK_ACCESS_FS_MAKE_DIR |\n"
1746 " LANDLOCK_ACCESS_FS_MAKE_REG |\n"
1747 " LANDLOCK_ACCESS_FS_MAKE_SOCK |\n"
1748 " LANDLOCK_ACCESS_FS_MAKE_FIFO |\n"
1749 " LANDLOCK_ACCESS_FS_MAKE_BLOCK |\n"
1750 " LANDLOCK_ACCESS_FS_MAKE_SYM |\n"
1751 " LANDLOCK_ACCESS_FS_REFER |\n"
1752 " LANDLOCK_ACCESS_FS_TRUNCATE;\n"
1753 msgstr ""
1754 "attr.handled_access_fs =\n"
1755 " LANDLOCK_ACCESS_FS_EXECUTE |\n"
1756 " LANDLOCK_ACCESS_FS_WRITE_FILE |\n"
1757 " LANDLOCK_ACCESS_FS_READ_FILE |\n"
1758 " LANDLOCK_ACCESS_FS_READ_DIR |\n"
1759 " LANDLOCK_ACCESS_FS_REMOVE_DIR |\n"
1760 " LANDLOCK_ACCESS_FS_REMOVE_FILE |\n"
1761 " LANDLOCK_ACCESS_FS_MAKE_CHAR |\n"
1762 " LANDLOCK_ACCESS_FS_MAKE_DIR |\n"
1763 " LANDLOCK_ACCESS_FS_MAKE_REG |\n"
1764 " LANDLOCK_ACCESS_FS_MAKE_SOCK |\n"
1765 " LANDLOCK_ACCESS_FS_MAKE_FIFO |\n"
1766 " LANDLOCK_ACCESS_FS_MAKE_BLOCK |\n"
1767 " LANDLOCK_ACCESS_FS_MAKE_SYM;\n"
1768
1769 #. type: Plain text
1770 #: debian-trixie
1771 #, no-wrap
1772 msgid ""
1773 "/*\n"
1774 " * Table of available file system access rights by ABI version,\n"
1775 " * numbers hardcoded to keep the example short.\n"
1776 " */\n"
1777 "__u64 landlock_fs_access_rights[] = {\n"
1778 " (LANDLOCK_ACCESS_FS_MAKE_SYM E<lt>E<lt> 1) - 1, /* v1 */\n"
1779 " (LANDLOCK_ACCESS_FS_REFER E<lt>E<lt> 1) - 1, /* v2: add \"refer\" */\n"
1780 " (LANDLOCK_ACCESS_FS_TRUNCATE E<lt>E<lt> 1) - 1, /* v3: add \"truncate\" */\n"
1781 "};\n"
1782 "\\&\n"
1783 "int abi = landlock_create_ruleset(NULL, 0,\n"
1784 " LANDLOCK_CREATE_RULESET_VERSION);\n"
1785 "if (abi == -1) {\n"
1786 " /*\n"
1787 " * Kernel too old, not compiled with Landlock,\n"
1788 " * or Landlock was not enabled at boot time.\n"
1789 " */\n"
1790 " perror(\"Unable to use Landlock\");\n"
1791 " return; /* Graceful fallback: Do nothing. */\n"
1792 "}\n"
1793 "abi = MIN(abi, 3);\n"
1794 "\\&\n"
1795 "/* Only use the available rights in the ruleset. */\n"
1796 "attr.handled_access_fs &= landlock_fs_access_rights[abi - 1];\n"
1797 msgstr ""
1798
1799 #. type: Plain text
1800 #: debian-trixie fedora-44 fedora-rawhide
1801 msgid ""
1802 "Full working code can be found in E<.UR https://git.kernel.org/\\:pub/\\:scm/"
1803 "\\:linux/\\:kernel/\\:git/\\:stable/\\:linux.git/\\:tree/\\:samples/"
1804 "\\:landlock/\\:sandboxer.c> E<.UE>"
1805 msgstr ""
1806
1807 #. type: Plain text
1808 #: debian-trixie fedora-44 fedora-rawhide
1809 msgid "E<.UR https://landlock.io/> E<.UE>"
1810 msgstr "E<.UR https://landlock.io/> E<.UE>"
1811
1812 #. type: TH
1813 #: fedora-44 fedora-rawhide
1814 #, no-wrap
1815 msgid "2025-03-06"
1816 msgstr "6 марта 2025 г."
1817
1818 #. type: TH
1819 #: fedora-44 fedora-rawhide
1820 #, no-wrap
1821 msgid "Linux man-pages 6.13"
1822 msgstr "Страницы руководства Linux 6.13"
1823
1824 #. type: Plain text
1825 #: fedora-44 fedora-rawhide
1826 #, fuzzy
1827 #| msgid "The following values may be written to the file:"
1828 msgid "The following access right applies to both files and directories:"
1829 msgstr "В файл могут быть записаны следующие значения:"
1830
1831 #. type: Plain text
1832 #: fedora-44 fedora-rawhide
1833 #, no-wrap
1834 msgid ""
1835 "/*\n"
1836 " * Table of available file system access rights by ABI version,\n"
1837 " * numbers hardcoded to keep the example short.\n"
1838 " */\n"
1839 "__u64 landlock_fs_access_rights[] = {\n"
1840 " (LANDLOCK_ACCESS_FS_MAKE_SYM E<lt>E<lt> 1) - 1, /* v1 */\n"
1841 " (LANDLOCK_ACCESS_FS_REFER E<lt>E<lt> 1) - 1, /* v2: add \"refer\" */\n"
1842 " (LANDLOCK_ACCESS_FS_TRUNCATE E<lt>E<lt> 1) - 1, /* v3: add \"truncate\" */\n"
1843 " (LANDLOCK_ACCESS_FS_TRUNCATE E<lt>E<lt> 1) - 1, /* v4: TCP support */\n"
1844 " (LANDLOCK_ACCESS_FS_IOCTL_DEV E<lt>E<lt> 1) - 1, /* v5: add \"ioctl_dev\" */\n"
1845 "};\n"
1846 "\\&\n"
1847 "int abi = landlock_create_ruleset(NULL, 0,\n"
1848 " LANDLOCK_CREATE_RULESET_VERSION);\n"
1849 "if (abi == -1) {\n"
1850 " /*\n"
1851 " * Kernel too old, not compiled with Landlock,\n"
1852 " * or Landlock was not enabled at boot time.\n"
1853 " */\n"
1854 " perror(\"Unable to use Landlock\");\n"
1855 " return; /* Graceful fallback: Do nothing. */\n"
1856 "}\n"
1857 "abi = MIN(abi, 3);\n"
1858 "\\&\n"
1859 "/* Only use the available rights in the ruleset. */\n"
1860 "attr.handled_access_fs &= landlock_fs_access_rights[abi - 1];\n"
1861 msgstr ""
1862
1863 #. type: TH
1864 #: mageia-cauldron
1865 #, no-wrap
1866 msgid "2026-02-08"
1867 msgstr "8 февраля 2026 г."
1868
1869 #. type: TH
1870 #: mageia-cauldron
1871 #, no-wrap
1872 msgid "Linux man-pages 6.17"
1873 msgstr "Страницы руководства Linux 6.17"
1874
1875 #. type: TH
1876 #: opensuse-leap-16-1 opensuse-tumbleweed
1877 #, no-wrap
1878 msgid "Linux man-pages (unreleased)"
1879 msgstr "Страницы руководства Linux (не выпущены)"