summaryrefslogtreecommitdiffstats
path: root/po/ru/man2/memfd_create.2.po
blob: 7f3d2be952808a67bd833b1715ae5dd030cd68db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
# Russian translation of manpages
# This file is distributed under the same license as the manpages-l10n package.
# Copyright © of this file:
# aereiae <aereiae@gmail.com>, 2014.
# Alexey <a.chepugov@gmail.com>, 2015.
# Azamat Hackimov <azamat.hackimov@gmail.com>, 2013-2017.
# Dmitriy S. Seregin <dseregin@59.ru>, 2013.
# Dmitry Bolkhovskikh <d20052005@yandex.ru>, 2017.
# ITriskTI <ITriskTI@gmail.com>, 2013.
# Max Is <ismax799@gmail.com>, 2016.
# Yuri Kozlov <yuray@komyakino.ru>, 2011-2019.
# Иван Павлов <pavia00@gmail.com>, 2017.
# Малянов Евгений Викторович <maljanow@outlook.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: manpages-l10n\n"
"POT-Creation-Date: 2024-06-01 06:02+0200\n"
"PO-Revision-Date: 2019-10-06 08:59+0300\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 "memfd_create"
msgstr "memfd_create"

#. type: TH
#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
msgid "2024-05-02"
msgstr "2 мая 2024 г."

#. type: TH
#: archlinux debian-unstable
#, fuzzy, no-wrap
#| msgid "Linux man-pages 6.7"
msgid "Linux man-pages 6.8"
msgstr "Linux man-pages 6.7"

#. 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
msgid "memfd_create - create an anonymous file"
msgstr "memfd_create - создаёт анонимный файл"

#. 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<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
"B<#include E<lt>sys/mman.hE<gt>>\n"
msgstr ""
"B<#define _GNU_SOURCE>         /* Смотрите feature_test_macros(7) */\n"
"B<#include E<lt>sys/mman.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 memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>\n"
msgstr "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>\n"

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "DESCRIPTION"
msgstr "ОПИСАНИЕ"

#.  David Herrmann:
#.      memfd uses VM_NORESERVE so each page is accounted on first access.
#.      This means, the overcommit-limits (see __vm_enough_memory()) and the
#.      memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
#.      those are accounted on "current" and "current->mm", that is, the
#.      process doing the first page access.
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"B<memfd_create>()  creates an anonymous file and returns a file descriptor "
"that refers to it.  The file behaves like a regular file, and so can be "
"modified, truncated, memory-mapped, and so on.  However, unlike a regular "
"file, it lives in RAM and has a volatile backing storage.  Once all "
"references to the file are dropped, it is automatically released.  Anonymous "
"memory is used for all backing pages of the file.  Therefore, files created "
"by B<memfd_create>()  have the same semantics as other anonymous memory "
"allocations such as those allocated using B<mmap>(2)  with the "
"B<MAP_ANONYMOUS> flag."
msgstr ""
"Вызов B<memfd_create>() создаёт анонимный файл и возвращает ссылающийся на "
"него файловый дескриптор. Анонимный файл ведёт себя как обычный файл и может "
"быть изменён, обрезан, отображён в память и т.д. Однако в отличие от "
"обычного файла он располагается в ОЗУ и не имеет энергонезависимого "
"хранилища. Как только все ссылки на файл удаляются, он автоматически "
"исчезает. Анонимные файлы располагаются в анонимной памяти. Поэтому у "
"файлов, создаваемых B<memfd_create>(), такая же семантика как и областей "
"анонимной памяти, выделяемой с помощью B<mmap>(2) с флагом B<MAP_ANONYMOUS>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The initial size of the file is set to 0.  Following the call, the file size "
"should be set using B<ftruncate>(2).  (Alternatively, the file may be "
"populated by calls to B<write>(2)  or similar.)"
msgstr ""
"Первоначально, размер файла равен 0. После этого вызова нужно задать размер "
"файла с помощью B<ftruncate>(2) (или заполнить файл с помощью B<write>(2) "
"или подобными)."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The name supplied in I<name> is used as a filename and will be displayed as "
"the target of the corresponding symbolic link in the directory I</proc/self/"
"fd/>.  The displayed name is always prefixed with I<memfd:> and serves only "
"for debugging purposes.  Names do not affect the behavior of the file "
"descriptor, and as such multiple files can have the same name without any "
"side effects."
msgstr ""
"Имя, указанное в I<name>, используется в качестве имени файла и будет "
"показываться как цель соответствующей символьной ссылки в каталоге. I</proc/"
"self/fd/>. Отображаемое имя всегда начинается с I<memfd:> и служит только "
"для отладки. Имена не влияют на поведение файлового дескриптора и поэтому "
"несколько файлов могут иметь одно имя без каких-либо последствий."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The following values may be bitwise ORed in I<flags> to change the behavior "
"of B<memfd_create>():"
msgstr ""
"Для изменения поведения B<memfd_create>() можно использовать следующие  "
"значения I<flags> (через OR):"

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<MFD_CLOEXEC>"
msgstr "B<MFD_CLOEXEC>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
"the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
"may be useful."
msgstr ""
"Устанавливает флаг close-on-exec (B<FD_CLOEXEC>) для нового открытого "
"файлового дескриптора. Смотрите описание флага B<O_CLOEXEC> в B<open>(2) для "
"того, чтобы узнать как это может пригодиться."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<MFD_ALLOW_SEALING>"
msgstr "B<MFD_ALLOW_SEALING>"

#.  FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
#.  Is it worth adding some text explaining this?
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Allow sealing operations on this file.  See the discussion of the "
"B<F_ADD_SEALS> and B<F_GET_SEALS> operations in B<fcntl>(2), and also NOTES, "
"below.  The initial set of seals is empty.  If this flag is not set, the "
"initial set of seals will be B<F_SEAL_SEAL>, meaning that no other seals can "
"be set on the file."
msgstr ""
"Разрешает операции опечатывания (sealing) файла. Описание операций "
"B<F_ADD_SEALS> и B<F_GET_SEALS> смотрите в B<fcntl>(2), а также в ЗАМЕЧАНИЯ "
"ниже. Первоначально набор печатей пуст. Если этот флаг не установлен, то "
"начальным набором печатей будет B<F_SEAL_SEAL>, означающий запрещение "
"установки печатей на файл."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<MFD_HUGETLB> (since Linux 4.14)"
msgstr "B<MFD_HUGETLB> (начиная с Linux 4.14)"

#.  commit 749df87bd7bee5a79cef073f5d032ddb2b211de8
#.  commit 47b9012ecdc747f6936395265e677d41e11a31ff
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The anonymous file will be created in the hugetlbfs filesystem using huge "
"pages.  See the Linux kernel source file I<Documentation/admin-guide/mm/"
"hugetlbpage.rst> for more information about hugetlbfs.  Specifying both "
"B<MFD_HUGETLB> and B<MFD_ALLOW_SEALING> in I<flags> is supported since Linux "
"4.16."
msgstr ""
"В файловой системе hugetlbfs, использующей огромные страницы, будет создан "
"анонимный файл. В файле исходного кода Linux I<Documentation/admin-guide/mm/"
"hugetlbpage.rst> дана подробная информация о hugetlbfs. Одновременное "
"указание B<MFD_HUGETLB> и B<MFD_ALLOW_SEALING> в I<flags> поддерживается "
"начиная с Linux 4.16."

#. type: TP
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
#, no-wrap
msgid "B<MFD_HUGE_2MB>"
msgstr ""

#. type: TQ
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
#, no-wrap
msgid "B<MFD_HUGE_1GB>"
msgstr ""

#. type: TQ
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
#, no-wrap
msgid "\\&.\\|.\\|."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Used in conjunction with B<MFD_HUGETLB> to select alternative hugetlb page "
"sizes (respectively, 2\\ MB, 1\\ GB, ...)  on systems that support multiple "
"hugetlb page sizes.  Definitions for known huge page sizes are included in "
"the header file I<E<lt>linux/memfd.hE<gt>.>"
msgstr ""
"Используется как дополнение к B<MFD_HUGETLB> для выбора размера страницы "
"hugetlb (соответственно, 2\\ МБ, 1\\ ГБ, …) в системах, которые поддерживают "
"различные размеры страниц hugetlb. Определения размеров огромных страниц "
"включены в заголовочный файл I<E<lt>linux/memfd.hE<gt>.>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"For details on encoding huge page sizes not included in the header file, see "
"the discussion of the similarly named constants in B<mmap>(2)."
msgstr ""
"Дополнительную информацию о кодировании размеров огромных страниц, "
"отсутствующих в заголовочном файле, смотрите в описании сходных по имени "
"констант в B<mmap>(2)."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "Unused bits in I<flags> must be 0."
msgstr "Неиспользуемые биты в I<flags> должны быть равны 0."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"As its return value, B<memfd_create>()  returns a new file descriptor that "
"can be used to refer to the file.  This file descriptor is opened for both "
"reading and writing (B<O_RDWR>)  and B<O_LARGEFILE> is set for the file "
"descriptor."
msgstr ""
"В качестве возвращаемого значения B<memfd_create>() возвращает новый "
"файловый дескриптор, который можно использовать для обращения к файлу. "
"Данный файловый дескриптор открыт на чтение и запись (B<O_RDWR>) и в "
"файловом дескрипторе установлен флаг B<O_LARGEFILE>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"With respect to B<fork>(2)  and B<execve>(2), the usual semantics apply for "
"the file descriptor created by B<memfd_create>().  A copy of the file "
"descriptor is inherited by the child produced by B<fork>(2)  and refers to "
"the same file.  The file descriptor is preserved across B<execve>(2), unless "
"the close-on-exec flag has been set."
msgstr ""
"При вызове B<fork>(2) и B<execve>(2) с файловым дескриптором, созданным "
"B<memfd_create>(), применяется обычная семантика. Копия файлового "
"дескриптора наследуется потомком, созданным B<fork>(2), указывает на тот же "
"файл. Файловый дескриптор сохраняется при после B<execve>(2), если не "
"установлен флаг close-on-exec."

#. 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
msgid ""
"On success, B<memfd_create>()  returns a new file descriptor.  On error, -1 "
"is returned and I<errno> is set to indicate the error."
msgstr ""
"При успешном выполнении B<memfd_create>() возвращает новый файловый "
"дескриптор. При ошибке возвращается -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: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EFAULT>"
msgstr "B<EFAULT>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "The address in I<name> points to invalid memory."
msgstr "Некорректный адрес в I<name>."

#. 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<flags> included unknown bits."
msgstr "В I<flags> указаны неизвестные биты."

#.  NAME_MAX - strlen("memfd:")
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"I<name> was too long.  (The limit is 249 bytes, excluding the terminating "
"null byte.)"
msgstr ""
"Значение I<name> было слишком длинным (ограничено 249 байтами, не считая "
"конечный байт null)."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Both B<MFD_HUGETLB> and B<MFD_ALLOW_SEALING> were specified in I<flags>."
msgstr "В I<flags> указаны B<MFD_HUGETLB> и B<MFD_ALLOW_SEALING> одновременно."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EMFILE>"
msgstr "B<EMFILE>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The per-process limit on the number of open file descriptors has been "
"reached."
msgstr ""
"Было достигнуто ограничение по количеству открытых файловых дескрипторов на "
"процесс."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<ENFILE>"
msgstr "B<ENFILE>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The system-wide limit on the total number of open files has been reached."
msgstr "Достигнуто максимальное количество открытых файлов в системе."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<ENOMEM>"
msgstr "B<ENOMEM>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "There was insufficient memory to create a new anonymous file."
msgstr "Недостаточно памяти для создания нового анонимного файла."

#. 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 B<MFD_HUGETLB> flag was specified, but the caller was not privileged "
"(did not have the B<CAP_IPC_LOCK> capability)  and is not a member of the "
"I<sysctl_hugetlb_shm_group> group; see the description of I</proc/sys/vm/"
"sysctl_hugetlb_shm_group> in B<proc>(5)."
msgstr ""

#. 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 "Since glibc 2.2.2:"
msgid "Linux 3.17, glibc 2.27."
msgstr "Начиная с glibc 2.2.2:"

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "NOTES"
msgstr "ПРИМЕЧАНИЯ"

#.  See also http://lwn.net/Articles/593918/
#.  and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The B<memfd_create>()  system call provides a simple alternative to manually "
"mounting a B<tmpfs>(5)  filesystem and creating and opening a file in that "
"filesystem.  The primary purpose of B<memfd_create>()  is to create files "
"and associated file descriptors that are used with the file-sealing APIs "
"provided by B<fcntl>(2)."
msgstr ""
"Системный вызов B<memfd_create>() предоставляет простую альтернативу ручному "
"монтированию файловой системы B<tmpfs>(5), созданию и открытию файла в этой "
"файловой системе. Основным предназначением B<memfd_create>() является "
"создание файлов и соответствующих файловых дескрипторов, которые "
"используются с программным интерфейсом опечатывания файлов, предоставляемым "
"B<fcntl>(2)."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The B<memfd_create>()  system call also has uses without file sealing (which "
"is why file-sealing is disabled, unless explicitly requested with the "
"B<MFD_ALLOW_SEALING> flag).  In particular, it can be used as an alternative "
"to creating files in I<tmp> or as an alternative to using the B<open>(2)  "
"B<O_TMPFILE> in cases where there is no intention to actually link the "
"resulting file into the filesystem."
msgstr ""
"Системный вызов B<memfd_create>() также используется и без опечатывания "
"файла (вот почему опечатывание файлов отключено, если этого не запросить "
"явно с помощью флага B<MFD_ALLOW_SEALING>). В частности, он может "
"использоваться как альтернатива созданию файлов в I<tmp> или использованию "
"B<open>(2) с B<O_TMPFILE> в случаях, когда не требуется реальная ссылка на "
"конечный файл в файловой системе."

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "File sealing"
msgstr "Опечатывание файла (file sealing)"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"In the absence of file sealing, processes that communicate via shared memory "
"must either trust each other, or take measures to deal with the possibility "
"that an untrusted peer may manipulate the shared memory region in "
"problematic ways.  For example, an untrusted peer might modify the contents "
"of the shared memory at any time, or shrink the shared memory region.  The "
"former possibility leaves the local process vulnerable to time-of-check-to-"
"time-of-use race conditions (typically dealt with by copying data from the "
"shared memory region before checking and using it).  The latter possibility "
"leaves the local process vulnerable to B<SIGBUS> signals when an attempt is "
"made to access a now-nonexistent location in the shared memory region.  "
"(Dealing with this possibility necessitates the use of a handler for the "
"B<SIGBUS> signal.)"
msgstr ""
"Ели файл не опечатан, то процессы, которые связываются через общую память, "
"должны или доверять друг другу, или учитывать возможность того, что "
"недоверенная сторона может работать с общей памятью проблемным способом. "
"Например, недоверенная сторона может изменить содержимое общей памяти в "
"любое время или уменьшить область общей памяти. Первая возможность делает "
"локальный процесс уязвимым к состязательности условий «момент проверки — "
"момент использования» (обычно решается копированием данных из области общей "
"памяти перед проверкой и использованием). Последняя возможность делает "
"локальный процесс уязвимым к сигналам B<SIGBUS>, которые возникают при "
"попытке получить доступ к теперь несуществующему расположению в области "
"общей памяти (решается использованием обработчика сигнала B<SIGBUS>)."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Dealing with untrusted peers imposes extra complexity on code that employs "
"shared memory.  Memory sealing enables that extra complexity to be "
"eliminated, by allowing a process to operate secure in the knowledge that "
"its peer can't modify the shared memory in an undesired fashion."
msgstr ""
"Взаимодействие с недоверенными сторонами приводит к усложнению кода для "
"работы с общей памятью. Опечатывание памяти позволяет устранить эту "
"сложность, позволяя процессу безопасно работать, зная что его партнёр не "
"может изменить общую память нежелательным способом."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "An example of the usage of the sealing mechanism is as follows:"
msgstr "В примере использования механизма опечатывания происходит следующее:"

#. type: IP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "(1)"
msgstr "(1)"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The first process creates a B<tmpfs>(5)  file using B<memfd_create>().  The "
"call yields a file descriptor used in subsequent steps."
msgstr ""
"Первый процесс создаёт файл B<tmpfs>(5) с помощью B<memfd_create>(). Вызов "
"возвращает файловый дескриптор, используемый далее."

#. type: IP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "(2)"
msgstr "(2)"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The first process sizes the file created in the previous step using "
"B<ftruncate>(2), maps it using B<mmap>(2), and populates the shared memory "
"with the desired data."
msgstr ""
"Первый процесс задаёт размер файла, созданного ранее, с помощью "
"B<ftruncate>(2), отображает его с помощью B<mmap>(2) и заполняется общую "
"память нужными данными."

#. type: IP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "(3)"
msgstr "(3)"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy
#| msgid ""
#| "The first process uses the B<fcntl>(2)  B<F_ADD_SEALS> operation to place "
#| "one or more seals on the file, in order to restrict further modifications "
#| "on the file.  (If placing the seal B<F_SEAL_WRITE>, then it will be "
#| "necessary to first unmap the shared writable mapping created in the "
#| "previous step.)"
msgid ""
"The first process uses the B<fcntl>(2)  B<F_ADD_SEALS> operation to place "
"one or more seals on the file, in order to restrict further modifications on "
"the file.  (If placing the seal B<F_SEAL_WRITE>, then it will be necessary "
"to first unmap the shared writable mapping created in the previous step.  "
"Otherwise, behavior similar to B<F_SEAL_WRITE> can be achieved by using "
"B<F_SEAL_FUTURE_WRITE>, which will prevent future writes via B<mmap>(2)  and "
"B<write>(2)  from succeeding while keeping existing shared writable "
"mappings)."
msgstr ""
"Первый процесс использует B<fcntl>(2) с операцией B<F_ADD_SEALS> для "
"установки одной или более печатей на файл, чтобы в дальнейшем ограничить "
"изменение файла (если устанавливается печать B<F_SEAL_WRITE>, то сначала "
"нужно удалить общее доступное на запись отображение, созданное ранее)."

#. type: IP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "(4)"
msgstr "(4)"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"A second process obtains a file descriptor for the B<tmpfs>(5)  file and "
"maps it.  Among the possible ways in which this could happen are the "
"following:"
msgstr ""
"Второй процесс получает файловый дескриптор файла B<tmpfs>(5) и отображает "
"его. Варианты того, как это можно сделать:"

#. 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 ""
"The process that called B<memfd_create>()  could transfer the resulting file "
"descriptor to the second process via a UNIX domain socket (see B<unix>(7)  "
"and B<cmsg>(3)).  The second process then maps the file using B<mmap>(2)."
msgstr ""
"Процесс, вызвавший B<memfd_create>(), может переслать полученный файловый "
"дескриптор второму процессу через доменный сокет UNIX (смотрите B<unix>(7) и "
"B<cmsg>(3)). Второй процесс затем отображает файл с помощью B<mmap>(2)."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The second process is created via B<fork>(2)  and thus automatically "
"inherits the file descriptor and mapping.  (Note that in this case and the "
"next, there is a natural trust relationship between the two processes, since "
"they are running under the same user ID.  Therefore, file sealing would not "
"normally be necessary.)"
msgstr ""
"Второй процесс создаётся с помощью B<fork>(2) и, таким образом, наследует "
"файловый дескриптор и отображение (заметим, что в этом случае и следующем "
"образуется природное доверие между двумя процессами, так как они работают с "
"правами одного пользовательского идентификатора. Поэтому опечатывание файла "
"здесь не нужно)."

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy
#| msgid ""
#| "The second process opens the file I</proc/E<lt>pidE<gt>/fd/E<lt>fdE<gt>>, "
#| "where I<E<lt>pidE<gt>> is the PID of the first process (the one that "
#| "called B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file "
#| "descriptor returned by the call to B<memfd_create>()  in that process.  "
#| "The second process then maps the file using B<mmap>(2)."
msgid ""
"The second process opens the file I</proc/>pidI</fd/>fd, where "
"I<E<lt>pidE<gt>> is the PID of the first process (the one that called "
"B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file descriptor "
"returned by the call to B<memfd_create>()  in that process.  The second "
"process then maps the file using B<mmap>(2)."
msgstr ""
"Второй процесс открывает файл I</proc/E<lt>pidE<gt>/fd/E<lt>fdE<gt>>, где "
"I<E<lt>pidE<gt>> — PID первого процесса (вызвавшего B<memfd_create>()), а "
"I<E<lt>fdE<gt>> — номер файлового дескриптора, возвращённого вызовом "
"B<memfd_create>() в этом процессе. Затем второй процесс отображает файл с "
"помощью B<mmap>(2)."

#. type: IP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "(5)"
msgstr "(5)"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The second process uses the B<fcntl>(2)  B<F_GET_SEALS> operation to "
"retrieve the bit mask of seals that has been applied to the file.  This bit "
"mask can be inspected in order to determine what kinds of restrictions have "
"been placed on file modifications.  If desired, the second process can apply "
"further seals to impose additional restrictions (so long as the "
"B<F_SEAL_SEAL> seal has not yet been applied)."
msgstr ""
"Второй процесс использует B<fcntl>(2) с операцией B<F_GET_SEALS> для "
"получения битовой маски печатей, которые были применены к файлу. Данная "
"маска проверяется, чтобы определить какие ограничения наложены на изменения "
"файла. Если требуется, то второй процесс может наложить дополнительные "
"печати, что ещё ограничить действия (возможно до тех пор, пока не будет "
"наложена печать B<F_SEAL_SEAL>)."

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "EXAMPLES"
msgstr "ПРИМЕРЫ"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Below are shown two example programs that demonstrate the use of "
"B<memfd_create>()  and the file sealing API."
msgstr ""
"Далее показано два примера программы, в которых продемонстрировано "
"использование B<memfd_create>() и программный интерфейс опечатывания файла."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The first program, I<t_memfd_create.c>, creates a B<tmpfs>(5)  file using "
"B<memfd_create>(), sets a size for the file, maps it into memory, and "
"optionally places some seals on the file.  The program accepts up to three "
"command-line arguments, of which the first two are required.  The first "
"argument is the name to associate with the file, the second argument is the "
"size to be set for the file, and the optional third argument is a string of "
"characters that specify seals to be set on the file."
msgstr ""
"Первая программа, I<t_memfd_create.c>, создаёт файл B<tmpfs>(5) с помощью "
"B<memfd_create>(), изменяет его размер, отображает в память и, возможно, "
"накладывает несколько печатей на файл. Программа принимает не более трёх "
"аргументов командной строки, два первых обязательные. Первым аргументом "
"задаётся имя файла, во втором — размер файла, а в необязательном третьем — "
"строка символов, задающих устанавливаемые печати на файл."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The second program, I<t_get_seals.c>, can be used to open an existing file "
"that was created via B<memfd_create>()  and inspect the set of seals that "
"have been applied to that file."
msgstr ""
"Вторая программа, I<t_get_seals.c>, может использоваться для открытия "
"существующего файла, созданного B<memfd_create>(), и проверки набора "
"печатей, применённых к файлу."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The following shell session demonstrates the use of these programs.  First "
"we create a B<tmpfs>(5)  file and set some seals on it:"
msgstr ""
"Следующий пример сеанса показывает как использовать программу. Сначала "
"создаётся файл B<tmpfs>(5) и накладываются печати:"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
"[1] 11775\n"
"PID: 11775; fd: 3; /proc/11775/fd/3\n"
msgstr ""
"$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
"[1] 11775\n"
"PID: 11775; fd: 3; /proc/11775/fd/3\n"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"At this point, the I<t_memfd_create> program continues to run in the "
"background.  From another program, we can obtain a file descriptor for the "
"file created by B<memfd_create>()  by opening the I</proc/>pidI</fd> file "
"that corresponds to the file descriptor opened by B<memfd_create>().  Using "
"that pathname, we inspect the content of the I</proc/>pidI</fd> symbolic "
"link, and use our I<t_get_seals> program to view the seals that have been "
"placed on the file:"
msgstr ""
"После этого программа I<t_memfd_create> продолжает выполняться в фоновом "
"режиме. Из другой программы можно получить дескриптор файла, созданный "
"B<memfd_create>(), открыв файл I</proc/>pidI</fd>, который соответствует "
"файловому дескриптору, открытому B<memfd_create>(). Используя это имя, можно "
"просмотреть содержимое символьной ссылки I</proc/>pidI</fd> и использовать "
"программу I<t_get_seals> для просмотра печатей, которые установлены на файл:"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"$ B<readlink /proc/11775/fd/3>\n"
"/memfd:my_memfd_file (deleted)\n"
"$ B<./t_get_seals /proc/11775/fd/3>\n"
"Existing seals: WRITE SHRINK\n"
msgstr ""
"$ B<readlink /proc/11775/fd/3>\n"
"/memfd:my_memfd_file (удалён)\n"
"$ B<./t_get_seals /proc/11775/fd/3>\n"
"Наложенные печати: WRITE SHRINK\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: t_memfd_create.c"
msgstr "Исходный код программы: t_memfd_create.c"

#. type: Plain text
#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
msgid ""
"#define _GNU_SOURCE\n"
"#include E<lt>err.hE<gt>\n"
"#include E<lt>fcntl.hE<gt>\n"
"#include E<lt>stdint.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>string.hE<gt>\n"
"#include E<lt>sys/mman.hE<gt>\n"
"#include E<lt>sys/types.hE<gt>\n"
"#include E<lt>unistd.hE<gt>\n"
"\\&\n"
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
"    int           fd;\n"
"    char          *name, *seals_arg;\n"
"    ssize_t       len;\n"
"    unsigned int  seals;\n"
"\\&\n"
"    if (argc E<lt> 3) {\n"
"        fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
"        fprintf(stderr, \"\\et\\[aq]seals\\[aq] can contain any of the \"\n"
"                \"following characters:\\en\");\n"
"        fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
"        fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
"        fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
"        fprintf(stderr, \"\\et\\etW - F_SEAL_FUTURE_WRITE\\en\");\n"
"        fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
"        exit(EXIT_FAILURE);\n"
"    }\n"
"\\&\n"
"    name = argv[1];\n"
"    len = atoi(argv[2]);\n"
"    seals_arg = argv[3];\n"
"\\&\n"
"    /* Create an anonymous file in tmpfs; allow seals to be\n"
"       placed on the file. */\n"
"\\&\n"
"    fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
"    if (fd == -1)\n"
"        err(EXIT_FAILURE, \"memfd_create\");\n"
"\\&\n"
"    /* Size the file as specified on the command line. */\n"
"\\&\n"
"    if (ftruncate(fd, len) == -1)\n"
"        err(EXIT_FAILURE, \"truncate\");\n"
"\\&\n"
"    printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\en\",\n"
"           (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
"\\&\n"
"    /* Code to map the file and populate the mapping with data\n"
"       omitted. */\n"
"\\&\n"
"    /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
"       seals on the file. */\n"
"\\&\n"
"    if (seals_arg != NULL) {\n"
"        seals = 0;\n"
"\\&\n"
"        if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
"            seals |= F_SEAL_GROW;\n"
"        if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
"            seals |= F_SEAL_SHRINK;\n"
"        if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
"            seals |= F_SEAL_WRITE;\n"
"        if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
"            seals |= F_SEAL_FUTURE_WRITE;\n"
"        if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
"            seals |= F_SEAL_SEAL;\n"
"\\&\n"
"        if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
"            err(EXIT_FAILURE, \"fcntl\");\n"
"    }\n"
"\\&\n"
"    /* Keep running, so that the file created by memfd_create()\n"
"       continues to exist. */\n"
"\\&\n"
"    pause();\n"
"\\&\n"
"    exit(EXIT_SUCCESS);\n"
"}\n"
msgstr ""

#.  SRC END
#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Program source: t_get_seals.c"
msgstr "Исходный код программы: t_get_seals.c"

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
#, no-wrap
msgid ""
"#define _GNU_SOURCE\n"
"#include E<lt>err.hE<gt>\n"
"#include E<lt>fcntl.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"\\&\n"
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
"    int           fd;\n"
"    unsigned int  seals;\n"
"\\&\n"
"    if (argc != 2) {\n"
"        fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
"        exit(EXIT_FAILURE);\n"
"    }\n"
"\\&\n"
"    fd = open(argv[1], O_RDWR);\n"
"    if (fd == -1)\n"
"        err(EXIT_FAILURE, \"open\");\n"
"\\&\n"
"    seals = fcntl(fd, F_GET_SEALS);\n"
"    if (seals == -1)\n"
"        err(EXIT_FAILURE, \"fcntl\");\n"
"\\&\n"
"    printf(\"Existing seals:\");\n"
"    if (seals & F_SEAL_SEAL)\n"
"        printf(\" SEAL\");\n"
"    if (seals & F_SEAL_GROW)\n"
"        printf(\" GROW\");\n"
"    if (seals & F_SEAL_WRITE)\n"
"        printf(\" WRITE\");\n"
"    if (seals & F_SEAL_FUTURE_WRITE)\n"
"        printf(\" FUTURE_WRITE\");\n"
"    if (seals & F_SEAL_SHRINK)\n"
"        printf(\" SHRINK\");\n"
"    printf(\"\\en\");\n"
"\\&\n"
"    /* Code to map the file and access the contents of the\n"
"       resulting mapping omitted. */\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<fcntl>(2), B<ftruncate>(2), B<memfd_secret>(2), B<mmap>(2), B<shmget>(2), "
"B<shm_open>(3)"
msgstr ""
"B<fcntl>(2), B<ftruncate>(2), B<memfd_secret>(2), B<mmap>(2), B<shmget>(2), "
"B<shm_open>(3)"

#. 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: TP
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "B<MFD_HUGE_2MB>, B<MFD_HUGE_1GB>, B<...>"
msgstr "B<MFD_HUGE_2MB>, B<MFD_HUGE_1GB>, B<...>"

#. type: SH
#: debian-bookworm
#, no-wrap
msgid "VERSIONS"
msgstr "ВЕРСИИ"

#. type: Plain text
#: debian-bookworm
#, fuzzy
#| msgid ""
#| "The B<memfd_create>()  system call first appeared in Linux 3.17; glibc "
#| "support was added in version 2.27."
msgid ""
"The B<memfd_create>()  system call first appeared in Linux 3.17; glibc "
"support was added in glibc 2.27."
msgstr ""
"Системный вызов B<memfd_create>() появился в Linux 3.17; поддержка в glibc "
"началась с версии 2.27."

#. type: Plain text
#: debian-bookworm
msgid "The B<memfd_create>()  system call is Linux-specific."
msgstr "Системный вызов B<memfd_create>() есть только в Linux."

#. type: Plain text
#: debian-bookworm
msgid ""
"The second process opens the file I</proc/E<lt>pidE<gt>/fd/E<lt>fdE<gt>>, "
"where I<E<lt>pidE<gt>> is the PID of the first process (the one that called "
"B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file descriptor "
"returned by the call to B<memfd_create>()  in that process.  The second "
"process then maps the file using B<mmap>(2)."
msgstr ""
"Второй процесс открывает файл I</proc/E<lt>pidE<gt>/fd/E<lt>fdE<gt>>, где "
"I<E<lt>pidE<gt>> — PID первого процесса (вызвавшего B<memfd_create>()), а "
"I<E<lt>fdE<gt>> — номер файлового дескриптора, возвращённого вызовом "
"B<memfd_create>() в этом процессе. Затем второй процесс отображает файл с "
"помощью B<mmap>(2)."

#. 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>fcntl.hE<gt>\n"
"#include E<lt>stdint.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>string.hE<gt>\n"
"#include E<lt>sys/mman.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>fcntl.hE<gt>\n"
"#include E<lt>stdint.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>string.hE<gt>\n"
"#include E<lt>sys/mman.hE<gt>\n"
"#include E<lt>unistd.hE<gt>\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
"    int           fd;\n"
"    char          *name, *seals_arg;\n"
"    ssize_t       len;\n"
"    unsigned int  seals;\n"
msgstr ""
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
"    int           fd;\n"
"    char          *name, *seals_arg;\n"
"    ssize_t       len;\n"
"    unsigned int  seals;\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, fuzzy, no-wrap
#| msgid ""
#| "    if (argc E<lt> 3) {\n"
#| "        fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
#| "        fprintf(stderr, \"\\et\\(aqseals\\(aq can contain any of the \"\n"
#| "                \"following characters:\\en\");\n"
#| "        fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
#| "        fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
#| "        fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
#| "        fprintf(stderr, \"\\et\\etW - F_SEAL_FUTURE_WRITE\\en\");\n"
#| "        fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
#| "        exit(EXIT_FAILURE);\n"
#| "    }\n"
msgid ""
"    if (argc E<lt> 3) {\n"
"        fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
"        fprintf(stderr, \"\\et\\[aq]seals\\[aq] can contain any of the \"\n"
"                \"following characters:\\en\");\n"
"        fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
"        fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
"        fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
"        fprintf(stderr, \"\\et\\etW - F_SEAL_FUTURE_WRITE\\en\");\n"
"        fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
"        exit(EXIT_FAILURE);\n"
"    }\n"
msgstr ""
"    if (argc E<lt> 3) {\n"
"        fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
"        fprintf(stderr, \"\\et\\(aqseals\\(aq могут быть \"\n"
"                \"следующие символы::\\en\");\n"
"        fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
"        fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
"        fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
"        fprintf(stderr, \"\\et\\etW - F_SEAL_FUTURE_WRITE\\en\");\n"
"        fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
"        exit(EXIT_FAILURE);\n"
"    }\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    name = argv[1];\n"
"    len = atoi(argv[2]);\n"
"    seals_arg = argv[3];\n"
msgstr ""
"    name = argv[1];\n"
"    len = atoi(argv[2]);\n"
"    seals_arg = argv[3];\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    /* Create an anonymous file in tmpfs; allow seals to be\n"
"       placed on the file. */\n"
msgstr ""
"    /* Создаётся анонимный файл в tmpfs; на файл\n"
"       накладываются указанные печати. */\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
"    if (fd == -1)\n"
"        err(EXIT_FAILURE, \"memfd_create\");\n"
msgstr ""
"    fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
"    if (fd == -1)\n"
"        err(EXIT_FAILURE, \"memfd_create\");\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "    /* Size the file as specified on the command line. */\n"
msgstr "    /* Размер файл как указано в командной строке. */\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    if (ftruncate(fd, len) == -1)\n"
"        err(EXIT_FAILURE, \"truncate\");\n"
msgstr ""
"    if (ftruncate(fd, len) == -1)\n"
"        err(EXIT_FAILURE, \"truncate\");\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\en\",\n"
"           (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
msgstr ""
"    printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\en\",\n"
"           (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    /* Code to map the file and populate the mapping with data\n"
"       omitted. */\n"
msgstr "    /* Здесь может быть код для отображения файла и заполнения данными. */\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, fuzzy, no-wrap
#| msgid ""
#| "    /* If a \\(aqseals\\(aq command-line argument was supplied, set some\n"
#| "       seals on the file. */\n"
msgid ""
"    /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
"       seals on the file. */\n"
msgstr ""
"    /* Если в командной строке задан параметр \\(aqпечати\\(aq, то\n"
"       накладываем их на файл. */\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    if (seals_arg != NULL) {\n"
"        seals = 0;\n"
msgstr ""
"    if (seals_arg != NULL) {\n"
"        seals = 0;\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, fuzzy, no-wrap
#| msgid ""
#| "        if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
#| "            seals |= F_SEAL_GROW;\n"
#| "        if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
#| "            seals |= F_SEAL_SHRINK;\n"
#| "        if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
#| "            seals |= F_SEAL_WRITE;\n"
#| "        if (strchr(seals_arg, \\(aqW\\(aq) != NULL)\n"
#| "            seals |= F_SEAL_FUTURE_WRITE;\n"
#| "        if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
#| "            seals |= F_SEAL_SEAL;\n"
msgid ""
"        if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
"            seals |= F_SEAL_GROW;\n"
"        if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
"            seals |= F_SEAL_SHRINK;\n"
"        if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
"            seals |= F_SEAL_WRITE;\n"
"        if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
"            seals |= F_SEAL_FUTURE_WRITE;\n"
"        if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
"            seals |= F_SEAL_SEAL;\n"
msgstr ""
"        if (strchr(seals_arg, \\(aqg\\(aq) != NULL)\n"
"            seals |= F_SEAL_GROW;\n"
"        if (strchr(seals_arg, \\(aqs\\(aq) != NULL)\n"
"            seals |= F_SEAL_SHRINK;\n"
"        if (strchr(seals_arg, \\(aqw\\(aq) != NULL)\n"
"            seals |= F_SEAL_WRITE;\n"
"        if (strchr(seals_arg, \\(aqW\\(aq) != NULL)\n"
"            seals |= F_SEAL_FUTURE_WRITE;\n"
"        if (strchr(seals_arg, \\(aqS\\(aq) != NULL)\n"
"            seals |= F_SEAL_SEAL;\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"        if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
"            err(EXIT_FAILURE, \"fcntl\");\n"
"    }\n"
msgstr ""
"        if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
"            err(EXIT_FAILURE, \"fcntl\");\n"
"    }\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    /* Keep running, so that the file created by memfd_create()\n"
"       continues to exist. */\n"
msgstr ""
"    /* Продолжаем выполнение для того, чтобы файл, созданный memfd_create(),\n"
"       продолжал существовать. */\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "    pause();\n"
msgstr "    pause();\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: 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>fcntl.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
msgstr ""
"#define _GNU_SOURCE\n"
"#include E<lt>err.hE<gt>\n"
"#include E<lt>fcntl.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
"    int           fd;\n"
"    unsigned int  seals;\n"
msgstr ""
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
"    int           fd;\n"
"    unsigned int  seals;\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    if (argc != 2) {\n"
"        fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
"        exit(EXIT_FAILURE);\n"
"    }\n"
msgstr ""
"    if (argc != 2) {\n"
"        fprintf(stderr, \"%s /proc/PID/fd/FD\\en\", argv[0]);\n"
"        exit(EXIT_FAILURE);\n"
"    }\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    fd = open(argv[1], O_RDWR);\n"
"    if (fd == -1)\n"
"        err(EXIT_FAILURE, \"open\");\n"
msgstr ""
"    fd = open(argv[1], O_RDWR);\n"
"    if (fd == -1)\n"
"        err(EXIT_FAILURE, \"open\");\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    seals = fcntl(fd, F_GET_SEALS);\n"
"    if (seals == -1)\n"
"        err(EXIT_FAILURE, \"fcntl\");\n"
msgstr ""
"    seals = fcntl(fd, F_GET_SEALS);\n"
"    if (seals == -1)\n"
"        err(EXIT_FAILURE, \"fcntl\");\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    printf(\"Existing seals:\");\n"
"    if (seals & F_SEAL_SEAL)\n"
"        printf(\" SEAL\");\n"
"    if (seals & F_SEAL_GROW)\n"
"        printf(\" GROW\");\n"
"    if (seals & F_SEAL_WRITE)\n"
"        printf(\" WRITE\");\n"
"    if (seals & F_SEAL_FUTURE_WRITE)\n"
"        printf(\" FUTURE_WRITE\");\n"
"    if (seals & F_SEAL_SHRINK)\n"
"        printf(\" SHRINK\");\n"
"    printf(\"\\en\");\n"
msgstr ""
"    printf(\"Наложенные печати:\");\n"
"    if (seals & F_SEAL_SEAL)\n"
"        printf(\" SEAL\");\n"
"    if (seals & F_SEAL_GROW)\n"
"        printf(\" GROW\");\n"
"    if (seals & F_SEAL_WRITE)\n"
"        printf(\" WRITE\");\n"
"    if (seals & F_SEAL_FUTURE_WRITE)\n"
"        printf(\" FUTURE_WRITE\");\n"
"    if (seals & F_SEAL_SHRINK)\n"
"        printf(\" SHRINK\");\n"
"    printf(\"\\en\");\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    /* Code to map the file and access the contents of the\n"
"       resulting mapping omitted. */\n"
msgstr "    /* Здесь может быть код для отображения и доступа к содержимому файла. */\n"

#. type: TH
#: fedora-40 fedora-rawhide mageia-cauldron
#, no-wrap
msgid "2023-10-31"
msgstr "31 октября 2023 г."

#. type: TH
#: fedora-40 mageia-cauldron
#, no-wrap
msgid "Linux man-pages 6.06"
msgstr "Linux man-pages 6.06"

#. type: Plain text
#: fedora-40 fedora-rawhide mageia-cauldron
#, no-wrap
msgid ""
"#define _GNU_SOURCE\n"
"#include E<lt>err.hE<gt>\n"
"#include E<lt>fcntl.hE<gt>\n"
"#include E<lt>stdint.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>string.hE<gt>\n"
"#include E<lt>sys/mman.hE<gt>\n"
"#include E<lt>unistd.hE<gt>\n"
"\\&\n"
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
"    int           fd;\n"
"    char          *name, *seals_arg;\n"
"    ssize_t       len;\n"
"    unsigned int  seals;\n"
"\\&\n"
"    if (argc E<lt> 3) {\n"
"        fprintf(stderr, \"%s name size [seals]\\en\", argv[0]);\n"
"        fprintf(stderr, \"\\et\\[aq]seals\\[aq] can contain any of the \"\n"
"                \"following characters:\\en\");\n"
"        fprintf(stderr, \"\\et\\etg - F_SEAL_GROW\\en\");\n"
"        fprintf(stderr, \"\\et\\ets - F_SEAL_SHRINK\\en\");\n"
"        fprintf(stderr, \"\\et\\etw - F_SEAL_WRITE\\en\");\n"
"        fprintf(stderr, \"\\et\\etW - F_SEAL_FUTURE_WRITE\\en\");\n"
"        fprintf(stderr, \"\\et\\etS - F_SEAL_SEAL\\en\");\n"
"        exit(EXIT_FAILURE);\n"
"    }\n"
"\\&\n"
"    name = argv[1];\n"
"    len = atoi(argv[2]);\n"
"    seals_arg = argv[3];\n"
"\\&\n"
"    /* Create an anonymous file in tmpfs; allow seals to be\n"
"       placed on the file. */\n"
"\\&\n"
"    fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
"    if (fd == -1)\n"
"        err(EXIT_FAILURE, \"memfd_create\");\n"
"\\&\n"
"    /* Size the file as specified on the command line. */\n"
"\\&\n"
"    if (ftruncate(fd, len) == -1)\n"
"        err(EXIT_FAILURE, \"truncate\");\n"
"\\&\n"
"    printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\en\",\n"
"           (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
"\\&\n"
"    /* Code to map the file and populate the mapping with data\n"
"       omitted. */\n"
"\\&\n"
"    /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
"       seals on the file. */\n"
"\\&\n"
"    if (seals_arg != NULL) {\n"
"        seals = 0;\n"
"\\&\n"
"        if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
"            seals |= F_SEAL_GROW;\n"
"        if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
"            seals |= F_SEAL_SHRINK;\n"
"        if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
"            seals |= F_SEAL_WRITE;\n"
"        if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
"            seals |= F_SEAL_FUTURE_WRITE;\n"
"        if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
"            seals |= F_SEAL_SEAL;\n"
"\\&\n"
"        if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
"            err(EXIT_FAILURE, \"fcntl\");\n"
"    }\n"
"\\&\n"
"    /* Keep running, so that the file created by memfd_create()\n"
"       continues to exist. */\n"
"\\&\n"
"    pause();\n"
"\\&\n"
"    exit(EXIT_SUCCESS);\n"
"}\n"
msgstr ""

#. type: TH
#: fedora-rawhide
#, no-wrap
msgid "Linux man-pages 6.7"
msgstr "Linux man-pages 6.7"

#. type: TH
#: opensuse-leap-15-6
#, no-wrap
msgid "2023-04-03"
msgstr "3 апреля 2023 г."

#. type: TH
#: opensuse-leap-15-6
#, no-wrap
msgid "Linux man-pages 6.04"
msgstr "Linux man-pages 6.04"

#. type: TH
#: opensuse-tumbleweed
#, fuzzy, no-wrap
#| msgid "Linux man-pages 6.7"
msgid "Linux man-pages (unreleased)"
msgstr "Linux man-pages 6.7"