Debian Codegraph @

po/ar/man2/memfd_create.2.po

raw
1 # Arabic translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # زايد السعيدي <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.30.2\n"
8 "POT-Creation-Date: 2026-06-05 06:31+0200\n"
9 "PO-Revision-Date: 2026-05-18 18:14+0400\n"
10 "Last-Translator: Zayed Al-Saidi <[email protected]>\n"
11 "Language-Team: Arabic <[email protected]>\n"
12 "Language: ar\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
17 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
18 "X-Generator: Lokalize 23.08.5\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "memfd_create"
25 msgstr "memfd_create"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8 فبراير 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "صفحات دليل لينكس 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "الاسم"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid "memfd_create - create an anonymous file"
51 msgstr "memfd_create - إنشاء ملف مجهول"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "LIBRARY"
58 msgstr "المكتبة"
59
60 #. type: Plain text
61 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
62 #: opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "Standard C library (I<libc>,\\ I<-lc>)"
64 msgstr "مكتبة سي المعيارية (I<libc>،\\ I<-lc>)"
65
66 #. type: SH
67 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
68 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
69 #, no-wrap
70 msgid "SYNOPSIS"
71 msgstr "موجز"
72
73 #. type: Plain text
74 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
75 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
76 #, no-wrap
77 msgid ""
78 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
79 "B<#include E<lt>sys/mman.hE<gt>>\n"
80 msgstr ""
81 "B<#define _GNU_SOURCE> /* انظر feature_test_macros(7) */\n"
82 "B<#include E<lt>sys/mman.hE<gt>>\n"
83
84 #. type: Plain text
85 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
86 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
87 #, no-wrap
88 msgid "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>\n"
89 msgstr "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>\n"
90
91 #. type: SH
92 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
93 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
94 #, no-wrap
95 msgid "DESCRIPTION"
96 msgstr "الوصف"
97
98 #. #-#-#-#-# archlinux: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
99 #. David Herrmann:
100 #. memfd uses VM_NORESERVE so each page is accounted on first access.
101 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
102 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
103 #. those are accounted on "current" and "current->mm", that is, the
104 #. process doing the first page access.
105 #. type: Plain text
106 #. #-#-#-#-# debian-trixie: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
107 #. David Herrmann:
108 #. memfd uses VM_NORESERVE so each page is accounted on first access.
109 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
110 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
111 #. those are accounted on "current" and "current->mm", that is, the
112 #. process doing the first page access.
113 #. type: Plain text
114 #. #-#-#-#-# debian-unstable: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
115 #. David Herrmann:
116 #. memfd uses VM_NORESERVE so each page is accounted on first access.
117 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
118 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
119 #. those are accounted on "current" and "current->mm", that is, the
120 #. process doing the first page access.
121 #. type: Plain text
122 #. #-#-#-#-# fedora-44: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
123 #. David Herrmann:
124 #. memfd uses VM_NORESERVE so each page is accounted on first access.
125 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
126 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
127 #. those are accounted on "current" and "current->mm", that is, the
128 #. process doing the first page access.
129 #. type: Plain text
130 #. #-#-#-#-# fedora-rawhide: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
131 #. David Herrmann:
132 #. memfd uses VM_NORESERVE so each page is accounted on first access.
133 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
134 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
135 #. those are accounted on "current" and "current->mm", that is, the
136 #. process doing the first page access.
137 #. type: Plain text
138 #. #-#-#-#-# mageia-cauldron: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
139 #. David Herrmann:
140 #. memfd uses VM_NORESERVE so each page is accounted on first access.
141 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
142 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
143 #. those are accounted on "current" and "current->mm", that is, the
144 #. process doing the first page access.
145 #. type: Plain text
146 #. #-#-#-#-# opensuse-leap-16-1: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
147 #. David Herrmann:
148 #. memfd uses VM_NORESERVE so each page is accounted on first access.
149 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
150 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
151 #. those are accounted on "current" and "current->mm", that is, the
152 #. process doing the first page access.
153 #. type: Plain text
154 #. #-#-#-#-# opensuse-tumbleweed: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
155 #. David Herrmann:
156 #. memfd uses VM_NORESERVE so each page is accounted on first access.
157 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
158 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
159 #. those are accounted on "current" and "current->mm", that is, the
160 #. process doing the first page access.
161 #. type: Plain text
162 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
163 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
164 msgid ""
165 "B<memfd_create>() creates an anonymous file and returns a file descriptor "
166 "that refers to it. The file behaves like a regular file, and so can be "
167 "modified, truncated, memory-mapped, and so on. However, unlike a regular "
168 "file, it lives in RAM and has a volatile backing storage. Once all "
169 "references to the file are dropped, it is automatically released. Anonymous "
170 "memory is used for all backing pages of the file. Therefore, files created "
171 "by B<memfd_create>() have the same semantics as other anonymous memory "
172 "allocations such as those allocated using B<mmap>(2) with the "
173 "B<MAP_ANONYMOUS> flag."
174 msgstr ""
175 "تنشئ B<memfd_create>() ملفًا مجهولًا وتعيد واصف ملف يشير إليه. يتصرف الملف "
176 "كملف عادي، وبالتالي يمكن تعديله، واقتطاعه، وتعيينه في الذاكرة، وما إلى ذلك. "
177 "ومع ذلك، على عكس الملف العادي، فهو موجود في ذاكرة الوصول العشوائي (RAM) وله "
178 "تخزين دعم متطاير. بمجرد إسقاط جميع المراجع إلى الملف، يتم تحريره آليًا. "
179 "تُستخدم الذاكرة المجهولة لجميع صفحات الدعم للملف. لذلك، فإن الملفات التي تم "
180 "إنشاؤها بواسطة B<memfd_create>() لها نفس دلالات تخصيصات الذاكرة المجهولة "
181 "الأخرى مثل تلك المخصصة باستخدام B<mmap>(2) مع العلم B<MAP_ANONYMOUS>."
182
183 #. type: Plain text
184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
186 msgid ""
187 "The initial size of the file is set to 0. Following the call, the file size "
188 "should be set using B<ftruncate>(2). (Alternatively, the file may be "
189 "populated by calls to B<write>(2) or similar.)"
190 msgstr ""
191 "يُضبط الحجم الأولي للملف على 0. بعد الاستدعاء، يجب ضبط حجم الملف باستخدام "
192 "B<ftruncate>(2). (بدلاً من ذلك، يمكن ملء الملف باستدعاءات B<write>(2) أو ما "
193 "شابه ذلك.)"
194
195 #. type: Plain text
196 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
197 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
198 msgid ""
199 "The name supplied in I<name> is used as a filename and will be displayed as "
200 "the target of the corresponding symbolic link in the directory I</proc/self/"
201 "fd/>. The displayed name is always prefixed with I<memfd:> and serves only "
202 "for debugging purposes. Names do not affect the behavior of the file "
203 "descriptor, and as such multiple files can have the same name without any "
204 "side effects."
205 msgstr ""
206 "يُستخدم الاسم المقدم في I<name> كاسم ملف وسيُعرض كهدف للارتباط الرمزي المقابل "
207 "في الدليل I</proc/self/fd/>. يُسبق الاسم المعروض دائمًا بـ I<memfd:> ويخدم "
208 "أغراض التصحيح فقط. لا تؤثر الأسماء على سلوك واصف الملف، وبالتالي يمكن أن "
209 "تحمل ملفات متعددة نفس الاسم دون أي آثار جانبية."
210
211 #. type: Plain text
212 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
213 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
214 msgid ""
215 "The following values may be bitwise ORed in I<flags> to change the behavior "
216 "of B<memfd_create>():"
217 msgstr ""
218 "يمكن إجراء عملية OR بتية على القيم التالية في I<flags> لتغيير سلوك "
219 "B<memfd_create>():"
220
221 #. type: TP
222 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
223 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
224 #, no-wrap
225 msgid "B<MFD_CLOEXEC>"
226 msgstr "B<MFD_CLOEXEC>"
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 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
233 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
234 "may be useful."
235 msgstr ""
236 "اضبط علامة الإغلاق عند التنفيذ (B<FD_CLOEXEC>) على واصف الملف الجديد. انظر "
237 "وصف العلامة B<O_CLOEXEC> في B<open>(2) للأسباب التي تجعل هذا مفيدًا."
238
239 #. type: TP
240 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
241 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
242 #, no-wrap
243 msgid "B<MFD_ALLOW_SEALING>"
244 msgstr "B<MFD_ALLOW_SEALING>"
245
246 #. FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
247 #. Is it worth adding some text explaining this?
248 #. type: Plain text
249 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
250 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
251 msgid ""
252 "Allow sealing operations on this file. See the discussion of the "
253 "B<F_ADD_SEALS> and B<F_GET_SEALS> operations in B<fcntl>(2), and also NOTES, "
254 "below. The initial set of seals is empty. If this flag is not set, the "
255 "initial set of seals will be B<F_SEAL_SEAL>, meaning that no other seals can "
256 "be set on the file."
257 msgstr ""
258 "السماح بعمليات الختم على هذا الملف. انظر مناقشة عمليات B<F_ADD_SEALS> و "
259 "B<F_GET_SEALS> في B<fcntl>(2)، وأيضًا الملاحظات أدناه. المجموعة الأولية من "
260 "الأختام فارغة. إذا لم يتم تعيين هذا العلم، ستكون المجموعة الأولية من الأختام "
261 "هي B<F_SEAL_SEAL>، مما يعني أنه لا يمكن تعيين أختام أخرى على الملف."
262
263 #. type: TP
264 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
265 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
266 #, no-wrap
267 msgid "B<MFD_HUGETLB> (since Linux 4.14)"
268 msgstr "B<MFD_HUGETLB> (منذ Linux 4.14)"
269
270 #. commit 749df87bd7bee5a79cef073f5d032ddb2b211de8
271 #. commit 47b9012ecdc747f6936395265e677d41e11a31ff
272 #. type: Plain text
273 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
274 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
275 msgid ""
276 "The anonymous file will be created in the hugetlbfs filesystem using huge "
277 "pages. See the Linux kernel source file I<Documentation/admin-guide/mm/"
278 "hugetlbpage.rst> for more information about hugetlbfs. Specifying both "
279 "B<MFD_HUGETLB> and B<MFD_ALLOW_SEALING> in I<flags> is supported since Linux "
280 "4.16."
281 msgstr ""
282 "سيتم إنشاء الملف المجهول في نظام الملفات hugetlbfs باستخدام الصفحات الضخمة. "
283 "راجع ملف مصدر نواة Linux I<Documentation/admin-guide/mm/hugetlbpage.rst> "
284 "لمزيد من المعلومات حول hugetlbfs. يُدعم تحديد كل من B<MFD_HUGETLB> و "
285 "B<MFD_ALLOW_SEALING> في I<flags> منذ Linux 4.16."
286
287 #. type: TP
288 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
289 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
290 #, no-wrap
291 msgid "B<MFD_HUGE_2MB>"
292 msgstr "B<MFD_HUGE_2MB>"
293
294 #. type: TQ
295 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
296 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
297 #, no-wrap
298 msgid "B<MFD_HUGE_1GB>"
299 msgstr "B<MFD_HUGE_1GB>"
300
301 #. type: TQ
302 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
303 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
304 #, no-wrap
305 msgid "\\&.\\|.\\|."
306 msgstr "\\&.\\|.\\|."
307
308 #. type: Plain text
309 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
310 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
311 msgid ""
312 "Used in conjunction with B<MFD_HUGETLB> to select alternative hugetlb page "
313 "sizes (respectively, 2\\ MB, 1\\ GB, ...) on systems that support multiple "
314 "hugetlb page sizes. Definitions for known huge page sizes are included in "
315 "the header file I<E<lt>linux/memfd.hE<gt>.>"
316 msgstr ""
317 "يُستخدم بالتزامن مع B<MFD_HUGETLB> لتحديد أحجام صفحات hugetlb بديلة (على "
318 "التوالي، 2\\ ميجابايت، 1\\ جيجابايت، ...) على الأنظمة التي تدعم أحجام صفحات "
319 "hugetlb متعددة. تُضمن تعريفات أحجام الصفحات الضخمة المعروفة في ملف الرأس "
320 "I<E<lt>linux/memfd.hE<gt>.>"
321
322 #. type: Plain text
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 msgid ""
326 "For details on encoding huge page sizes not included in the header file, see "
327 "the discussion of the similarly named constants in B<mmap>(2)."
328 msgstr ""
329 "للحصول على تفاصيل حول ترميز أحجام الصفحات الضخمة غير المضمنة في ملف الرأس، "
330 "راجع مناقشة الثوابت المماثلة في التسمية في B<mmap>(2)."
331
332 #. type: Plain text
333 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
334 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
335 msgid "Unused bits in I<flags> must be 0."
336 msgstr "يجب أن تكون البتات غير المستخدمة في I<flags> صفرًا."
337
338 #. type: Plain text
339 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
340 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
341 msgid ""
342 "As its return value, B<memfd_create>() returns a new file descriptor that "
343 "can be used to refer to the file. This file descriptor is opened for both "
344 "reading and writing (B<O_RDWR>) and B<O_LARGEFILE> is set for the file "
345 "descriptor."
346 msgstr ""
347 "كقيمة إرجاع، تُعيد B<memfd_create>() واصف ملف جديد يمكن استخدامه للإشارة إلى "
348 "الملف. يُفتح واصف الملف هذا للقراءة والكتابة (B<O_RDWR>) ويُضبط B<O_LARGEFILE> "
349 "لواصف الملف."
350
351 #. type: Plain text
352 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
353 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
354 msgid ""
355 "With respect to B<fork>(2) and B<execve>(2), the usual semantics apply for "
356 "the file descriptor created by B<memfd_create>(). A copy of the file "
357 "descriptor is inherited by the child produced by B<fork>(2) and refers to "
358 "the same file. The file descriptor is preserved across B<execve>(2), unless "
359 "the close-on-exec flag has been set."
360 msgstr ""
361 "فيما يتعلق بـ B<fork>(2) و B<execve>(2)، تنطبق الدلالات المعتادة على واصف "
362 "الملف الذي تم إنشاؤه بواسطة B<memfd_create>(). ترث العملية التابعة الناتجة "
363 "عن B<fork>(2) نسخة من واصف الملف وتشير إلى نفس الملف. يُحتفظ بواصف الملف عبر "
364 "B<execve>(2)، ما لم يتم تعيين علم الإغلاق عند التنفيذ."
365
366 #. type: SH
367 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
368 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
369 #, no-wrap
370 msgid "RETURN VALUE"
371 msgstr "قيمة الإرجاع"
372
373 #. type: Plain text
374 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
375 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
376 msgid ""
377 "On success, B<memfd_create>() returns a new file descriptor. On error, -1 "
378 "is returned and I<errno> is set to indicate the error."
379 msgstr ""
380 "عند النجاح، تُعيد B<memfd_create>() واصف ملف جديد. عند الخطأ، تُعيد -1 ويُضبط "
381 "I<errno> للإشارة إلى الخطأ."
382
383 #. type: SH
384 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
385 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
386 #, no-wrap
387 msgid "ERRORS"
388 msgstr "الأخطاء"
389
390 #. type: TP
391 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
392 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
393 #, no-wrap
394 msgid "B<EFAULT>"
395 msgstr "B<EFAULT>"
396
397 #. type: Plain text
398 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
399 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
400 msgid "The address in I<name> points to invalid memory."
401 msgstr "يشير العنوان في I<name> إلى ذاكرة غير صالحة."
402
403 #. type: TP
404 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
405 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
406 #, no-wrap
407 msgid "B<EINVAL>"
408 msgstr "B<EINVAL>"
409
410 #. type: Plain text
411 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
412 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
413 msgid "I<flags> included unknown bits."
414 msgstr "تضمن I<flags> بتات غير معروفة."
415
416 #. NAME_MAX - strlen("memfd:")
417 #. type: Plain text
418 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
419 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
420 msgid ""
421 "I<name> was too long. (The limit is 249 bytes, excluding the terminating "
422 "null byte.)"
423 msgstr ""
424 "كان I<name> طويلًا جدًا. (الحد هو 249 بايت، باستثناء البايت الصفري الختامي.)"
425
426 #. type: Plain text
427 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
428 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
429 msgid ""
430 "Both B<MFD_HUGETLB> and B<MFD_ALLOW_SEALING> were specified in I<flags>."
431 msgstr "تم تحديد كل من B<MFD_HUGETLB> و B<MFD_ALLOW_SEALING> في I<flags>."
432
433 #. type: TP
434 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
435 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
436 #, no-wrap
437 msgid "B<EMFILE>"
438 msgstr "B<EMFILE>"
439
440 #. type: Plain text
441 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
442 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
443 msgid ""
444 "The per-process limit on the number of open file descriptors has been "
445 "reached."
446 msgstr "وُصل إلى الحد الأقصى لواصفات الملفات المفتوحة لكل عملية."
447
448 #. type: TP
449 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
450 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
451 #, no-wrap
452 msgid "B<ENFILE>"
453 msgstr "B<ENFILE>"
454
455 #. type: Plain text
456 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
457 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
458 msgid ""
459 "The system-wide limit on the total number of open files has been reached."
460 msgstr "وُصل إلى الحد الأقصى لإجمالي عدد الملفات المفتوحة على مستوى النظام."
461
462 #. type: TP
463 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
464 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
465 #, no-wrap
466 msgid "B<ENOMEM>"
467 msgstr "B<ENOMEM>"
468
469 #. type: Plain text
470 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
471 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
472 msgid "There was insufficient memory to create a new anonymous file."
473 msgstr "لم تكن الذاكرة كافية لإنشاء ملف مجهول جديد."
474
475 #. type: TP
476 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
477 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
478 #, no-wrap
479 msgid "B<EPERM>"
480 msgstr "B<EPERM>"
481
482 #. type: Plain text
483 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
484 #: opensuse-tumbleweed
485 msgid ""
486 "The B<MFD_HUGETLB> flag was specified, but the caller was not privileged "
487 "(did not have the B<CAP_IPC_LOCK> capability) and is not a member of the "
488 "I<hugetlb_shm_group> group; see the description of I</proc/sys/vm/"
489 "hugetlb_shm_group> in B<proc_sys_vm>(5)."
490 msgstr ""
491 "تم تحديد العلم B<MFD_HUGETLB>، لكن المتصل لم يكن متميزًا (لم يكن لديه القدرة "
492 "B<CAP_IPC_LOCK>) وليس عضوًا في مجموعة I<hugetlb_shm_group>؛ راجع وصف I</proc/"
493 "sys/vm/hugetlb_shm_group> في B<proc_sys_vm>(5)."
494
495 #. type: SH
496 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
497 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
498 #, no-wrap
499 msgid "STANDARDS"
500 msgstr "المعايير"
501
502 #. type: Plain text
503 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
504 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
505 msgid "Linux."
506 msgstr "لينكس."
507
508 #. type: SH
509 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
510 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
511 #, no-wrap
512 msgid "HISTORY"
513 msgstr "التاريخ"
514
515 #. type: Plain text
516 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
517 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
518 msgid "Linux 3.17, glibc 2.27."
519 msgstr "Linux 3.17، glibc 2.27."
520
521 #. type: SH
522 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
523 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
524 #, no-wrap
525 msgid "NOTES"
526 msgstr "ملاحظات"
527
528 #. See also http://lwn.net/Articles/593918/
529 #. and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
530 #. type: Plain text
531 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
532 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
533 msgid ""
534 "The B<memfd_create>() system call provides a simple alternative to manually "
535 "mounting a B<tmpfs>(5) filesystem and creating and opening a file in that "
536 "filesystem. The primary purpose of B<memfd_create>() is to create files "
537 "and associated file descriptors that are used with the file-sealing APIs "
538 "provided by B<fcntl>(2)."
539 msgstr ""
540 "يوفر استدعاء النظام B<memfd_create>() بديلاً بسيطًا لتركيب نظام الملفات "
541 "B<tmpfs>(5) يدويًا وإنشاء وفتح ملف في ذلك النظام. الغرض الرئيسي من "
542 "B<memfd_create>() هو إنشاء ملفات وواصفات الملفات المرتبطة بها المستخدمة مع "
543 "واجهات برمجة تطبيقات ختم الملفات المقدمة بواسطة B<fcntl>(2)."
544
545 #. type: Plain text
546 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
547 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
548 msgid ""
549 "The B<memfd_create>() system call also has uses without file sealing (which "
550 "is why file-sealing is disabled, unless explicitly requested with the "
551 "B<MFD_ALLOW_SEALING> flag). In particular, it can be used as an alternative "
552 "to creating files in I<tmp> or as an alternative to using the B<open>(2) "
553 "B<O_TMPFILE> in cases where there is no intention to actually link the "
554 "resulting file into the filesystem."
555 msgstr ""
556 "للاستدعاء النظام B<memfd_create>() استخدامات أيضًا بدون ختم الملف (ولهذا "
557 "السبب يتم تعطيل ختم الملف، ما لم يُطلب صراحةً باستخدام العلم "
558 "B<MFD_ALLOW_SEALING>). على وجه الخصوص، يمكن استخدامه كبديل لإنشاء ملفات في "
559 "I<tmp> أو كبديل لاستخدام B<open>(2) B<O_TMPFILE> في الحالات التي لا توجد "
560 "فيها نية لربط الملف الناتج فعليًا بنظام الملفات."
561
562 #. type: SS
563 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
564 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
565 #, no-wrap
566 msgid "File sealing"
567 msgstr "ختم الملف"
568
569 #. type: Plain text
570 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
571 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
572 msgid ""
573 "In the absence of file sealing, processes that communicate via shared memory "
574 "must either trust each other, or take measures to deal with the possibility "
575 "that an untrusted peer may manipulate the shared memory region in "
576 "problematic ways. For example, an untrusted peer might modify the contents "
577 "of the shared memory at any time, or shrink the shared memory region. The "
578 "former possibility leaves the local process vulnerable to time-of-check-to-"
579 "time-of-use race conditions (typically dealt with by copying data from the "
580 "shared memory region before checking and using it). The latter possibility "
581 "leaves the local process vulnerable to B<SIGBUS> signals when an attempt is "
582 "made to access a now-nonexistent location in the shared memory region. "
583 "(Dealing with this possibility necessitates the use of a handler for the "
584 "B<SIGBUS> signal.)"
585 msgstr ""
586 "في غياب ختم الملف، يجب على العمليات التي تتواصل عبر الذاكرة المشتركة إما أن "
587 "تثق ببعضها البعض، أو تتخذ إجراءات للتعامل مع احتمال أن يقوم نظير غير موثوق "
588 "بمعالجة منطقة الذاكرة المشتركة بطرق إشكالية. على سبيل المثال، قد يقوم نظير "
589 "غير موثوق بتعديل محتويات الذاكرة المشتركة في أي وقت، أو تقليص منطقة الذاكرة "
590 "المشتركة. الاحتمال الأول يجعل العملية المحلية عرضة لحالات سباق وقت الفحص إلى "
591 "وقت الاستخدام (يتم التعامل معها عادةً عن طريق نسخ البيانات من منطقة الذاكرة "
592 "المشتركة قبل فحصها واستخدامها). الاحتمال الثاني يجعل العملية المحلية عرضة "
593 "لإشارات B<SIGBUS> عند محاولة الوصول إلى موقع غير موجود الآن في منطقة الذاكرة "
594 "المشتركة. (يتطلب التعامل مع هذا الاحتمال استخدام معالج لإشارة B<SIGBUS>.)"
595
596 #. type: Plain text
597 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
598 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
599 msgid ""
600 "Dealing with untrusted peers imposes extra complexity on code that employs "
601 "shared memory. Memory sealing enables that extra complexity to be "
602 "eliminated, by allowing a process to operate secure in the knowledge that "
603 "its peer can't modify the shared memory in an undesired fashion."
604 msgstr ""
605 "يفرض التعامل مع النظائر غير الموثوقة تعقيدًا إضافيًا على الكود الذي يستخدم "
606 "الذاكرة المشتركة. يتيح ختم الذاكرة إزالة هذا التعقيد الإضافي، من خلال السماح "
607 "لعملية بالعمل بأمان مع العلم أن نظيرها لا يمكنه تعديل الذاكرة المشتركة "
608 "بطريقة غير مرغوب فيها."
609
610 #. type: Plain text
611 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
612 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
613 msgid "An example of the usage of the sealing mechanism is as follows:"
614 msgstr "مثال على استخدام آلية الختم كما يلي:"
615
616 #. type: IP
617 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
618 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
619 #, no-wrap
620 msgid "(1)"
621 msgstr "(1)"
622
623 #. type: Plain text
624 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
625 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
626 msgid ""
627 "The first process creates a B<tmpfs>(5) file using B<memfd_create>(). The "
628 "call yields a file descriptor used in subsequent steps."
629 msgstr ""
630 "تنشئ العملية الأولى ملف B<tmpfs>(5) باستخدام B<memfd_create>(). تُرجع "
631 "الاستدعاء واصف ملف يُستخدم في الخطوات اللاحقة."
632
633 #. type: IP
634 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
635 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
636 #, no-wrap
637 msgid "(2)"
638 msgstr "(2)"
639
640 #. type: Plain text
641 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
642 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
643 msgid ""
644 "The first process sizes the file created in the previous step using "
645 "B<ftruncate>(2), maps it using B<mmap>(2), and populates the shared memory "
646 "with the desired data."
647 msgstr ""
648 "تحدد العملية الأولى حجم الملف الذي أُنشئ في الخطوة السابقة باستخدام "
649 "B<ftruncate>(2)، وتُخططه باستخدام B<mmap>(2)، وتملأ الذاكرة المشتركة "
650 "بالبيانات المطلوبة."
651
652 #. type: IP
653 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
654 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
655 #, no-wrap
656 msgid "(3)"
657 msgstr "(3)"
658
659 #. type: Plain text
660 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
661 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
662 msgid ""
663 "The first process uses the B<fcntl>(2) B<F_ADD_SEALS> operation to place "
664 "one or more seals on the file, in order to restrict further modifications on "
665 "the file. (If placing the seal B<F_SEAL_WRITE>, then it will be necessary "
666 "to first unmap the shared writable mapping created in the previous step. "
667 "Otherwise, behavior similar to B<F_SEAL_WRITE> can be achieved by using "
668 "B<F_SEAL_FUTURE_WRITE>, which will prevent future writes via B<mmap>(2) and "
669 "B<write>(2) from succeeding while keeping existing shared writable "
670 "mappings)."
671 msgstr ""
672 "تستخدم العملية الأولى عملية B<fcntl>(2) B<F_ADD_SEALS> لوضع ختم واحد أو أكثر "
673 "على الملف، لتقييد التعديلات الإضافية على الملف. (إذا تم وضع الختم "
674 "B<F_SEAL_WRITE>، فسيكون من الضروري أولاً إلغاء تخطيط التعيين المشترك القابل "
675 "للكتابة الذي أُنشئ في الخطوة السابقة. وإلا، يمكن تحقيق سلوك مشابه لـ "
676 "B<F_SEAL_WRITE> باستخدام B<F_SEAL_FUTURE_WRITE>، الذي يمنع عمليات الكتابة "
677 "المستقبلية عبر B<mmap>(2) و B<write>(2) من النجاح مع الاحتفاظ بالتعيينات "
678 "المشتركة القابلة للكتابة الحالية)."
679
680 #. type: IP
681 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
682 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
683 #, no-wrap
684 msgid "(4)"
685 msgstr "(4)"
686
687 #. type: Plain text
688 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
689 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
690 msgid ""
691 "A second process obtains a file descriptor for the B<tmpfs>(5) file and "
692 "maps it. Among the possible ways in which this could happen are the "
693 "following:"
694 msgstr ""
695 "تحصل عملية ثانية على واصف ملف لملف B<tmpfs>(5) وتُخططه. من بين الطرق الممكنة "
696 "لحدوث ذلك ما يلي:"
697
698 #. type: IP
699 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
700 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
701 #, no-wrap
702 msgid "\\[bu]"
703 msgstr "\\[bu]"
704
705 #. type: Plain text
706 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
707 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
708 msgid ""
709 "The process that called B<memfd_create>() could transfer the resulting file "
710 "descriptor to the second process via a UNIX domain socket (see B<unix>(7) "
711 "and B<cmsg>(3)). The second process then maps the file using B<mmap>(2)."
712 msgstr ""
713 "يمكن للعملية التي استدعت B<memfd_create>() نقل واصف الملف الناتج إلى العملية "
714 "الثانية عبر مقبس نطاق UNIX (انظر B<unix>(7) و B<cmsg>(3)). ثم تُخطط العملية "
715 "الثانية الملف باستخدام B<mmap>(2)."
716
717 #. type: Plain text
718 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
719 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
720 msgid ""
721 "The second process is created via B<fork>(2) and thus automatically "
722 "inherits the file descriptor and mapping. (Note that in this case and the "
723 "next, there is a natural trust relationship between the two processes, since "
724 "they are running under the same user ID. Therefore, file sealing would not "
725 "normally be necessary.)"
726 msgstr ""
727 "تُنشأ العملية الثانية عبر B<fork>(2) وبالتالي ترث آلياً واصف الملف والتعيين. "
728 "(لاحظ أنه في هذه الحالة والحالة التالية، توجد علاقة ثقة طبيعية بين "
729 "العمليتين، حيث تعملان تحت نفس معرف المستخدم. لذلك، لن يكون ختم الملف ضرورياً "
730 "عادةً.)"
731
732 #. type: Plain text
733 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
734 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
735 msgid ""
736 "The second process opens the file I</proc/>pidI</fd/>fd, where "
737 "I<E<lt>pidE<gt>> is the PID of the first process (the one that called "
738 "B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file descriptor "
739 "returned by the call to B<memfd_create>() in that process. The second "
740 "process then maps the file using B<mmap>(2)."
741 msgstr ""
742 "تفتح العملية الثانية الملف I</proc/>pidI</fd/>fd، حيث I<E<lt>pidE<gt>> هو "
743 "PID العملية الأولى (التي استدعت B<memfd_create>())، و I<E<lt>fdE<gt>> هو رقم "
744 "واصف الملف الذي أرجعته استدعاء B<memfd_create>() في تلك العملية. ثم تُخطط "
745 "العملية الثانية الملف باستخدام B<mmap>(2)."
746
747 #. type: IP
748 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
749 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
750 #, no-wrap
751 msgid "(5)"
752 msgstr "(5)"
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 "The second process uses the B<fcntl>(2) B<F_GET_SEALS> operation to "
759 "retrieve the bit mask of seals that has been applied to the file. This bit "
760 "mask can be inspected in order to determine what kinds of restrictions have "
761 "been placed on file modifications. If desired, the second process can apply "
762 "further seals to impose additional restrictions (so long as the "
763 "B<F_SEAL_SEAL> seal has not yet been applied)."
764 msgstr ""
765 "تستخدم العملية الثانية عملية B<fcntl>(2) B<F_GET_SEALS> لاسترجاع قناع البت "
766 "للأختام التي طُبقت على الملف. يمكن فحص قناع البت هذا لتحديد أنواع القيود التي "
767 "فُرضت على تعديلات الملف. إذا رغبت، يمكن للعملية الثانية تطبيق أختام إضافية "
768 "لفرض قيود إضافية (طالما لم يُطبق ختم B<F_SEAL_SEAL> بعد)."
769
770 #. type: SH
771 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
772 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
773 #, no-wrap
774 msgid "EXAMPLES"
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 "Below are shown two example programs that demonstrate the use of "
782 "B<memfd_create>() and the file sealing API."
783 msgstr ""
784 "فيما يلي برنامجان مثالان يوضحان استخدام B<memfd_create>() وواجهة برمجة "
785 "تطبيقات ختم الملف."
786
787 #. type: Plain text
788 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
789 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
790 msgid ""
791 "The first program, I<t_memfd_create.c>, creates a B<tmpfs>(5) file using "
792 "B<memfd_create>(), sets a size for the file, maps it into memory, and "
793 "optionally places some seals on the file. The program accepts up to three "
794 "command-line arguments, of which the first two are required. The first "
795 "argument is the name to associate with the file, the second argument is the "
796 "size to be set for the file, and the optional third argument is a string of "
797 "characters that specify seals to be set on the file."
798 msgstr ""
799 "البرنامج الأول، I<t_memfd_create.c>، ينشئ ملف B<tmpfs>(5) باستخدام "
800 "B<memfd_create>()، ويحدد حجماً للملف، ويُخططه في الذاكرة، ويضع اختيارياً بعض "
801 "الأختام على الملف. يقبل البرنامج ما يصل إلى ثلاث وسائط لسطر الأوامر، أول "
802 "اثنتين منها مطلوبتان. الوسيطة الأولى هي الاسم المرتبط بالملف، والوسيطة "
803 "الثانية هي الحجم الذي سيُحدد للملف، والوسيطة الثالثة الاختيارية هي سلسلة من "
804 "الأحرف تحدد الأختام التي ستوضع على الملف."
805
806 #. type: Plain text
807 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
808 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
809 msgid ""
810 "The second program, I<t_get_seals.c>, can be used to open an existing file "
811 "that was created via B<memfd_create>() and inspect the set of seals that "
812 "have been applied to that file."
813 msgstr ""
814 "البرنامج الثاني، I<t_get_seals.c>، يمكن استخدامه لفتح ملف موجود أُنشئ عبر "
815 "B<memfd_create>() وفحص مجموعة الأختام التي طُبقت على ذلك الملف."
816
817 #. type: Plain text
818 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
819 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
820 msgid ""
821 "The following shell session demonstrates the use of these programs. First "
822 "we create a B<tmpfs>(5) file and set some seals on it:"
823 msgstr ""
824 "توضح جلسة الصدفة التالية استخدام هذه البرامج. أولاً ننشئ ملف B<tmpfs>(5) ونضع "
825 "بعض الأختام عليه:"
826
827 #. type: Plain text
828 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
829 #: opensuse-tumbleweed
830 #, no-wrap
831 msgid ""
832 "$B< ./t_memfd_create my_memfd_file 4096 sw &>\n"
833 "[1] 11775\n"
834 "PID: 11775;\\& fd: 3;\\& /proc/11775/fd/3\n"
835 msgstr ""
836 "$B< ./t_memfd_create my_memfd_file 4096 sw &>\n"
837 "[1] 11775\n"
838 "PID: 11775;\\& fd: 3;\\& /proc/11775/fd/3\n"
839
840 #. type: Plain text
841 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
842 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
843 msgid ""
844 "At this point, the I<t_memfd_create> program continues to run in the "
845 "background. From another program, we can obtain a file descriptor for the "
846 "file created by B<memfd_create>() by opening the I</proc/>pidI</fd> file "
847 "that corresponds to the file descriptor opened by B<memfd_create>(). Using "
848 "that pathname, we inspect the content of the I</proc/>pidI</fd> symbolic "
849 "link, and use our I<t_get_seals> program to view the seals that have been "
850 "placed on the file:"
851 msgstr ""
852 "في هذه المرحلة، يستمر برنامج I<t_memfd_create> في العمل في الخلفية. من "
853 "برنامج آخر، يمكننا الحصول على واصف ملف للملف الذي أنشأه B<memfd_create>() "
854 "بفتح ملف I</proc/>pidI</fd> الذي يتوافق مع واصف الملف الذي فتحه "
855 "B<memfd_create>(). باستخدام اسم المسار هذا، نفحص محتوى الرابط الرمزي I</proc/"
856 ">pidI</fd>، ونستخدم برنامج I<t_get_seals> لعرض الأختام التي وُضعت على الملف:"
857
858 #. type: Plain text
859 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
860 #: opensuse-tumbleweed
861 #, no-wrap
862 msgid ""
863 "$B< readlink /proc/11775/fd/3>;\n"
864 "/memfd:my_memfd_file (deleted)\n"
865 "$B< ./t_get_seals /proc/11775/fd/3>;\n"
866 "Existing seals: WRITE SHRINK\n"
867 msgstr ""
868 "$B< readlink /proc/11775/fd/3>;\n"
869 "/memfd:my_memfd_file (deleted)\n"
870 "$B< ./t_get_seals /proc/11775/fd/3>;\n"
871 "Existing seals: WRITE SHRINK\n"
872
873 #. type: SS
874 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
875 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
876 #, no-wrap
877 msgid "Program source: t_memfd_create.c"
878 msgstr "مصدر البرنامج: t_memfd_create.c"
879
880 #. type: Plain text
881 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
882 #: opensuse-tumbleweed
883 #, no-wrap
884 msgid ""
885 "#define _GNU_SOURCE\n"
886 "#include E<lt>err.hE<gt>\n"
887 "#include E<lt>fcntl.hE<gt>\n"
888 "#include E<lt>stdint.hE<gt>\n"
889 "#include E<lt>stdio.hE<gt>\n"
890 "#include E<lt>stdlib.hE<gt>\n"
891 "#include E<lt>string.hE<gt>\n"
892 "#include E<lt>sys/mman.hE<gt>\n"
893 "#include E<lt>sys/types.hE<gt>\n"
894 "#include E<lt>unistd.hE<gt>\n"
895 "\\&\n"
896 "int\n"
897 "main(int argc, char *argv[])\n"
898 "{\n"
899 " int fd;\n"
900 " char *name, *seals_arg;\n"
901 " ssize_t size;\n"
902 " unsigned int seals;\n"
903 "\\&\n"
904 " if (argc E<lt> 3) {\n"
905 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
906 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] can contain any of the \"\n"
907 " \"following characters:\\[rs]n\");\n"
908 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
909 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
910 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
911 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
912 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
913 " exit(EXIT_FAILURE);\n"
914 " }\n"
915 "\\&\n"
916 " name = argv[1];\n"
917 " size = atoi(argv[2]);\n"
918 " seals_arg = argv[3];\n"
919 "\\&\n"
920 " /* Create an anonymous file in tmpfs; allow seals to be\n"
921 " placed on the file. */\n"
922 "\\&\n"
923 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
924 " if (fd == -1)\n"
925 " err(EXIT_FAILURE, \"memfd_create\");\n"
926 "\\&\n"
927 " /* Size the file as specified on the command line. */\n"
928 "\\&\n"
929 " if (ftruncate(fd, size) == -1)\n"
930 " err(EXIT_FAILURE, \"truncate\");\n"
931 "\\&\n"
932 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
933 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
934 "\\&\n"
935 " /* Code to map the file and populate the mapping with data\n"
936 " omitted. */\n"
937 "\\&\n"
938 " /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
939 " seals on the file. */\n"
940 "\\&\n"
941 " if (seals_arg != NULL) {\n"
942 " seals = 0;\n"
943 "\\&\n"
944 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
945 " seals |= F_SEAL_GROW;\n"
946 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
947 " seals |= F_SEAL_SHRINK;\n"
948 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
949 " seals |= F_SEAL_WRITE;\n"
950 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
951 " seals |= F_SEAL_FUTURE_WRITE;\n"
952 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
953 " seals |= F_SEAL_SEAL;\n"
954 "\\&\n"
955 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
956 " err(EXIT_FAILURE, \"fcntl\");\n"
957 " }\n"
958 "\\&\n"
959 " /* Keep running, so that the file created by memfd_create()\n"
960 " continues to exist. */\n"
961 "\\&\n"
962 " pause();\n"
963 "\\&\n"
964 " exit(EXIT_SUCCESS);\n"
965 "}\n"
966 msgstr ""
967 "#define _GNU_SOURCE\n"
968 "#include E<lt>err.hE<gt>\n"
969 "#include E<lt>fcntl.hE<gt>\n"
970 "#include E<lt>stdint.hE<gt>\n"
971 "#include E<lt>stdio.hE<gt>\n"
972 "#include E<lt>stdlib.hE<gt>\n"
973 "#include E<lt>string.hE<gt>\n"
974 "#include E<lt>sys/mman.hE<gt>\n"
975 "#include E<lt>sys/types.hE<gt>\n"
976 "#include E<lt>unistd.hE<gt>\n"
977 "\\&\n"
978 "int\n"
979 "main(int argc, char *argv[])\n"
980 "{\n"
981 " int fd;\n"
982 " char *name, *seals_arg;\n"
983 " ssize_t size;\n"
984 " unsigned int seals;\n"
985 "\\&\n"
986 " if (argc E<lt> 3) {\n"
987 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
988 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] can contain any of the \"\n"
989 " \"following characters:\\[rs]n\");\n"
990 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
991 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
992 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
993 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
994 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
995 " exit(EXIT_FAILURE);\n"
996 " }\n"
997 "\\&\n"
998 " name = argv[1];\n"
999 " size = atoi(argv[2]);\n"
1000 " seals_arg = argv[3];\n"
1001 "\\&\n"
1002 " /* Create an anonymous file in tmpfs; allow seals to be\n"
1003 " placed on the file. */\n"
1004 "\\&\n"
1005 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
1006 " if (fd == -1)\n"
1007 " err(EXIT_FAILURE, \"memfd_create\");\n"
1008 "\\&\n"
1009 " /* Size the file as specified on the command line. */\n"
1010 "\\&\n"
1011 " if (ftruncate(fd, size) == -1)\n"
1012 " err(EXIT_FAILURE, \"truncate\");\n"
1013 "\\&\n"
1014 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1015 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1016 "\\&\n"
1017 " /* Code to map the file and populate the mapping with data\n"
1018 " omitted. */\n"
1019 "\\&\n"
1020 " /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
1021 " seals on the file. */\n"
1022 "\\&\n"
1023 " if (seals_arg != NULL) {\n"
1024 " seals = 0;\n"
1025 "\\&\n"
1026 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1027 " seals |= F_SEAL_GROW;\n"
1028 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1029 " seals |= F_SEAL_SHRINK;\n"
1030 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1031 " seals |= F_SEAL_WRITE;\n"
1032 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1033 " seals |= F_SEAL_FUTURE_WRITE;\n"
1034 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1035 " seals |= F_SEAL_SEAL;\n"
1036 "\\&\n"
1037 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1038 " err(EXIT_FAILURE, \"fcntl\");\n"
1039 " }\n"
1040 "\\&\n"
1041 " /* Keep running, so that the file created by memfd_create()\n"
1042 " continues to exist. */\n"
1043 "\\&\n"
1044 " pause();\n"
1045 "\\&\n"
1046 " exit(EXIT_SUCCESS);\n"
1047 "}\n"
1048
1049 #. SRC END
1050 #. type: SS
1051 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1052 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1053 #, no-wrap
1054 msgid "Program source: t_get_seals.c"
1055 msgstr "مصدر البرنامج: t_get_seals.c"
1056
1057 #. type: Plain text
1058 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1059 #: opensuse-tumbleweed
1060 #, no-wrap
1061 msgid ""
1062 "#define _GNU_SOURCE\n"
1063 "#include E<lt>err.hE<gt>\n"
1064 "#include E<lt>fcntl.hE<gt>\n"
1065 "#include E<lt>stdio.hE<gt>\n"
1066 "#include E<lt>stdlib.hE<gt>\n"
1067 "\\&\n"
1068 "int\n"
1069 "main(int argc, char *argv[])\n"
1070 "{\n"
1071 " int fd;\n"
1072 " unsigned int seals;\n"
1073 "\\&\n"
1074 " if (argc != 2) {\n"
1075 " fprintf(stderr, \"%s /proc/PID/fd/FD\\[rs]n\", argv[0]);\n"
1076 " exit(EXIT_FAILURE);\n"
1077 " }\n"
1078 "\\&\n"
1079 " fd = open(argv[1], O_RDWR);\n"
1080 " if (fd == -1)\n"
1081 " err(EXIT_FAILURE, \"open\");\n"
1082 "\\&\n"
1083 " seals = fcntl(fd, F_GET_SEALS);\n"
1084 " if (seals == -1)\n"
1085 " err(EXIT_FAILURE, \"fcntl\");\n"
1086 "\\&\n"
1087 " printf(\"Existing seals:\");\n"
1088 " if (seals & F_SEAL_SEAL)\n"
1089 " printf(\" SEAL\");\n"
1090 " if (seals & F_SEAL_GROW)\n"
1091 " printf(\" GROW\");\n"
1092 " if (seals & F_SEAL_WRITE)\n"
1093 " printf(\" WRITE\");\n"
1094 " if (seals & F_SEAL_FUTURE_WRITE)\n"
1095 " printf(\" FUTURE_WRITE\");\n"
1096 " if (seals & F_SEAL_SHRINK)\n"
1097 " printf(\" SHRINK\");\n"
1098 " printf(\"\\[rs]n\");\n"
1099 "\\&\n"
1100 " /* Code to map the file and access the contents of the\n"
1101 " resulting mapping omitted. */\n"
1102 "\\&\n"
1103 " exit(EXIT_SUCCESS);\n"
1104 "}\n"
1105 msgstr ""
1106 "#define _GNU_SOURCE\n"
1107 "#include E<lt>err.hE<gt>\n"
1108 "#include E<lt>fcntl.hE<gt>\n"
1109 "#include E<lt>stdio.hE<gt>\n"
1110 "#include E<lt>stdlib.hE<gt>\n"
1111 "\\&\n"
1112 "int\n"
1113 "main(int argc, char *argv[])\n"
1114 "{\n"
1115 " int fd;\n"
1116 " unsigned int seals;\n"
1117 "\\&\n"
1118 " if (argc != 2) {\n"
1119 " fprintf(stderr, \"%s /proc/PID/fd/FD\\[rs]n\", argv[0]);\n"
1120 " exit(EXIT_FAILURE);\n"
1121 " }\n"
1122 "\\&\n"
1123 " fd = open(argv[1], O_RDWR);\n"
1124 " if (fd == -1)\n"
1125 " err(EXIT_FAILURE, \"open\");\n"
1126 "\\&\n"
1127 " seals = fcntl(fd, F_GET_SEALS);\n"
1128 " if (seals == -1)\n"
1129 " err(EXIT_FAILURE, \"fcntl\");\n"
1130 "\\&\n"
1131 " printf(\"Existing seals:\");\n"
1132 " if (seals & F_SEAL_SEAL)\n"
1133 " printf(\" SEAL\");\n"
1134 " if (seals & F_SEAL_GROW)\n"
1135 " printf(\" GROW\");\n"
1136 " if (seals & F_SEAL_WRITE)\n"
1137 " printf(\" WRITE\");\n"
1138 " if (seals & F_SEAL_FUTURE_WRITE)\n"
1139 " printf(\" FUTURE_WRITE\");\n"
1140 " if (seals & F_SEAL_SHRINK)\n"
1141 " printf(\" SHRINK\");\n"
1142 " printf(\"\\[rs]n\");\n"
1143 "\\&\n"
1144 " /* Code to map the file and access the contents of the\n"
1145 " resulting mapping omitted. */\n"
1146 "\\&\n"
1147 " exit(EXIT_SUCCESS);\n"
1148 "}\n"
1149
1150 #. SRC END
1151 #. type: SH
1152 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1153 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1154 #, no-wrap
1155 msgid "SEE ALSO"
1156 msgstr "انظر أيضًا"
1157
1158 #. type: Plain text
1159 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1160 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1161 msgid ""
1162 "B<fcntl>(2), B<ftruncate>(2), B<memfd_secret>(2), B<mmap>(2), B<shmget>(2), "
1163 "B<shm_open>(3)"
1164 msgstr ""
1165 "B<fcntl>(2), B<ftruncate>(2), B<memfd_secret>(2), B<mmap>(2), B<shmget>(2), "
1166 "B<shm_open>(3)"
1167
1168 #. type: TH
1169 #: debian-trixie
1170 #, no-wrap
1171 msgid "2024-06-15"
1172 msgstr "15 يونيو 2024"
1173
1174 #. type: TH
1175 #: debian-trixie
1176 #, no-wrap
1177 msgid "Linux man-pages 6.9.1"
1178 msgstr "صفحات دليل لينكس 6.9.1"
1179
1180 #. type: Plain text
1181 #: debian-trixie
1182 msgid "Standard C library (I<libc>, I<-lc>)"
1183 msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)"
1184
1185 #. type: Plain text
1186 #: debian-trixie fedora-44 fedora-rawhide
1187 msgid ""
1188 "The B<MFD_HUGETLB> flag was specified, but the caller was not privileged "
1189 "(did not have the B<CAP_IPC_LOCK> capability) and is not a member of the "
1190 "I<sysctl_hugetlb_shm_group> group; see the description of I</proc/sys/vm/"
1191 "sysctl_hugetlb_shm_group> in B<proc>(5)."
1192 msgstr ""
1193 "تم تحديد العلم B<MFD_HUGETLB>، لكن المتصل لم يكن متميزًا (لم يكن لديه القدرة "
1194 "B<CAP_IPC_LOCK>) وليس عضوًا في مجموعة I<sysctl_hugetlb_shm_group>؛ راجع وصف "
1195 "I</proc/sys/vm/sysctl_hugetlb_shm_group> في B<proc>(5)."
1196
1197 #. type: Plain text
1198 #: debian-trixie fedora-44 fedora-rawhide
1199 #, no-wrap
1200 msgid ""
1201 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
1202 "[1] 11775\n"
1203 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
1204 msgstr ""
1205 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
1206 "[1] 11775\n"
1207 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
1208
1209 #. type: Plain text
1210 #: debian-trixie fedora-44 fedora-rawhide
1211 #, no-wrap
1212 msgid ""
1213 "$ B<readlink /proc/11775/fd/3>\n"
1214 "/memfd:my_memfd_file (deleted)\n"
1215 "$ B<./t_get_seals /proc/11775/fd/3>\n"
1216 "Existing seals: WRITE SHRINK\n"
1217 msgstr ""
1218 "$ B<readlink /proc/11775/fd/3>\n"
1219 "/memfd:my_memfd_file (deleted)\n"
1220 "$ B<./t_get_seals /proc/11775/fd/3>\n"
1221 "Existing seals: WRITE SHRINK\n"
1222
1223 #. type: Plain text
1224 #: debian-trixie
1225 #, no-wrap
1226 msgid ""
1227 "#define _GNU_SOURCE\n"
1228 "#include E<lt>err.hE<gt>\n"
1229 "#include E<lt>fcntl.hE<gt>\n"
1230 "#include E<lt>stdint.hE<gt>\n"
1231 "#include E<lt>stdio.hE<gt>\n"
1232 "#include E<lt>stdlib.hE<gt>\n"
1233 "#include E<lt>string.hE<gt>\n"
1234 "#include E<lt>sys/mman.hE<gt>\n"
1235 "#include E<lt>sys/types.hE<gt>\n"
1236 "#include E<lt>unistd.hE<gt>\n"
1237 "\\&\n"
1238 "int\n"
1239 "main(int argc, char *argv[])\n"
1240 "{\n"
1241 " int fd;\n"
1242 " char *name, *seals_arg;\n"
1243 " ssize_t len;\n"
1244 " unsigned int seals;\n"
1245 "\\&\n"
1246 " if (argc E<lt> 3) {\n"
1247 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
1248 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] can contain any of the \"\n"
1249 " \"following characters:\\[rs]n\");\n"
1250 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
1251 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
1252 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
1253 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
1254 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
1255 " exit(EXIT_FAILURE);\n"
1256 " }\n"
1257 "\\&\n"
1258 " name = argv[1];\n"
1259 " len = atoi(argv[2]);\n"
1260 " seals_arg = argv[3];\n"
1261 "\\&\n"
1262 " /* Create an anonymous file in tmpfs; allow seals to be\n"
1263 " placed on the file. */\n"
1264 "\\&\n"
1265 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
1266 " if (fd == -1)\n"
1267 " err(EXIT_FAILURE, \"memfd_create\");\n"
1268 "\\&\n"
1269 " /* Size the file as specified on the command line. */\n"
1270 "\\&\n"
1271 " if (ftruncate(fd, len) == -1)\n"
1272 " err(EXIT_FAILURE, \"truncate\");\n"
1273 "\\&\n"
1274 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1275 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1276 "\\&\n"
1277 " /* Code to map the file and populate the mapping with data\n"
1278 " omitted. */\n"
1279 "\\&\n"
1280 " /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
1281 " seals on the file. */\n"
1282 "\\&\n"
1283 " if (seals_arg != NULL) {\n"
1284 " seals = 0;\n"
1285 "\\&\n"
1286 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1287 " seals |= F_SEAL_GROW;\n"
1288 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1289 " seals |= F_SEAL_SHRINK;\n"
1290 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1291 " seals |= F_SEAL_WRITE;\n"
1292 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1293 " seals |= F_SEAL_FUTURE_WRITE;\n"
1294 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1295 " seals |= F_SEAL_SEAL;\n"
1296 "\\&\n"
1297 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1298 " err(EXIT_FAILURE, \"fcntl\");\n"
1299 " }\n"
1300 "\\&\n"
1301 " /* Keep running, so that the file created by memfd_create()\n"
1302 " continues to exist. */\n"
1303 "\\&\n"
1304 " pause();\n"
1305 "\\&\n"
1306 " exit(EXIT_SUCCESS);\n"
1307 "}\n"
1308 msgstr ""
1309 "#define _GNU_SOURCE\n"
1310 "#include E<lt>err.hE<gt>\n"
1311 "#include E<lt>fcntl.hE<gt>\n"
1312 "#include E<lt>stdint.hE<gt>\n"
1313 "#include E<lt>stdio.hE<gt>\n"
1314 "#include E<lt>stdlib.hE<gt>\n"
1315 "#include E<lt>string.hE<gt>\n"
1316 "#include E<lt>sys/mman.hE<gt>\n"
1317 "#include E<lt>sys/types.hE<gt>\n"
1318 "#include E<lt>unistd.hE<gt>\n"
1319 "\\&\n"
1320 "int\n"
1321 "main(int argc, char *argv[])\n"
1322 "{\n"
1323 " int fd;\n"
1324 " char *name, *seals_arg;\n"
1325 " ssize_t len;\n"
1326 " unsigned int seals;\n"
1327 "\\&\n"
1328 " if (argc E<lt> 3) {\n"
1329 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
1330 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] can contain any of the \"\n"
1331 " \"following characters:\\[rs]n\");\n"
1332 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
1333 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
1334 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
1335 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
1336 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
1337 " exit(EXIT_FAILURE);\n"
1338 " }\n"
1339 "\\&\n"
1340 " name = argv[1];\n"
1341 " len = atoi(argv[2]);\n"
1342 " seals_arg = argv[3];\n"
1343 "\\&\n"
1344 " /* Create an anonymous file in tmpfs; allow seals to be\n"
1345 " placed on the file. */\n"
1346 "\\&\n"
1347 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
1348 " if (fd == -1)\n"
1349 " err(EXIT_FAILURE, \"memfd_create\");\n"
1350 "\\&\n"
1351 " /* Size the file as specified on the command line. */\n"
1352 "\\&\n"
1353 " if (ftruncate(fd, len) == -1)\n"
1354 " err(EXIT_FAILURE, \"truncate\");\n"
1355 "\\&\n"
1356 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1357 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1358 "\\&\n"
1359 " /* Code to map the file and populate the mapping with data\n"
1360 " omitted. */\n"
1361 "\\&\n"
1362 " /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
1363 " seals on the file. */\n"
1364 "\\&\n"
1365 " if (seals_arg != NULL) {\n"
1366 " seals = 0;\n"
1367 "\\&\n"
1368 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1369 " seals |= F_SEAL_GROW;\n"
1370 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1371 " seals |= F_SEAL_SHRINK;\n"
1372 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1373 " seals |= F_SEAL_WRITE;\n"
1374 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1375 " seals |= F_SEAL_FUTURE_WRITE;\n"
1376 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1377 " seals |= F_SEAL_SEAL;\n"
1378 "\\&\n"
1379 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1380 " err(EXIT_FAILURE, \"fcntl\");\n"
1381 " }\n"
1382 "\\&\n"
1383 " /* Keep running, so that the file created by memfd_create()\n"
1384 " continues to exist. */\n"
1385 "\\&\n"
1386 " pause();\n"
1387 "\\&\n"
1388 " exit(EXIT_SUCCESS);\n"
1389 "}\n"
1390
1391 #. type: Plain text
1392 #: debian-trixie fedora-44 fedora-rawhide
1393 #, no-wrap
1394 msgid ""
1395 "#define _GNU_SOURCE\n"
1396 "#include E<lt>err.hE<gt>\n"
1397 "#include E<lt>fcntl.hE<gt>\n"
1398 "#include E<lt>stdio.hE<gt>\n"
1399 "#include E<lt>stdlib.hE<gt>\n"
1400 "\\&\n"
1401 "int\n"
1402 "main(int argc, char *argv[])\n"
1403 "{\n"
1404 " int fd;\n"
1405 " unsigned int seals;\n"
1406 "\\&\n"
1407 " if (argc != 2) {\n"
1408 " fprintf(stderr, \"%s /proc/PID/fd/FD\\[rs]n\", argv[0]);\n"
1409 " exit(EXIT_FAILURE);\n"
1410 " }\n"
1411 "\\&\n"
1412 " fd = open(argv[1], O_RDWR);\n"
1413 " if (fd == -1)\n"
1414 " err(EXIT_FAILURE, \"open\");\n"
1415 "\\&\n"
1416 " seals = fcntl(fd, F_GET_SEALS);\n"
1417 " if (seals == -1)\n"
1418 " err(EXIT_FAILURE, \"fcntl\");\n"
1419 "\\&\n"
1420 " printf(\"Existing seals:\");\n"
1421 " if (seals & F_SEAL_SEAL)\n"
1422 " printf(\" SEAL\");\n"
1423 " if (seals & F_SEAL_GROW)\n"
1424 " printf(\" GROW\");\n"
1425 " if (seals & F_SEAL_WRITE)\n"
1426 " printf(\" WRITE\");\n"
1427 " if (seals & F_SEAL_FUTURE_WRITE)\n"
1428 " printf(\" FUTURE_WRITE\");\n"
1429 " if (seals & F_SEAL_SHRINK)\n"
1430 " printf(\" SHRINK\");\n"
1431 " printf(\"\\[rs]n\");\n"
1432 "\\&\n"
1433 " /* Code to map the file and access the contents of the\n"
1434 " resulting mapping omitted. */\n"
1435 "\\&\n"
1436 " exit(EXIT_SUCCESS);\n"
1437 "}\n"
1438 msgstr ""
1439 "#define _GNU_SOURCE\n"
1440 "#include E<lt>err.hE<gt>\n"
1441 "#include E<lt>fcntl.hE<gt>\n"
1442 "#include E<lt>stdio.hE<gt>\n"
1443 "#include E<lt>stdlib.hE<gt>\n"
1444 "\\&\n"
1445 "int\n"
1446 "main(int argc, char *argv[])\n"
1447 "{\n"
1448 " int fd;\n"
1449 " unsigned int seals;\n"
1450 "\\&\n"
1451 " if (argc != 2) {\n"
1452 " fprintf(stderr, \"%s /proc/PID/fd/FD\\[rs]n\", argv[0]);\n"
1453 " exit(EXIT_FAILURE);\n"
1454 " }\n"
1455 "\\&\n"
1456 " fd = open(argv[1], O_RDWR);\n"
1457 " if (fd == -1)\n"
1458 " err(EXIT_FAILURE, \"open\");\n"
1459 "\\&\n"
1460 " seals = fcntl(fd, F_GET_SEALS);\n"
1461 " if (seals == -1)\n"
1462 " err(EXIT_FAILURE, \"fcntl\");\n"
1463 "\\&\n"
1464 " printf(\"Existing seals:\");\n"
1465 " if (seals & F_SEAL_SEAL)\n"
1466 " printf(\" SEAL\");\n"
1467 " if (seals & F_SEAL_GROW)\n"
1468 " printf(\" GROW\");\n"
1469 " if (seals & F_SEAL_WRITE)\n"
1470 " printf(\" WRITE\");\n"
1471 " if (seals & F_SEAL_FUTURE_WRITE)\n"
1472 " printf(\" FUTURE_WRITE\");\n"
1473 " if (seals & F_SEAL_SHRINK)\n"
1474 " printf(\" SHRINK\");\n"
1475 " printf(\"\\[rs]n\");\n"
1476 "\\&\n"
1477 " /* Code to map the file and access the contents of the\n"
1478 " resulting mapping omitted. */\n"
1479 "\\&\n"
1480 " exit(EXIT_SUCCESS);\n"
1481 "}\n"
1482
1483 #. type: TH
1484 #: fedora-44 fedora-rawhide
1485 #, no-wrap
1486 msgid "2024-11-17"
1487 msgstr "17 نوفمبر 2024"
1488
1489 #. type: TH
1490 #: fedora-44 fedora-rawhide
1491 #, no-wrap
1492 msgid "Linux man-pages 6.13"
1493 msgstr "صفحات دليل لينكس 6.13"
1494
1495 #. type: Plain text
1496 #: fedora-44 fedora-rawhide
1497 #, no-wrap
1498 msgid ""
1499 "#define _GNU_SOURCE\n"
1500 "#include E<lt>err.hE<gt>\n"
1501 "#include E<lt>fcntl.hE<gt>\n"
1502 "#include E<lt>stdint.hE<gt>\n"
1503 "#include E<lt>stdio.hE<gt>\n"
1504 "#include E<lt>stdlib.hE<gt>\n"
1505 "#include E<lt>string.hE<gt>\n"
1506 "#include E<lt>sys/mman.hE<gt>\n"
1507 "#include E<lt>sys/types.hE<gt>\n"
1508 "#include E<lt>unistd.hE<gt>\n"
1509 "\\&\n"
1510 "int\n"
1511 "main(int argc, char *argv[])\n"
1512 "{\n"
1513 " int fd;\n"
1514 " char *name, *seals_arg;\n"
1515 " ssize_t size;\n"
1516 " unsigned int seals;\n"
1517 "\\&\n"
1518 " if (argc E<lt> 3) {\n"
1519 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
1520 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] can contain any of the \"\n"
1521 " \"following characters:\\[rs]n\");\n"
1522 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
1523 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
1524 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
1525 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
1526 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
1527 " exit(EXIT_FAILURE);\n"
1528 " }\n"
1529 "\\&\n"
1530 " name = argv[1];\n"
1531 " size = atoi(argv[2]);\n"
1532 " seals_arg = argv[3];\n"
1533 "\\&\n"
1534 " /* Create an anonymous file in tmpfs; allow seals to be\n"
1535 " placed on the file. */\n"
1536 "\\&\n"
1537 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
1538 " if (fd == -1)\n"
1539 " err(EXIT_FAILURE, \"memfd_create\");\n"
1540 "\\&\n"
1541 " /* Size the file as specified on the command line. */\n"
1542 "\\&\n"
1543 " if (ftruncate(fd, size) == -1)\n"
1544 " err(EXIT_FAILURE, \"truncate\");\n"
1545 "\\&\n"
1546 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1547 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1548 "\\&\n"
1549 " /* Code to map the file and populate the mapping with data\n"
1550 " omitted. */\n"
1551 "\\&\n"
1552 " /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
1553 " seals on the file. */\n"
1554 "\\&\n"
1555 " if (seals_arg != NULL) {\n"
1556 " seals = 0;\n"
1557 "\\&\n"
1558 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1559 " seals |= F_SEAL_GROW;\n"
1560 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1561 " seals |= F_SEAL_SHRINK;\n"
1562 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1563 " seals |= F_SEAL_WRITE;\n"
1564 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1565 " seals |= F_SEAL_FUTURE_WRITE;\n"
1566 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1567 " seals |= F_SEAL_SEAL;\n"
1568 "\\&\n"
1569 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1570 " err(EXIT_FAILURE, \"fcntl\");\n"
1571 " }\n"
1572 "\\&\n"
1573 " /* Keep running, so that the file created by memfd_create()\n"
1574 " continues to exist. */\n"
1575 "\\&\n"
1576 " pause();\n"
1577 "\\&\n"
1578 " exit(EXIT_SUCCESS);\n"
1579 "}\n"
1580 msgstr ""
1581 "#define _GNU_SOURCE\n"
1582 "#include E<lt>err.hE<gt>\n"
1583 "#include E<lt>fcntl.hE<gt>\n"
1584 "#include E<lt>stdint.hE<gt>\n"
1585 "#include E<lt>stdio.hE<gt>\n"
1586 "#include E<lt>stdlib.hE<gt>\n"
1587 "#include E<lt>string.hE<gt>\n"
1588 "#include E<lt>sys/mman.hE<gt>\n"
1589 "#include E<lt>sys/types.hE<gt>\n"
1590 "#include E<lt>unistd.hE<gt>\n"
1591 "\\&\n"
1592 "int\n"
1593 "main(int argc, char *argv[])\n"
1594 "{\n"
1595 " int fd;\n"
1596 " char *name, *seals_arg;\n"
1597 " ssize_t size;\n"
1598 " unsigned int seals;\n"
1599 "\\&\n"
1600 " if (argc E<lt> 3) {\n"
1601 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
1602 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] can contain any of the \"\n"
1603 " \"following characters:\\[rs]n\");\n"
1604 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
1605 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
1606 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
1607 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
1608 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
1609 " exit(EXIT_FAILURE);\n"
1610 " }\n"
1611 "\\&\n"
1612 " name = argv[1];\n"
1613 " size = atoi(argv[2]);\n"
1614 " seals_arg = argv[3];\n"
1615 "\\&\n"
1616 " /* Create an anonymous file in tmpfs; allow seals to be\n"
1617 " placed on the file. */\n"
1618 "\\&\n"
1619 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
1620 " if (fd == -1)\n"
1621 " err(EXIT_FAILURE, \"memfd_create\");\n"
1622 "\\&\n"
1623 " /* Size the file as specified on the command line. */\n"
1624 "\\&\n"
1625 " if (ftruncate(fd, size) == -1)\n"
1626 " err(EXIT_FAILURE, \"truncate\");\n"
1627 "\\&\n"
1628 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1629 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1630 "\\&\n"
1631 " /* Code to map the file and populate the mapping with data\n"
1632 " omitted. */\n"
1633 "\\&\n"
1634 " /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
1635 " seals on the file. */\n"
1636 "\\&\n"
1637 " if (seals_arg != NULL) {\n"
1638 " seals = 0;\n"
1639 "\\&\n"
1640 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1641 " seals |= F_SEAL_GROW;\n"
1642 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1643 " seals |= F_SEAL_SHRINK;\n"
1644 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1645 " seals |= F_SEAL_WRITE;\n"
1646 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1647 " seals |= F_SEAL_FUTURE_WRITE;\n"
1648 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1649 " seals |= F_SEAL_SEAL;\n"
1650 "\\&\n"
1651 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1652 " err(EXIT_FAILURE, \"fcntl\");\n"
1653 " }\n"
1654 "\\&\n"
1655 " /* Keep running, so that the file created by memfd_create()\n"
1656 " continues to exist. */\n"
1657 "\\&\n"
1658 " pause();\n"
1659 "\\&\n"
1660 " exit(EXIT_SUCCESS);\n"
1661 "}\n"
1662
1663 #. type: TH
1664 #: mageia-cauldron
1665 #, no-wrap
1666 msgid "Linux man-pages 6.17"
1667 msgstr "صفحات دليل لينكس 6.17"
1668
1669 #. type: TH
1670 #: opensuse-leap-16-1 opensuse-tumbleweed
1671 #, no-wrap
1672 msgid "Linux man-pages (unreleased)"
1673 msgstr "صفحات دليل لينكس (لم تصدر بعد)"