Debian Codegraph @

po/fr/man2/memfd_create.2.po

raw
1 # French translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003.
5 # Stéphan Rafin <[email protected]>, 2002.
6 # Thierry Vignaud <[email protected]>, 1999,2002.
7 # François Micaux, 2002.
8 # Alain Portal <[email protected]>, 2003-2008.
9 # Jean-Philippe Guérard <[email protected]>, 2005-2006.
10 # Jean-Luc Coulon (f5ibh) <[email protected]>, 2006-2007.
11 # Julien Cristau <[email protected]>, 2006-2007.
12 # Thomas Huriaux <[email protected]>, 2006-2008.
13 # Nicolas François <[email protected]>, 2006-2008.
14 # Florentin Duneau <[email protected]>, 2006-2010.
15 # Simon Paillard <[email protected]>, 2006, 2012-2014.
16 # Denis Barbier <[email protected]>, 2006,2010.
17 # David Prévot <[email protected]>, 2010-2014.
18 # Jean-Philippe MENGUAL <[email protected]>, 2020-2024.
19 msgid ""
20 msgstr ""
21 "Project-Id-Version: manpages-l10n 4.21.0\n"
22 "POT-Creation-Date: 2026-06-05 06:31+0200\n"
23 "PO-Revision-Date: 2024-03-13 11:04+0100\n"
24 "Last-Translator: Jean-Philippe MENGUAL <[email protected]>\n"
25 "Language-Team: French <[email protected]>\n"
26 "Language: fr\n"
27 "MIME-Version: 1.0\n"
28 "Content-Type: text/plain; charset=UTF-8\n"
29 "Content-Transfer-Encoding: 8bit\n"
30 "Plural-Forms: nplurals=2; plural=n > 1;\n"
31 "X-Generator: vim\n"
32
33 #. type: TH
34 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
35 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
36 #, no-wrap
37 msgid "memfd_create"
38 msgstr "memfd_create"
39
40 #. type: TH
41 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
42 #: opensuse-tumbleweed
43 #, no-wrap
44 msgid "2026-02-08"
45 msgstr "8 février 2026"
46
47 #. type: TH
48 #: archlinux debian-unstable
49 #, no-wrap
50 msgid "Linux man-pages 6.18"
51 msgstr "Pages du manuel de Linux 6.18"
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 "NAME"
58 msgstr "NOM"
59
60 #. type: Plain text
61 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "memfd_create - create an anonymous file"
64 msgstr "memfd_create - Créer un fichier anonyme"
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 "LIBRARY"
71 msgstr "BIBLIOTHÈQUE"
72
73 #. type: Plain text
74 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
75 #: opensuse-leap-16-1 opensuse-tumbleweed
76 msgid "Standard C library (I<libc>,\\ I<-lc>)"
77 msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)"
78
79 #. type: SH
80 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
81 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid "SYNOPSIS"
84 msgstr "SYNOPSIS"
85
86 #. type: Plain text
87 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
88 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
89 #, no-wrap
90 msgid ""
91 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
92 "B<#include E<lt>sys/mman.hE<gt>>\n"
93 msgstr ""
94 "B<#define _GNU_SOURCE> /* Consultez feature_test_macros(7) */\n"
95 "B<#include E<lt>sys/mman.hE<gt>>\n"
96
97 #. type: Plain text
98 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
99 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
100 #, no-wrap
101 msgid "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>\n"
102 msgstr "B<int memfd_create(const char *>I<name>B<, unsigned int >I<flags>B<);>\n"
103
104 #. type: SH
105 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
106 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
107 #, no-wrap
108 msgid "DESCRIPTION"
109 msgstr "DESCRIPTION"
110
111 #. #-#-#-#-# archlinux: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
112 #. David Herrmann:
113 #. memfd uses VM_NORESERVE so each page is accounted on first access.
114 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
115 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
116 #. those are accounted on "current" and "current->mm", that is, the
117 #. process doing the first page access.
118 #. type: Plain text
119 #. #-#-#-#-# debian-trixie: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
120 #. David Herrmann:
121 #. memfd uses VM_NORESERVE so each page is accounted on first access.
122 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
123 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
124 #. those are accounted on "current" and "current->mm", that is, the
125 #. process doing the first page access.
126 #. type: Plain text
127 #. #-#-#-#-# debian-unstable: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
128 #. David Herrmann:
129 #. memfd uses VM_NORESERVE so each page is accounted on first access.
130 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
131 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
132 #. those are accounted on "current" and "current->mm", that is, the
133 #. process doing the first page access.
134 #. type: Plain text
135 #. #-#-#-#-# fedora-44: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
136 #. David Herrmann:
137 #. memfd uses VM_NORESERVE so each page is accounted on first access.
138 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
139 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
140 #. those are accounted on "current" and "current->mm", that is, the
141 #. process doing the first page access.
142 #. type: Plain text
143 #. #-#-#-#-# fedora-rawhide: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
144 #. David Herrmann:
145 #. memfd uses VM_NORESERVE so each page is accounted on first access.
146 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
147 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
148 #. those are accounted on "current" and "current->mm", that is, the
149 #. process doing the first page access.
150 #. type: Plain text
151 #. #-#-#-#-# mageia-cauldron: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
152 #. David Herrmann:
153 #. memfd uses VM_NORESERVE so each page is accounted on first access.
154 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
155 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
156 #. those are accounted on "current" and "current->mm", that is, the
157 #. process doing the first page access.
158 #. type: Plain text
159 #. #-#-#-#-# opensuse-leap-16-1: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
160 #. David Herrmann:
161 #. memfd uses VM_NORESERVE so each page is accounted on first access.
162 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
163 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
164 #. those are accounted on "current" and "current->mm", that is, the
165 #. process doing the first page access.
166 #. type: Plain text
167 #. #-#-#-#-# opensuse-tumbleweed: memfd_create.2.pot (PACKAGE VERSION) #-#-#-#-#
168 #. David Herrmann:
169 #. memfd uses VM_NORESERVE so each page is accounted on first access.
170 #. This means, the overcommit-limits (see __vm_enough_memory()) and the
171 #. memory-cgroup limits (mem_cgroup_try_charge()) are applied. Note that
172 #. those are accounted on "current" and "current->mm", that is, the
173 #. process doing the first page access.
174 #. type: Plain text
175 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
176 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
177 msgid ""
178 "B<memfd_create>() creates an anonymous file and returns a file descriptor "
179 "that refers to it. The file behaves like a regular file, and so can be "
180 "modified, truncated, memory-mapped, and so on. However, unlike a regular "
181 "file, it lives in RAM and has a volatile backing storage. Once all "
182 "references to the file are dropped, it is automatically released. Anonymous "
183 "memory is used for all backing pages of the file. Therefore, files created "
184 "by B<memfd_create>() have the same semantics as other anonymous memory "
185 "allocations such as those allocated using B<mmap>(2) with the "
186 "B<MAP_ANONYMOUS> flag."
187 msgstr ""
188 "B<memfd_create>() crée un fichier anonyme et renvoie un descripteur de "
189 "fichier qui s'y rapporte. Le fichier se comporte comme un fichier normal, il "
190 "peut donc être modifié, tronqué, projeté en mémoire, et ainsi de suite. Mais "
191 "contrairement à un fichier normal, il réside dans la RAM et son stockage est "
192 "volatile. Une fois que toutes les références au fichier ont disparu, il est "
193 "automatiquement libéré. La mémoire anonyme est utilisée pour toutes les "
194 "pages de sauvegarde du fichier. Les fichiers créés par B<memfd_create>() ont "
195 "donc la même sémantique que les autres allocations de mémoire anonyme telles "
196 "que celles qui utilisent B<mmap>(2) avec l'attribut B<MAP_ANONYMOUS>."
197
198 #. type: Plain text
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 msgid ""
202 "The initial size of the file is set to 0. Following the call, the file size "
203 "should be set using B<ftruncate>(2). (Alternatively, the file may be "
204 "populated by calls to B<write>(2) or similar.)"
205 msgstr ""
206 "La taille initiale du fichier est positionnée à B<0>. Après l'appel, elle "
207 "devrait être définie en utilisant B<ftruncate>(2) (ou le fichier peut être "
208 "rempli par des appels à B<write>(2) ou équivalent)."
209
210 #. type: Plain text
211 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
212 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
213 msgid ""
214 "The name supplied in I<name> is used as a filename and will be displayed as "
215 "the target of the corresponding symbolic link in the directory I</proc/self/"
216 "fd/>. The displayed name is always prefixed with I<memfd:> and serves only "
217 "for debugging purposes. Names do not affect the behavior of the file "
218 "descriptor, and as such multiple files can have the same name without any "
219 "side effects."
220 msgstr ""
221 "Le nom fourni dans I<name> est utilisé comme nom de fichier et sera affiché "
222 "en tant que cible du lien symbolique correspondant dans le répertoire I</"
223 "proc/self/fd/>. Le nom affiché a toujours un préfixe I<memfd:> et il ne sert "
224 "que pour le débogage. Les noms ne changent pas le comportement du "
225 "descripteur de fichier et en tant que tels plusieurs fichiers peuvent avoir "
226 "le même nom sans effets de bord."
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 "The following values may be bitwise ORed in I<flags> to change the behavior "
233 "of B<memfd_create>():"
234 msgstr ""
235 "Les valeurs suivantes peuvent subir une opération OU logique bit à bit dans "
236 "I<flags> pour modifier le comportement de B<memfd_create>() :"
237
238 #. type: TP
239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
241 #, no-wrap
242 msgid "B<MFD_CLOEXEC>"
243 msgstr "B<MFD_CLOEXEC>"
244
245 #. type: Plain text
246 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
247 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
248 msgid ""
249 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
250 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
251 "may be useful."
252 msgstr ""
253 "Placer l'attribut « close-on-exec » (B<FD_CLOEXEC>) sur le nouveau "
254 "descripteur de fichier. Consultez la description de l'attribut B<O_CLOEXEC> "
255 "dans B<open>(2) pour savoir pourquoi cela peut être utile."
256
257 #. type: TP
258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
260 #, no-wrap
261 msgid "B<MFD_ALLOW_SEALING>"
262 msgstr "B<MFD_ALLOW_SEALING>"
263
264 #. FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
265 #. Is it worth adding some text explaining this?
266 #. type: Plain text
267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
269 msgid ""
270 "Allow sealing operations on this file. See the discussion of the "
271 "B<F_ADD_SEALS> and B<F_GET_SEALS> operations in B<fcntl>(2), and also NOTES, "
272 "below. The initial set of seals is empty. If this flag is not set, the "
273 "initial set of seals will be B<F_SEAL_SEAL>, meaning that no other seals can "
274 "be set on the file."
275 msgstr ""
276 "Permettre des opérations de verrouillage sur ce fichier. Voir le point sur "
277 "les opérations B<F_ADD_SEALS> et B<F_GET_SEALS> dans B<fcntl>(2), ainsi que "
278 "les NOTES ci-dessous. Le positionnement initial des verrous est vide. Si cet "
279 "attribut n'est pas défini, le positionnement initial des verrous sera "
280 "B<F_SEAL_SEAL>, ce qui veut dire qu'aucun autre verrou ne peut être "
281 "positionné sur le fichier."
282
283 #. type: TP
284 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
285 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
286 #, no-wrap
287 msgid "B<MFD_HUGETLB> (since Linux 4.14)"
288 msgstr "B<MFD_HUGETLB> (depuis Linux 4.14)"
289
290 #. commit 749df87bd7bee5a79cef073f5d032ddb2b211de8
291 #. commit 47b9012ecdc747f6936395265e677d41e11a31ff
292 #. type: Plain text
293 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
294 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
295 msgid ""
296 "The anonymous file will be created in the hugetlbfs filesystem using huge "
297 "pages. See the Linux kernel source file I<Documentation/admin-guide/mm/"
298 "hugetlbpage.rst> for more information about hugetlbfs. Specifying both "
299 "B<MFD_HUGETLB> and B<MFD_ALLOW_SEALING> in I<flags> is supported since Linux "
300 "4.16."
301 msgstr ""
302 "Le fichier anonyme sera créé sur le système de fichiers hugetlbfs en "
303 "utilisant d'immenses pages. Voir le fichier I<Documentation/admin-guide/mm/"
304 "hugetlbpage.rst> des sources du noyau Linux pour plus d'informations sur "
305 "hugetlbfs. Le fait d'indiquer à la fois B<MFD_HUGETLB> et "
306 "B<MFD_ALLOW_SEALING> dans I<flags> est pris en charge depuis Linux 4.16."
307
308 #. type: TP
309 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
310 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
311 #, no-wrap
312 msgid "B<MFD_HUGE_2MB>"
313 msgstr "B<MFD_HUGE_2MB>"
314
315 #. type: TQ
316 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
317 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
318 #, no-wrap
319 msgid "B<MFD_HUGE_1GB>"
320 msgstr "B<MFD_HUGE_1GB>"
321
322 #. type: TQ
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 #, no-wrap
326 msgid "\\&.\\|.\\|."
327 msgstr "\\&.\\|.\\|."
328
329 #. type: Plain text
330 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
331 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
332 msgid ""
333 "Used in conjunction with B<MFD_HUGETLB> to select alternative hugetlb page "
334 "sizes (respectively, 2\\ MB, 1\\ GB, ...) on systems that support multiple "
335 "hugetlb page sizes. Definitions for known huge page sizes are included in "
336 "the header file I<E<lt>linux/memfd.hE<gt>.>"
337 msgstr ""
338 "Utilisé avec B<MFD_HUGETLB> pour sélectionner d'autres tailles de page "
339 "hugetlb (respectivement 2 Mo, 1 Go, ...) sur les systèmes qui gèrent "
340 "plusieurs tailles de page hugetlb. Les définitions des tailles de page "
341 "immenses connues figurent dans le fichier d'entête I<E<lt>linux/"
342 "memfd.hE<gt>>."
343
344 #. type: Plain text
345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
347 msgid ""
348 "For details on encoding huge page sizes not included in the header file, see "
349 "the discussion of the similarly named constants in B<mmap>(2)."
350 msgstr ""
351 "Pour des détails sur l'encodage des tailles des pages immenses ne figurant "
352 "pas dans le fichier d'entête, voir le point sur les constantes du même nom "
353 "dans B<mmap>(2)."
354
355 #. type: Plain text
356 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
357 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
358 msgid "Unused bits in I<flags> must be 0."
359 msgstr "Les bits inusitées dans I<flags> doivent valoir B<0>."
360
361 #. type: Plain text
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 msgid ""
365 "As its return value, B<memfd_create>() returns a new file descriptor that "
366 "can be used to refer to the file. This file descriptor is opened for both "
367 "reading and writing (B<O_RDWR>) and B<O_LARGEFILE> is set for the file "
368 "descriptor."
369 msgstr ""
370 "En code de retour, B<memfd_create>() renvoie un nouveau descripteur de "
371 "fichier qui peut être utilisé pour se référer au fichier. Ce descripteur de "
372 "fichier est ouvert en lecture et en écriture (B<O_RDWR>) et B<O_LARGEFILE> "
373 "est positionné pour le descripteur de fichier."
374
375 #. type: Plain text
376 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
377 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
378 msgid ""
379 "With respect to B<fork>(2) and B<execve>(2), the usual semantics apply for "
380 "the file descriptor created by B<memfd_create>(). A copy of the file "
381 "descriptor is inherited by the child produced by B<fork>(2) and refers to "
382 "the same file. The file descriptor is preserved across B<execve>(2), unless "
383 "the close-on-exec flag has been set."
384 msgstr ""
385 "Par rapport à B<fork>(2) et B<execve>(2), la sémantique habituelle "
386 "s'applique au descripteur de fichier créé par B<memfd_create>(). Une copie "
387 "du descripteur de fichier est récupérée par l'enfant produit par B<fork>(2) "
388 "et elle se rapporte au même fichier. Le descripteur de fichier est préservé "
389 "pendant un B<execve>(2), sauf si l'attribut close-on-exec a été positionné."
390
391 #. type: SH
392 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
393 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
394 #, no-wrap
395 msgid "RETURN VALUE"
396 msgstr "VALEUR RENVOYÉE"
397
398 #. type: Plain text
399 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
400 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
401 msgid ""
402 "On success, B<memfd_create>() returns a new file descriptor. On error, -1 "
403 "is returned and I<errno> is set to indicate the error."
404 msgstr ""
405 "En cas de succès, B<memfd_create>() renvoie un nouveau descripteur de "
406 "fichier. En cas d'erreur, B<-1> est renvoyé et I<errno> est positionné pour "
407 "indiquer l'erreur."
408
409 #. type: SH
410 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
411 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
412 #, no-wrap
413 msgid "ERRORS"
414 msgstr "ERREURS"
415
416 #. type: TP
417 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
418 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
419 #, no-wrap
420 msgid "B<EFAULT>"
421 msgstr "B<EFAULT>"
422
423 #. type: Plain text
424 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
425 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
426 msgid "The address in I<name> points to invalid memory."
427 msgstr "L'adresse dans I<name> pointe vers une mémoire non valable."
428
429 #. type: TP
430 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
431 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
432 #, no-wrap
433 msgid "B<EINVAL>"
434 msgstr "B<EINVAL>"
435
436 #. type: Plain text
437 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
438 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
439 msgid "I<flags> included unknown bits."
440 msgstr "I<flags> comprend des bits inconnus."
441
442 #. NAME_MAX - strlen("memfd:")
443 #. type: Plain text
444 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
445 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
446 msgid ""
447 "I<name> was too long. (The limit is 249 bytes, excluding the terminating "
448 "null byte.)"
449 msgstr ""
450 "I<name> était trop long (la limite de 249 octets, n'incluant pas l'octet "
451 "NULL final)."
452
453 #. type: Plain text
454 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
455 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
456 msgid ""
457 "Both B<MFD_HUGETLB> and B<MFD_ALLOW_SEALING> were specified in I<flags>."
458 msgstr ""
459 "B<MFD_HUGETLB> et B<MFD_ALLOW_SEALING> ont tous deux été indiqués dans "
460 "I<flags>."
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<EMFILE>"
467 msgstr "B<EMFILE>"
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 ""
473 "The per-process limit on the number of open file descriptors has been "
474 "reached."
475 msgstr ""
476 "La limite du nombre de descripteurs de fichiers par processus a été atteinte."
477
478 #. type: TP
479 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
480 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
481 #, no-wrap
482 msgid "B<ENFILE>"
483 msgstr "B<ENFILE>"
484
485 #. type: Plain text
486 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
487 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
488 msgid ""
489 "The system-wide limit on the total number of open files has been reached."
490 msgstr ""
491 "La limite du nombre total de fichiers ouverts pour le système entier a été "
492 "atteinte."
493
494 #. type: TP
495 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
496 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
497 #, no-wrap
498 msgid "B<ENOMEM>"
499 msgstr "B<ENOMEM>"
500
501 #. type: Plain text
502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
504 msgid "There was insufficient memory to create a new anonymous file."
505 msgstr "Mémoire insuffisante pour créer un nouveau fichier anonyme."
506
507 #. type: TP
508 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
509 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
510 #, no-wrap
511 msgid "B<EPERM>"
512 msgstr "B<EPERM>"
513
514 #. type: Plain text
515 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
516 #: opensuse-tumbleweed
517 #, fuzzy
518 #| msgid ""
519 #| "The B<MFD_HUGETLB> flag was specified, but the caller was not privileged "
520 #| "(did not have the B<CAP_IPC_LOCK> capability) and is not a member of the "
521 #| "I<sysctl_hugetlb_shm_group> group; see the description of I</proc/sys/vm/"
522 #| "sysctl_hugetlb_shm_group> in B<proc>(5)."
523 msgid ""
524 "The B<MFD_HUGETLB> flag was specified, but the caller was not privileged "
525 "(did not have the B<CAP_IPC_LOCK> capability) and is not a member of the "
526 "I<hugetlb_shm_group> group; see the description of I</proc/sys/vm/"
527 "hugetlb_shm_group> in B<proc_sys_vm>(5)."
528 msgstr ""
529 "L'attribut B<MFD_HUGETLB> a été spécifié, mais l'appelant n'est pas un "
530 "utilisateur privilégié (il n'a pas la capacité B<CAP_IPC_LOCK>) et il n'est "
531 "pas membre du groupe I<sysctl_hugetlb_shm_group> ; consultez la description "
532 "de I</proc/sys/vm/sysctl_hugetlb_shm_group> dans B<proc>(5)."
533
534 #. type: SH
535 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
536 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
537 #, no-wrap
538 msgid "STANDARDS"
539 msgstr "NORMES"
540
541 #. type: Plain text
542 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
543 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
544 msgid "Linux."
545 msgstr "Linux."
546
547 #. type: SH
548 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
549 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
550 #, no-wrap
551 msgid "HISTORY"
552 msgstr "HISTORIQUE"
553
554 #. type: Plain text
555 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
556 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
557 msgid "Linux 3.17, glibc 2.27."
558 msgstr "Linux 3.17, glibc 2.27."
559
560 #. type: SH
561 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
562 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
563 #, no-wrap
564 msgid "NOTES"
565 msgstr "NOTES"
566
567 #. See also http://lwn.net/Articles/593918/
568 #. and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
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 "The B<memfd_create>() system call provides a simple alternative to manually "
574 "mounting a B<tmpfs>(5) filesystem and creating and opening a file in that "
575 "filesystem. The primary purpose of B<memfd_create>() is to create files "
576 "and associated file descriptors that are used with the file-sealing APIs "
577 "provided by B<fcntl>(2)."
578 msgstr ""
579 "L'appel système B<memfd_create>() offre une alternative simple au montage "
580 "manuel d'un système de fichiers B<tmpfs>(5) et à la création et l'ouverture "
581 "d'un fichier dans ce système de fichiers. Le premier objectif de "
582 "B<memfd_create>() est de créer des fichiers et leur descripteur associé, "
583 "utilisés avec les API de verrou de fichiers fournis par B<fcntl>(2)."
584
585 #. type: Plain text
586 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
587 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
588 msgid ""
589 "The B<memfd_create>() system call also has uses without file sealing (which "
590 "is why file-sealing is disabled, unless explicitly requested with the "
591 "B<MFD_ALLOW_SEALING> flag). In particular, it can be used as an alternative "
592 "to creating files in I<tmp> or as an alternative to using the B<open>(2) "
593 "B<O_TMPFILE> in cases where there is no intention to actually link the "
594 "resulting file into the filesystem."
595 msgstr ""
596 "L'appel système B<memfd_create>() s'utilise également sans verrou de fichier "
597 "(c'est pourquoi le verrouillage de fichier a été désactivé sauf demande "
598 "explicite avec l'attribut B<MFD_ALLOW_SEALING>). En particulier, il peut "
599 "être utilisé comme alternative pour créer des fichiers dans I<tmp> ou pour "
600 "utiliser B<O_TMPFILE> de B<open>(2), si vous ne voulez pas rattacher le "
601 "fichier résultant au système de fichiers."
602
603 #. type: SS
604 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
605 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
606 #, no-wrap
607 msgid "File sealing"
608 msgstr "Verrou de fichiers"
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 ""
614 "In the absence of file sealing, processes that communicate via shared memory "
615 "must either trust each other, or take measures to deal with the possibility "
616 "that an untrusted peer may manipulate the shared memory region in "
617 "problematic ways. For example, an untrusted peer might modify the contents "
618 "of the shared memory at any time, or shrink the shared memory region. The "
619 "former possibility leaves the local process vulnerable to time-of-check-to-"
620 "time-of-use race conditions (typically dealt with by copying data from the "
621 "shared memory region before checking and using it). The latter possibility "
622 "leaves the local process vulnerable to B<SIGBUS> signals when an attempt is "
623 "made to access a now-nonexistent location in the shared memory region. "
624 "(Dealing with this possibility necessitates the use of a handler for the "
625 "B<SIGBUS> signal.)"
626 msgstr ""
627 "En l'absence de verrou de fichier, les processus qui communiquent à travers "
628 "la mémoire partagée doivent soit se faire confiance entre eux, soit prendre "
629 "des mesures pour gérer la possibilité qu'un pair non fiable manipule la "
630 "région de mémoire partagée de manière problématique. Par exemple, un pair "
631 "non fiable pourrait modifier le contenu de la mémoire partagée n'importe "
632 "quand ou rétrécir la zone de mémoire partagée. La première éventualité rend "
633 "le processus local vulnérable aux conflits (race conditions) time-of-check-"
634 "to-time-of-use (généralement gérés en copiant les données de la zone de "
635 "mémoire partagée avant de les vérifier et de les utiliser). La deuxième "
636 "éventualité rend le processus local vulnérable aux signaux B<SIGBUS> quand "
637 "on essaie d'accéder à un emplacement inexistant dans la zone de mémoire "
638 "partagée (gérer cette éventualité implique d'utiliser un gestionnaire pour "
639 "le signal B<SIGBUS>)."
640
641 #. type: Plain text
642 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
643 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
644 msgid ""
645 "Dealing with untrusted peers imposes extra complexity on code that employs "
646 "shared memory. Memory sealing enables that extra complexity to be "
647 "eliminated, by allowing a process to operate secure in the knowledge that "
648 "its peer can't modify the shared memory in an undesired fashion."
649 msgstr ""
650 "La gestion de pairs non fiables impose une plus grande complexité du code "
651 "qui utilise la mémoire partagée. Les verrous mémoire éliminent cette "
652 "complexité, en permettant à un processus d'agir en toute sécurité en sachant "
653 "que son pair ne peut pas modifier la mémoire partagée de manière non "
654 "souhaitée."
655
656 #. type: Plain text
657 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
658 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
659 msgid "An example of the usage of the sealing mechanism is as follows:"
660 msgstr "Voici un exemple d'utilisation du mécanisme de verrouillage :"
661
662 #. type: IP
663 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
664 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
665 #, no-wrap
666 msgid "(1)"
667 msgstr "(1)"
668
669 #. type: Plain text
670 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
671 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
672 msgid ""
673 "The first process creates a B<tmpfs>(5) file using B<memfd_create>(). The "
674 "call yields a file descriptor used in subsequent steps."
675 msgstr ""
676 "Le premier processus crée un fichier B<tmpfs>(5) en utilisant "
677 "B<memfd_create>(). L'appel donne un descripteur de fichier utilisé dans les "
678 "étapes ultérieures."
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 "(2)"
685 msgstr "(2)"
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 "The first process sizes the file created in the previous step using "
692 "B<ftruncate>(2), maps it using B<mmap>(2), and populates the shared memory "
693 "with the desired data."
694 msgstr ""
695 "Le premier processus dimensionne le fichier créé à l'étape précédente en "
696 "utilisant B<ftruncate>(2), il le projette en utilisant B<mmap>(2) et il "
697 "remplit la mémoire partagée avec les données désirées."
698
699 #. type: IP
700 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
701 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
702 #, no-wrap
703 msgid "(3)"
704 msgstr "(3)"
705
706 #. type: Plain text
707 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
708 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
709 msgid ""
710 "The first process uses the B<fcntl>(2) B<F_ADD_SEALS> operation to place "
711 "one or more seals on the file, in order to restrict further modifications on "
712 "the file. (If placing the seal B<F_SEAL_WRITE>, then it will be necessary "
713 "to first unmap the shared writable mapping created in the previous step. "
714 "Otherwise, behavior similar to B<F_SEAL_WRITE> can be achieved by using "
715 "B<F_SEAL_FUTURE_WRITE>, which will prevent future writes via B<mmap>(2) and "
716 "B<write>(2) from succeeding while keeping existing shared writable "
717 "mappings)."
718 msgstr ""
719 "Le premier processus utilise l'opération B<F_ADD_SEALS> de B<fcntl>(2) pour "
720 "poser un ou plusieurs verrous sur le fichier afin de restreindre des "
721 "modifications ultérieures (si on pose un verrou B<F_SEAL_WRITE>, il sera "
722 "nécessaire de désassocier la projection modifiable partagée créée à l'étape "
723 "précédente. Sinon, on peut obtenir un comportement identique à "
724 "B<F_SEAL_WRITE> en utilisant B<F_SEAL_FUTURE_WRITE>, qui empêchera des "
725 "écritures ultérieures à l'aide de B<mmap>(2) et de B<write>(2), tout en "
726 "conservant les projections modifiables partagées existantes)."
727
728 #. type: IP
729 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
730 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
731 #, no-wrap
732 msgid "(4)"
733 msgstr "(4)"
734
735 #. type: Plain text
736 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
737 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
738 msgid ""
739 "A second process obtains a file descriptor for the B<tmpfs>(5) file and "
740 "maps it. Among the possible ways in which this could happen are the "
741 "following:"
742 msgstr ""
743 "Un deuxième processus obtient un descripteur de fichier pour le fichier "
744 "B<tmpfs>(5) et le projette. Parmi les origines possibles de cela, vous "
745 "trouverez :"
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 "\\[bu]"
752 msgstr "-"
753
754 #. type: Plain text
755 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
756 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
757 msgid ""
758 "The process that called B<memfd_create>() could transfer the resulting file "
759 "descriptor to the second process via a UNIX domain socket (see B<unix>(7) "
760 "and B<cmsg>(3)). The second process then maps the file using B<mmap>(2)."
761 msgstr ""
762 "Le processus qui a appelé B<memfd_create>() a pu transférer le descripteur "
763 "de fichier consécutif au deuxième processus à l'aide d'un socket de domaine "
764 "UNIX (voir B<unix>(7) et B<cmsg>(3)). Le deuxième processus projette alors "
765 "le fichier en utilisant B<mmap>(2)."
766
767 #. type: Plain text
768 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
769 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
770 msgid ""
771 "The second process is created via B<fork>(2) and thus automatically "
772 "inherits the file descriptor and mapping. (Note that in this case and the "
773 "next, there is a natural trust relationship between the two processes, since "
774 "they are running under the same user ID. Therefore, file sealing would not "
775 "normally be necessary.)"
776 msgstr ""
777 "Le deuxième processus est créé à l'aide de B<fork>(2) et, ainsi, il récupère "
778 "automatiquement le descripteur de fichier et sa projection (remarquez que "
779 "dans ce cas et dans le prochain, il existe une relation de confiance "
780 "naturelle entre les deux processus puisqu'ils tournent sous le même "
781 "identifiant utilisateur. Donc, un verrou de fichier n'est, en principe, pas "
782 "nécessaire)."
783
784 #. type: Plain text
785 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
786 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
787 msgid ""
788 "The second process opens the file I</proc/>pidI</fd/>fd, where "
789 "I<E<lt>pidE<gt>> is the PID of the first process (the one that called "
790 "B<memfd_create>()), and I<E<lt>fdE<gt>> is the number of the file descriptor "
791 "returned by the call to B<memfd_create>() in that process. The second "
792 "process then maps the file using B<mmap>(2)."
793 msgstr ""
794 "Le deuxième processus ouvre le fichier I</proc/>pidI</fd/>fd où "
795 "I<E<lt>pidE<gt>> est l'identifiant de processus du premier processus (celui "
796 "qui a appelé B<memfd_create>()) et I<E<lt>fdE<gt>> est le numéro du "
797 "descripteur de fichier renvoyé par l'appel à B<memfd_create> dans ce "
798 "processus. Le deuxième processus projette ensuite le fichier en utilisant "
799 "B<mmap>(2)."
800
801 #. type: IP
802 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
803 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
804 #, no-wrap
805 msgid "(5)"
806 msgstr "(5)"
807
808 #. type: Plain text
809 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
810 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
811 msgid ""
812 "The second process uses the B<fcntl>(2) B<F_GET_SEALS> operation to "
813 "retrieve the bit mask of seals that has been applied to the file. This bit "
814 "mask can be inspected in order to determine what kinds of restrictions have "
815 "been placed on file modifications. If desired, the second process can apply "
816 "further seals to impose additional restrictions (so long as the "
817 "B<F_SEAL_SEAL> seal has not yet been applied)."
818 msgstr ""
819 "Le deuxième processus utilise l'opération B<F_GET_SEALS> de B<fcntl>(2) pour "
820 "récupérer le masque de bits de verrous appliqué au fichier. Ce masque peut "
821 "être examiné pour déterminer le type de restrictions posées aux "
822 "modifications du fichier. Si vous le souhaitez, le deuxième processus peut "
823 "appliquer des verrous supplémentaires pour imposer d'autres restrictions "
824 "(tant que le verrou B<F_SEAL_SEAL> n'a pas encore été appliqué)."
825
826 #. type: SH
827 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
828 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
829 #, no-wrap
830 msgid "EXAMPLES"
831 msgstr "EXEMPLES"
832
833 #. type: Plain text
834 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
835 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
836 msgid ""
837 "Below are shown two example programs that demonstrate the use of "
838 "B<memfd_create>() and the file sealing API."
839 msgstr ""
840 "Voici deux exemples de programme montrant l'utilisation de B<memfd_create>() "
841 "et de l'API de verrou de fichier."
842
843 #. type: Plain text
844 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
845 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
846 msgid ""
847 "The first program, I<t_memfd_create.c>, creates a B<tmpfs>(5) file using "
848 "B<memfd_create>(), sets a size for the file, maps it into memory, and "
849 "optionally places some seals on the file. The program accepts up to three "
850 "command-line arguments, of which the first two are required. The first "
851 "argument is the name to associate with the file, the second argument is the "
852 "size to be set for the file, and the optional third argument is a string of "
853 "characters that specify seals to be set on the file."
854 msgstr ""
855 "Le premier programme, I<t_memfd_create.c>, crée un fichier B<tmpfs>(5) en "
856 "utilisant B<memfd_create>(), donne une taille au fichier, le projette en "
857 "mémoire et, en option, pose des verrous sur le fichier. Le programme accepte "
858 "jusqu'à trois paramètres en ligne de commande, dont les deux premiers sont "
859 "requis. Le premier paramètre est le nom à donner au fichier, le deuxième est "
860 "la taille à lui donner, le troisième, optionnel, est une chaîne de "
861 "caractères qui indique les verrous à poser sur le fichier."
862
863 #. type: Plain text
864 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
865 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
866 msgid ""
867 "The second program, I<t_get_seals.c>, can be used to open an existing file "
868 "that was created via B<memfd_create>() and inspect the set of seals that "
869 "have been applied to that file."
870 msgstr ""
871 "Le deuxième programme, I<t_get_seals.c>, peut être utilisé pour ouvrir un "
872 "fichier existant créé à l'aide de B<memfd_create>() et examiner les verrous "
873 "qui y sont posés."
874
875 #. type: Plain text
876 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
877 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
878 msgid ""
879 "The following shell session demonstrates the use of these programs. First "
880 "we create a B<tmpfs>(5) file and set some seals on it:"
881 msgstr ""
882 "La session d'interpréteur suivant montre l'utilisation de ces programmes. "
883 "Nous créons d'abord un fichier B<tmpfs>(5) et nous posons des verrous "
884 "dessus :"
885
886 #. type: Plain text
887 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
888 #: opensuse-tumbleweed
889 #, fuzzy, no-wrap
890 #| msgid ""
891 #| "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
892 #| "[1] 11775\n"
893 #| "PID: 11775; fd: 3; /proc/11775/fd/3\n"
894 msgid ""
895 "$B< ./t_memfd_create my_memfd_file 4096 sw &>\n"
896 "[1] 11775\n"
897 "PID: 11775;\\& fd: 3;\\& /proc/11775/fd/3\n"
898 msgstr ""
899 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
900 "[1] 11775\n"
901 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
902
903 #. type: Plain text
904 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
905 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
906 msgid ""
907 "At this point, the I<t_memfd_create> program continues to run in the "
908 "background. From another program, we can obtain a file descriptor for the "
909 "file created by B<memfd_create>() by opening the I</proc/>pidI</fd> file "
910 "that corresponds to the file descriptor opened by B<memfd_create>(). Using "
911 "that pathname, we inspect the content of the I</proc/>pidI</fd> symbolic "
912 "link, and use our I<t_get_seals> program to view the seals that have been "
913 "placed on the file:"
914 msgstr ""
915 "À ce moment, le programme I<t_memfd_create> continue à s'exécuter en tâche "
916 "de fond. À partir d'un autre programme, nous pouvons obtenir un descripteur "
917 "de fichier pour le fichier créé par B<memfd_create>() en ouvrant I</proc/"
918 ">pidI</fd> qui correspond au descripteur de fichier ouvert par "
919 "B<memfd_create>(). En utilisant ce chemin, nous examinons le contenu du lien "
920 "symbolique I</proc/>pidI</fd> et nous utilisons notre programme "
921 "I<t_get_seals> pour voir les verrous posés sur le fichier :"
922
923 #. type: Plain text
924 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
925 #: opensuse-tumbleweed
926 #, fuzzy, no-wrap
927 #| msgid ""
928 #| "$ B<readlink /proc/11775/fd/3>\n"
929 #| "/memfd:my_memfd_file (deleted)\n"
930 #| "$ B<./t_get_seals /proc/11775/fd/3>\n"
931 #| "Existing seals: WRITE SHRINK\n"
932 msgid ""
933 "$B< readlink /proc/11775/fd/3>;\n"
934 "/memfd:my_memfd_file (deleted)\n"
935 "$B< ./t_get_seals /proc/11775/fd/3>;\n"
936 "Existing seals: WRITE SHRINK\n"
937 msgstr ""
938 "$ B<readlink /proc/11775/fd/3>\n"
939 "/memfd:my_memfd_file (deleted)\n"
940 "$ B<./t_get_seals /proc/11775/fd/3>\n"
941 "Verrous existants : WRITE SHRINK\n"
942
943 #. type: SS
944 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
945 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
946 #, no-wrap
947 msgid "Program source: t_memfd_create.c"
948 msgstr "Source du programme : t_memfd_create.c"
949
950 #. type: Plain text
951 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
952 #: opensuse-tumbleweed
953 #, fuzzy, no-wrap
954 #| msgid ""
955 #| "#define _GNU_SOURCE\n"
956 #| "#include E<lt>err.hE<gt>\n"
957 #| "#include E<lt>fcntl.hE<gt>\n"
958 #| "#include E<lt>stdint.hE<gt>\n"
959 #| "#include E<lt>stdio.hE<gt>\n"
960 #| "#include E<lt>stdlib.hE<gt>\n"
961 #| "#include E<lt>string.hE<gt>\n"
962 #| "#include E<lt>sys/mman.hE<gt>\n"
963 #| "#include E<lt>sys/types.hE<gt>\n"
964 #| "#include E<lt>unistd.hE<gt>\n"
965 #| "\\&\n"
966 #| "int\n"
967 #| "main(int argc, char *argv[])\n"
968 #| "{\n"
969 #| " int fd;\n"
970 #| " char *name, *seals_arg;\n"
971 #| " ssize_t size;\n"
972 #| " unsigned int seals;\n"
973 #| "\\&\n"
974 #| " if (argc E<lt> 3) {\n"
975 #| " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
976 #| " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] can contain any of the \"\n"
977 #| " \"following characters:\\[rs]n\");\n"
978 #| " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
979 #| " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
980 #| " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
981 #| " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
982 #| " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
983 #| " exit(EXIT_FAILURE);\n"
984 #| " }\n"
985 #| "\\&\n"
986 #| " name = argv[1];\n"
987 #| " size = atoi(argv[2]);\n"
988 #| " seals_arg = argv[3];\n"
989 #| "\\&\n"
990 #| " /* Create an anonymous file in tmpfs; allow seals to be\n"
991 #| " placed on the file. */\n"
992 #| "\\&\n"
993 #| " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
994 #| " if (fd == -1)\n"
995 #| " err(EXIT_FAILURE, \"memfd_create\");\n"
996 #| "\\&\n"
997 #| " /* Size the file as specified on the command line. */\n"
998 #| "\\&\n"
999 #| " if (ftruncate(fd, size) == -1)\n"
1000 #| " err(EXIT_FAILURE, \"truncate\");\n"
1001 #| "\\&\n"
1002 #| " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1003 #| " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1004 #| "\\&\n"
1005 #| " /* Code to map the file and populate the mapping with data\n"
1006 #| " omitted. */\n"
1007 #| "\\&\n"
1008 #| " /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
1009 #| " seals on the file. */\n"
1010 #| "\\&\n"
1011 #| " if (seals_arg != NULL) {\n"
1012 #| " seals = 0;\n"
1013 #| "\\&\n"
1014 #| " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1015 #| " seals |= F_SEAL_GROW;\n"
1016 #| " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1017 #| " seals |= F_SEAL_SHRINK;\n"
1018 #| " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1019 #| " seals |= F_SEAL_WRITE;\n"
1020 #| " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1021 #| " seals |= F_SEAL_FUTURE_WRITE;\n"
1022 #| " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1023 #| " seals |= F_SEAL_SEAL;\n"
1024 #| "\\&\n"
1025 #| " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1026 #| " err(EXIT_FAILURE, \"fcntl\");\n"
1027 #| " }\n"
1028 #| "\\&\n"
1029 #| " /* Keep running, so that the file created by memfd_create()\n"
1030 #| " continues to exist. */\n"
1031 #| "\\&\n"
1032 #| " pause();\n"
1033 #| "\\&\n"
1034 #| " exit(EXIT_SUCCESS);\n"
1035 #| "}\n"
1036 msgid ""
1037 "#define _GNU_SOURCE\n"
1038 "#include E<lt>err.hE<gt>\n"
1039 "#include E<lt>fcntl.hE<gt>\n"
1040 "#include E<lt>stdint.hE<gt>\n"
1041 "#include E<lt>stdio.hE<gt>\n"
1042 "#include E<lt>stdlib.hE<gt>\n"
1043 "#include E<lt>string.hE<gt>\n"
1044 "#include E<lt>sys/mman.hE<gt>\n"
1045 "#include E<lt>sys/types.hE<gt>\n"
1046 "#include E<lt>unistd.hE<gt>\n"
1047 "\\&\n"
1048 "int\n"
1049 "main(int argc, char *argv[])\n"
1050 "{\n"
1051 " int fd;\n"
1052 " char *name, *seals_arg;\n"
1053 " ssize_t size;\n"
1054 " unsigned int seals;\n"
1055 "\\&\n"
1056 " if (argc E<lt> 3) {\n"
1057 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
1058 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] can contain any of the \"\n"
1059 " \"following characters:\\[rs]n\");\n"
1060 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
1061 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
1062 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
1063 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
1064 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
1065 " exit(EXIT_FAILURE);\n"
1066 " }\n"
1067 "\\&\n"
1068 " name = argv[1];\n"
1069 " size = atoi(argv[2]);\n"
1070 " seals_arg = argv[3];\n"
1071 "\\&\n"
1072 " /* Create an anonymous file in tmpfs; allow seals to be\n"
1073 " placed on the file. */\n"
1074 "\\&\n"
1075 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
1076 " if (fd == -1)\n"
1077 " err(EXIT_FAILURE, \"memfd_create\");\n"
1078 "\\&\n"
1079 " /* Size the file as specified on the command line. */\n"
1080 "\\&\n"
1081 " if (ftruncate(fd, size) == -1)\n"
1082 " err(EXIT_FAILURE, \"truncate\");\n"
1083 "\\&\n"
1084 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1085 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1086 "\\&\n"
1087 " /* Code to map the file and populate the mapping with data\n"
1088 " omitted. */\n"
1089 "\\&\n"
1090 " /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
1091 " seals on the file. */\n"
1092 "\\&\n"
1093 " if (seals_arg != NULL) {\n"
1094 " seals = 0;\n"
1095 "\\&\n"
1096 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1097 " seals |= F_SEAL_GROW;\n"
1098 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1099 " seals |= F_SEAL_SHRINK;\n"
1100 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1101 " seals |= F_SEAL_WRITE;\n"
1102 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1103 " seals |= F_SEAL_FUTURE_WRITE;\n"
1104 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1105 " seals |= F_SEAL_SEAL;\n"
1106 "\\&\n"
1107 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1108 " err(EXIT_FAILURE, \"fcntl\");\n"
1109 " }\n"
1110 "\\&\n"
1111 " /* Keep running, so that the file created by memfd_create()\n"
1112 " continues to exist. */\n"
1113 "\\&\n"
1114 " pause();\n"
1115 "\\&\n"
1116 " exit(EXIT_SUCCESS);\n"
1117 "}\n"
1118 msgstr ""
1119 "#define _GNU_SOURCE\n"
1120 "#include E<lt>err.hE<gt>\n"
1121 "#include E<lt>fcntl.hE<gt>\n"
1122 "#include E<lt>stdint.hE<gt>\n"
1123 "#include E<lt>stdio.hE<gt>\n"
1124 "#include E<lt>stdlib.hE<gt>\n"
1125 "#include E<lt>string.hE<gt>\n"
1126 "#include E<lt>sys/mman.hE<gt>\n"
1127 "#include E<lt>sys/types.hE<gt>\n"
1128 "#include E<lt>unistd.hE<gt>\n"
1129 "\\&\n"
1130 "int\n"
1131 "main(int argc, char *argv[])\n"
1132 "{\n"
1133 " int fd;\n"
1134 " char *name, *seals_arg;\n"
1135 " ssize_t len;\n"
1136 " unsigned int seals;\n"
1137 "\\&\n"
1138 " if (argc E<lt> 3) {\n"
1139 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
1140 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] peut contenir un des \"\n"
1141 " \"caractères suivants :\\[rs]n\");\n"
1142 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
1143 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
1144 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
1145 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
1146 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
1147 " exit(EXIT_FAILURE);\n"
1148 " }\n"
1149 "\\&\n"
1150 " name = argv[1];\n"
1151 " len = atoi(argv[2]);\n"
1152 " seals_arg = argv[3];\n"
1153 "\\&\n"
1154 " /* Créer un fichier anonyme dans tmpfs ; permet de poser\n"
1155 " des verrous sur le fichier. */\n"
1156 "\\&\n"
1157 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
1158 " if (fd == -1)\n"
1159 " err(EXIT_FAILURE, \"memfd_create\");\n"
1160 "\\&\n"
1161 " /* Taille du fichier indiquée sur la ligne de commande. */\n"
1162 "\\&\n"
1163 " if (ftruncate(fd, len) == -1)\n"
1164 " err(EXIT_FAILURE, \"truncate\");\n"
1165 "\\&\n"
1166 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1167 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1168 "\\&\n"
1169 " /* Code pour projeter le fichier et remplir la projection\n"
1170 " avec des données omises. */\n"
1171 "\\&\n"
1172 " /* Si un paramètre \\[aq]seals\\[aq] de la ligne de commande est fourni,\n"
1173 " poser des verrous sur le fichier. */\n"
1174 "\\&\n"
1175 " if (seals_arg != NULL) {\n"
1176 " seals = 0;\n"
1177 "\\&\n"
1178 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1179 " seals |= F_SEAL_GROW;\n"
1180 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1181 " seals |= F_SEAL_SHRINK;\n"
1182 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1183 " seals |= F_SEAL_WRITE;\n"
1184 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1185 " seals |= F_SEAL_FUTURE_WRITE;\n"
1186 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1187 " seals |= F_SEAL_SEAL;\n"
1188 "\\&\n"
1189 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1190 " err(EXIT_FAILURE, \"fcntl\");\n"
1191 " }\n"
1192 "\\&\n"
1193 " /* Continuer l’exécution pour que le fichier créé par\n"
1194 " memfd_create() continue à exister. */\n"
1195 "\\&\n"
1196 " pause();\n"
1197 "\\&\n"
1198 " exit(EXIT_SUCCESS);\n"
1199 "}\n"
1200
1201 #. SRC END
1202 #. type: SS
1203 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1204 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1205 #, no-wrap
1206 msgid "Program source: t_get_seals.c"
1207 msgstr "Source du programme : t_get_seals.c"
1208
1209 #. type: Plain text
1210 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1211 #: opensuse-tumbleweed
1212 #, fuzzy, no-wrap
1213 #| msgid ""
1214 #| "#define _GNU_SOURCE\n"
1215 #| "#include E<lt>err.hE<gt>\n"
1216 #| "#include E<lt>fcntl.hE<gt>\n"
1217 #| "#include E<lt>stdio.hE<gt>\n"
1218 #| "#include E<lt>stdlib.hE<gt>\n"
1219 #| "\\&\n"
1220 #| "int\n"
1221 #| "main(int argc, char *argv[])\n"
1222 #| "{\n"
1223 #| " int fd;\n"
1224 #| " unsigned int seals;\n"
1225 #| "\\&\n"
1226 #| " if (argc != 2) {\n"
1227 #| " fprintf(stderr, \"%s /proc/PID/fd/FD\\[rs]n\", argv[0]);\n"
1228 #| " exit(EXIT_FAILURE);\n"
1229 #| " }\n"
1230 #| "\\&\n"
1231 #| " fd = open(argv[1], O_RDWR);\n"
1232 #| " if (fd == -1)\n"
1233 #| " err(EXIT_FAILURE, \"open\");\n"
1234 #| "\\&\n"
1235 #| " seals = fcntl(fd, F_GET_SEALS);\n"
1236 #| " if (seals == -1)\n"
1237 #| " err(EXIT_FAILURE, \"fcntl\");\n"
1238 #| "\\&\n"
1239 #| " printf(\"Existing seals:\");\n"
1240 #| " if (seals & F_SEAL_SEAL)\n"
1241 #| " printf(\" SEAL\");\n"
1242 #| " if (seals & F_SEAL_GROW)\n"
1243 #| " printf(\" GROW\");\n"
1244 #| " if (seals & F_SEAL_WRITE)\n"
1245 #| " printf(\" WRITE\");\n"
1246 #| " if (seals & F_SEAL_FUTURE_WRITE)\n"
1247 #| " printf(\" FUTURE_WRITE\");\n"
1248 #| " if (seals & F_SEAL_SHRINK)\n"
1249 #| " printf(\" SHRINK\");\n"
1250 #| " printf(\"\\[rs]n\");\n"
1251 #| "\\&\n"
1252 #| " /* Code to map the file and access the contents of the\n"
1253 #| " resulting mapping omitted. */\n"
1254 #| "\\&\n"
1255 #| " exit(EXIT_SUCCESS);\n"
1256 #| "}\n"
1257 msgid ""
1258 "#define _GNU_SOURCE\n"
1259 "#include E<lt>err.hE<gt>\n"
1260 "#include E<lt>fcntl.hE<gt>\n"
1261 "#include E<lt>stdio.hE<gt>\n"
1262 "#include E<lt>stdlib.hE<gt>\n"
1263 "\\&\n"
1264 "int\n"
1265 "main(int argc, char *argv[])\n"
1266 "{\n"
1267 " int fd;\n"
1268 " unsigned int seals;\n"
1269 "\\&\n"
1270 " if (argc != 2) {\n"
1271 " fprintf(stderr, \"%s /proc/PID/fd/FD\\[rs]n\", argv[0]);\n"
1272 " exit(EXIT_FAILURE);\n"
1273 " }\n"
1274 "\\&\n"
1275 " fd = open(argv[1], O_RDWR);\n"
1276 " if (fd == -1)\n"
1277 " err(EXIT_FAILURE, \"open\");\n"
1278 "\\&\n"
1279 " seals = fcntl(fd, F_GET_SEALS);\n"
1280 " if (seals == -1)\n"
1281 " err(EXIT_FAILURE, \"fcntl\");\n"
1282 "\\&\n"
1283 " printf(\"Existing seals:\");\n"
1284 " if (seals & F_SEAL_SEAL)\n"
1285 " printf(\" SEAL\");\n"
1286 " if (seals & F_SEAL_GROW)\n"
1287 " printf(\" GROW\");\n"
1288 " if (seals & F_SEAL_WRITE)\n"
1289 " printf(\" WRITE\");\n"
1290 " if (seals & F_SEAL_FUTURE_WRITE)\n"
1291 " printf(\" FUTURE_WRITE\");\n"
1292 " if (seals & F_SEAL_SHRINK)\n"
1293 " printf(\" SHRINK\");\n"
1294 " printf(\"\\[rs]n\");\n"
1295 "\\&\n"
1296 " /* Code to map the file and access the contents of the\n"
1297 " resulting mapping omitted. */\n"
1298 "\\&\n"
1299 " exit(EXIT_SUCCESS);\n"
1300 "}\n"
1301 msgstr ""
1302 "#define _GNU_SOURCE\n"
1303 "#include E<lt>err.hE<gt>\n"
1304 "#include E<lt>fcntl.hE<gt>\n"
1305 "#include E<lt>stdio.hE<gt>\n"
1306 "#include E<lt>stdlib.hE<gt>\n"
1307 "\\&\n"
1308 "int\n"
1309 "main(int argc, char *argv[])\n"
1310 "{\n"
1311 " int fd;\n"
1312 " unsigned int seals;\n"
1313 "\\&\n"
1314 " if (argc != 2) {\n"
1315 " fprintf(stderr, \"%s /proc/PID/fd/FD\\[rs]n\", argv[0]);\n"
1316 " exit(EXIT_FAILURE);\n"
1317 " }\n"
1318 "\\&\n"
1319 " fd = open(argv[1], O_RDWR);\n"
1320 " if (fd == -1)\n"
1321 " err(EXIT_FAILURE, \"open\");\n"
1322 "\\&\n"
1323 " seals = fcntl(fd, F_GET_SEALS);\n"
1324 " if (seals == -1)\n"
1325 " err(EXIT_FAILURE, \"fcntl\");\n"
1326 "\\&\n"
1327 " printf(\"Verrous existants :\");\n"
1328 " if (seals & F_SEAL_SEAL)\n"
1329 " printf(\" SEAL\");\n"
1330 " if (seals & F_SEAL_GROW)\n"
1331 " printf(\" GROW\");\n"
1332 " if (seals & F_SEAL_WRITE)\n"
1333 " printf(\" WRITE\");\n"
1334 " if (seals & F_SEAL_FUTURE_WRITE)\n"
1335 " printf(\" FUTURE_WRITE\");\n"
1336 " if (seals & F_SEAL_SHRINK)\n"
1337 " printf(\" SHRINK\");\n"
1338 " printf(\"\\[rs]n\");\n"
1339 "\\&\n"
1340 " /* Code pour associer le fichier et l'accès au contenu de la\n"
1341 " projection résultante omise. */\n"
1342 "\\&\n"
1343 " exit(EXIT_SUCCESS);\n"
1344 "}\n"
1345
1346 #. SRC END
1347 #. type: SH
1348 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1349 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1350 #, no-wrap
1351 msgid "SEE ALSO"
1352 msgstr "VOIR AUSSI"
1353
1354 #. type: Plain text
1355 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1356 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1357 msgid ""
1358 "B<fcntl>(2), B<ftruncate>(2), B<memfd_secret>(2), B<mmap>(2), B<shmget>(2), "
1359 "B<shm_open>(3)"
1360 msgstr ""
1361 "B<fcntl>(2), B<ftruncate>(2), B<memfd_secret>(2), B<mmap>(2), B<shmget>(2), "
1362 "B<shm_open>(3)"
1363
1364 #. type: TH
1365 #: debian-trixie
1366 #, no-wrap
1367 msgid "2024-06-15"
1368 msgstr "15 juin 2024"
1369
1370 #. type: TH
1371 #: debian-trixie
1372 #, no-wrap
1373 msgid "Linux man-pages 6.9.1"
1374 msgstr "Pages du manuel de Linux 6.9.1"
1375
1376 #. type: Plain text
1377 #: debian-trixie
1378 msgid "Standard C library (I<libc>, I<-lc>)"
1379 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
1380
1381 #. type: Plain text
1382 #: debian-trixie fedora-44 fedora-rawhide
1383 msgid ""
1384 "The B<MFD_HUGETLB> flag was specified, but the caller was not privileged "
1385 "(did not have the B<CAP_IPC_LOCK> capability) and is not a member of the "
1386 "I<sysctl_hugetlb_shm_group> group; see the description of I</proc/sys/vm/"
1387 "sysctl_hugetlb_shm_group> in B<proc>(5)."
1388 msgstr ""
1389 "L'attribut B<MFD_HUGETLB> a été spécifié, mais l'appelant n'est pas un "
1390 "utilisateur privilégié (il n'a pas la capacité B<CAP_IPC_LOCK>) et il n'est "
1391 "pas membre du groupe I<sysctl_hugetlb_shm_group> ; consultez la description "
1392 "de I</proc/sys/vm/sysctl_hugetlb_shm_group> dans B<proc>(5)."
1393
1394 #. type: Plain text
1395 #: debian-trixie fedora-44 fedora-rawhide
1396 #, no-wrap
1397 msgid ""
1398 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
1399 "[1] 11775\n"
1400 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
1401 msgstr ""
1402 "$ B<./t_memfd_create my_memfd_file 4096 sw &>\n"
1403 "[1] 11775\n"
1404 "PID: 11775; fd: 3; /proc/11775/fd/3\n"
1405
1406 #. type: Plain text
1407 #: debian-trixie fedora-44 fedora-rawhide
1408 #, no-wrap
1409 msgid ""
1410 "$ B<readlink /proc/11775/fd/3>\n"
1411 "/memfd:my_memfd_file (deleted)\n"
1412 "$ B<./t_get_seals /proc/11775/fd/3>\n"
1413 "Existing seals: WRITE SHRINK\n"
1414 msgstr ""
1415 "$ B<readlink /proc/11775/fd/3>\n"
1416 "/memfd:my_memfd_file (deleted)\n"
1417 "$ B<./t_get_seals /proc/11775/fd/3>\n"
1418 "Verrous existants : WRITE SHRINK\n"
1419
1420 #. type: Plain text
1421 #: debian-trixie
1422 #, no-wrap
1423 msgid ""
1424 "#define _GNU_SOURCE\n"
1425 "#include E<lt>err.hE<gt>\n"
1426 "#include E<lt>fcntl.hE<gt>\n"
1427 "#include E<lt>stdint.hE<gt>\n"
1428 "#include E<lt>stdio.hE<gt>\n"
1429 "#include E<lt>stdlib.hE<gt>\n"
1430 "#include E<lt>string.hE<gt>\n"
1431 "#include E<lt>sys/mman.hE<gt>\n"
1432 "#include E<lt>sys/types.hE<gt>\n"
1433 "#include E<lt>unistd.hE<gt>\n"
1434 "\\&\n"
1435 "int\n"
1436 "main(int argc, char *argv[])\n"
1437 "{\n"
1438 " int fd;\n"
1439 " char *name, *seals_arg;\n"
1440 " ssize_t len;\n"
1441 " unsigned int seals;\n"
1442 "\\&\n"
1443 " if (argc E<lt> 3) {\n"
1444 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
1445 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] can contain any of the \"\n"
1446 " \"following characters:\\[rs]n\");\n"
1447 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
1448 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
1449 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
1450 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
1451 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
1452 " exit(EXIT_FAILURE);\n"
1453 " }\n"
1454 "\\&\n"
1455 " name = argv[1];\n"
1456 " len = atoi(argv[2]);\n"
1457 " seals_arg = argv[3];\n"
1458 "\\&\n"
1459 " /* Create an anonymous file in tmpfs; allow seals to be\n"
1460 " placed on the file. */\n"
1461 "\\&\n"
1462 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
1463 " if (fd == -1)\n"
1464 " err(EXIT_FAILURE, \"memfd_create\");\n"
1465 "\\&\n"
1466 " /* Size the file as specified on the command line. */\n"
1467 "\\&\n"
1468 " if (ftruncate(fd, len) == -1)\n"
1469 " err(EXIT_FAILURE, \"truncate\");\n"
1470 "\\&\n"
1471 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1472 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1473 "\\&\n"
1474 " /* Code to map the file and populate the mapping with data\n"
1475 " omitted. */\n"
1476 "\\&\n"
1477 " /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
1478 " seals on the file. */\n"
1479 "\\&\n"
1480 " if (seals_arg != NULL) {\n"
1481 " seals = 0;\n"
1482 "\\&\n"
1483 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1484 " seals |= F_SEAL_GROW;\n"
1485 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1486 " seals |= F_SEAL_SHRINK;\n"
1487 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1488 " seals |= F_SEAL_WRITE;\n"
1489 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1490 " seals |= F_SEAL_FUTURE_WRITE;\n"
1491 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1492 " seals |= F_SEAL_SEAL;\n"
1493 "\\&\n"
1494 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1495 " err(EXIT_FAILURE, \"fcntl\");\n"
1496 " }\n"
1497 "\\&\n"
1498 " /* Keep running, so that the file created by memfd_create()\n"
1499 " continues to exist. */\n"
1500 "\\&\n"
1501 " pause();\n"
1502 "\\&\n"
1503 " exit(EXIT_SUCCESS);\n"
1504 "}\n"
1505 msgstr ""
1506 "#define _GNU_SOURCE\n"
1507 "#include E<lt>err.hE<gt>\n"
1508 "#include E<lt>fcntl.hE<gt>\n"
1509 "#include E<lt>stdint.hE<gt>\n"
1510 "#include E<lt>stdio.hE<gt>\n"
1511 "#include E<lt>stdlib.hE<gt>\n"
1512 "#include E<lt>string.hE<gt>\n"
1513 "#include E<lt>sys/mman.hE<gt>\n"
1514 "#include E<lt>sys/types.hE<gt>\n"
1515 "#include E<lt>unistd.hE<gt>\n"
1516 "\\&\n"
1517 "int\n"
1518 "main(int argc, char *argv[])\n"
1519 "{\n"
1520 " int fd;\n"
1521 " char *name, *seals_arg;\n"
1522 " ssize_t len;\n"
1523 " unsigned int seals;\n"
1524 "\\&\n"
1525 " if (argc E<lt> 3) {\n"
1526 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
1527 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] peut contenir un des \"\n"
1528 " \"caractères suivants :\\[rs]n\");\n"
1529 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
1530 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
1531 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
1532 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
1533 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
1534 " exit(EXIT_FAILURE);\n"
1535 " }\n"
1536 "\\&\n"
1537 " name = argv[1];\n"
1538 " len = atoi(argv[2]);\n"
1539 " seals_arg = argv[3];\n"
1540 "\\&\n"
1541 " /* Créer un fichier anonyme dans tmpfs ; permet de poser\n"
1542 " des verrous sur le fichier. */\n"
1543 "\\&\n"
1544 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
1545 " if (fd == -1)\n"
1546 " err(EXIT_FAILURE, \"memfd_create\");\n"
1547 "\\&\n"
1548 " /* Taille du fichier indiquée sur la ligne de commande. */\n"
1549 "\\&\n"
1550 " if (ftruncate(fd, len) == -1)\n"
1551 " err(EXIT_FAILURE, \"truncate\");\n"
1552 "\\&\n"
1553 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1554 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1555 "\\&\n"
1556 " /* Code pour projeter le fichier et remplir la projection\n"
1557 " avec des données omises. */\n"
1558 "\\&\n"
1559 " /* Si un paramètre \\[aq]seals\\[aq] de la ligne de commande est fourni,\n"
1560 " poser des verrous sur le fichier. */\n"
1561 "\\&\n"
1562 " if (seals_arg != NULL) {\n"
1563 " seals = 0;\n"
1564 "\\&\n"
1565 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1566 " seals |= F_SEAL_GROW;\n"
1567 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1568 " seals |= F_SEAL_SHRINK;\n"
1569 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1570 " seals |= F_SEAL_WRITE;\n"
1571 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1572 " seals |= F_SEAL_FUTURE_WRITE;\n"
1573 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1574 " seals |= F_SEAL_SEAL;\n"
1575 "\\&\n"
1576 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1577 " err(EXIT_FAILURE, \"fcntl\");\n"
1578 " }\n"
1579 "\\&\n"
1580 " /* Continuer l’exécution pour que le fichier créé par\n"
1581 " memfd_create() continue à exister. */\n"
1582 "\\&\n"
1583 " pause();\n"
1584 "\\&\n"
1585 " exit(EXIT_SUCCESS);\n"
1586 "}\n"
1587
1588 #. type: Plain text
1589 #: debian-trixie fedora-44 fedora-rawhide
1590 #, no-wrap
1591 msgid ""
1592 "#define _GNU_SOURCE\n"
1593 "#include E<lt>err.hE<gt>\n"
1594 "#include E<lt>fcntl.hE<gt>\n"
1595 "#include E<lt>stdio.hE<gt>\n"
1596 "#include E<lt>stdlib.hE<gt>\n"
1597 "\\&\n"
1598 "int\n"
1599 "main(int argc, char *argv[])\n"
1600 "{\n"
1601 " int fd;\n"
1602 " unsigned int seals;\n"
1603 "\\&\n"
1604 " if (argc != 2) {\n"
1605 " fprintf(stderr, \"%s /proc/PID/fd/FD\\[rs]n\", argv[0]);\n"
1606 " exit(EXIT_FAILURE);\n"
1607 " }\n"
1608 "\\&\n"
1609 " fd = open(argv[1], O_RDWR);\n"
1610 " if (fd == -1)\n"
1611 " err(EXIT_FAILURE, \"open\");\n"
1612 "\\&\n"
1613 " seals = fcntl(fd, F_GET_SEALS);\n"
1614 " if (seals == -1)\n"
1615 " err(EXIT_FAILURE, \"fcntl\");\n"
1616 "\\&\n"
1617 " printf(\"Existing seals:\");\n"
1618 " if (seals & F_SEAL_SEAL)\n"
1619 " printf(\" SEAL\");\n"
1620 " if (seals & F_SEAL_GROW)\n"
1621 " printf(\" GROW\");\n"
1622 " if (seals & F_SEAL_WRITE)\n"
1623 " printf(\" WRITE\");\n"
1624 " if (seals & F_SEAL_FUTURE_WRITE)\n"
1625 " printf(\" FUTURE_WRITE\");\n"
1626 " if (seals & F_SEAL_SHRINK)\n"
1627 " printf(\" SHRINK\");\n"
1628 " printf(\"\\[rs]n\");\n"
1629 "\\&\n"
1630 " /* Code to map the file and access the contents of the\n"
1631 " resulting mapping omitted. */\n"
1632 "\\&\n"
1633 " exit(EXIT_SUCCESS);\n"
1634 "}\n"
1635 msgstr ""
1636 "#define _GNU_SOURCE\n"
1637 "#include E<lt>err.hE<gt>\n"
1638 "#include E<lt>fcntl.hE<gt>\n"
1639 "#include E<lt>stdio.hE<gt>\n"
1640 "#include E<lt>stdlib.hE<gt>\n"
1641 "\\&\n"
1642 "int\n"
1643 "main(int argc, char *argv[])\n"
1644 "{\n"
1645 " int fd;\n"
1646 " unsigned int seals;\n"
1647 "\\&\n"
1648 " if (argc != 2) {\n"
1649 " fprintf(stderr, \"%s /proc/PID/fd/FD\\[rs]n\", argv[0]);\n"
1650 " exit(EXIT_FAILURE);\n"
1651 " }\n"
1652 "\\&\n"
1653 " fd = open(argv[1], O_RDWR);\n"
1654 " if (fd == -1)\n"
1655 " err(EXIT_FAILURE, \"open\");\n"
1656 "\\&\n"
1657 " seals = fcntl(fd, F_GET_SEALS);\n"
1658 " if (seals == -1)\n"
1659 " err(EXIT_FAILURE, \"fcntl\");\n"
1660 "\\&\n"
1661 " printf(\"Verrous existants :\");\n"
1662 " if (seals & F_SEAL_SEAL)\n"
1663 " printf(\" SEAL\");\n"
1664 " if (seals & F_SEAL_GROW)\n"
1665 " printf(\" GROW\");\n"
1666 " if (seals & F_SEAL_WRITE)\n"
1667 " printf(\" WRITE\");\n"
1668 " if (seals & F_SEAL_FUTURE_WRITE)\n"
1669 " printf(\" FUTURE_WRITE\");\n"
1670 " if (seals & F_SEAL_SHRINK)\n"
1671 " printf(\" SHRINK\");\n"
1672 " printf(\"\\[rs]n\");\n"
1673 "\\&\n"
1674 " /* Code pour associer le fichier et l'accès au contenu de la\n"
1675 " projection résultante omise. */\n"
1676 "\\&\n"
1677 " exit(EXIT_SUCCESS);\n"
1678 "}\n"
1679
1680 #. type: TH
1681 #: fedora-44 fedora-rawhide
1682 #, no-wrap
1683 msgid "2024-11-17"
1684 msgstr "17 novembre 2024"
1685
1686 #. type: TH
1687 #: fedora-44 fedora-rawhide
1688 #, no-wrap
1689 msgid "Linux man-pages 6.13"
1690 msgstr "Pages du manuel de Linux 6.13"
1691
1692 #. type: Plain text
1693 #: fedora-44 fedora-rawhide
1694 #, no-wrap
1695 msgid ""
1696 "#define _GNU_SOURCE\n"
1697 "#include E<lt>err.hE<gt>\n"
1698 "#include E<lt>fcntl.hE<gt>\n"
1699 "#include E<lt>stdint.hE<gt>\n"
1700 "#include E<lt>stdio.hE<gt>\n"
1701 "#include E<lt>stdlib.hE<gt>\n"
1702 "#include E<lt>string.hE<gt>\n"
1703 "#include E<lt>sys/mman.hE<gt>\n"
1704 "#include E<lt>sys/types.hE<gt>\n"
1705 "#include E<lt>unistd.hE<gt>\n"
1706 "\\&\n"
1707 "int\n"
1708 "main(int argc, char *argv[])\n"
1709 "{\n"
1710 " int fd;\n"
1711 " char *name, *seals_arg;\n"
1712 " ssize_t size;\n"
1713 " unsigned int seals;\n"
1714 "\\&\n"
1715 " if (argc E<lt> 3) {\n"
1716 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
1717 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] can contain any of the \"\n"
1718 " \"following characters:\\[rs]n\");\n"
1719 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
1720 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
1721 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
1722 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
1723 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
1724 " exit(EXIT_FAILURE);\n"
1725 " }\n"
1726 "\\&\n"
1727 " name = argv[1];\n"
1728 " size = atoi(argv[2]);\n"
1729 " seals_arg = argv[3];\n"
1730 "\\&\n"
1731 " /* Create an anonymous file in tmpfs; allow seals to be\n"
1732 " placed on the file. */\n"
1733 "\\&\n"
1734 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
1735 " if (fd == -1)\n"
1736 " err(EXIT_FAILURE, \"memfd_create\");\n"
1737 "\\&\n"
1738 " /* Size the file as specified on the command line. */\n"
1739 "\\&\n"
1740 " if (ftruncate(fd, size) == -1)\n"
1741 " err(EXIT_FAILURE, \"truncate\");\n"
1742 "\\&\n"
1743 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1744 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1745 "\\&\n"
1746 " /* Code to map the file and populate the mapping with data\n"
1747 " omitted. */\n"
1748 "\\&\n"
1749 " /* If a \\[aq]seals\\[aq] command-line argument was supplied, set some\n"
1750 " seals on the file. */\n"
1751 "\\&\n"
1752 " if (seals_arg != NULL) {\n"
1753 " seals = 0;\n"
1754 "\\&\n"
1755 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1756 " seals |= F_SEAL_GROW;\n"
1757 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1758 " seals |= F_SEAL_SHRINK;\n"
1759 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1760 " seals |= F_SEAL_WRITE;\n"
1761 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1762 " seals |= F_SEAL_FUTURE_WRITE;\n"
1763 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1764 " seals |= F_SEAL_SEAL;\n"
1765 "\\&\n"
1766 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1767 " err(EXIT_FAILURE, \"fcntl\");\n"
1768 " }\n"
1769 "\\&\n"
1770 " /* Keep running, so that the file created by memfd_create()\n"
1771 " continues to exist. */\n"
1772 "\\&\n"
1773 " pause();\n"
1774 "\\&\n"
1775 " exit(EXIT_SUCCESS);\n"
1776 "}\n"
1777 msgstr ""
1778 "#define _GNU_SOURCE\n"
1779 "#include E<lt>err.hE<gt>\n"
1780 "#include E<lt>fcntl.hE<gt>\n"
1781 "#include E<lt>stdint.hE<gt>\n"
1782 "#include E<lt>stdio.hE<gt>\n"
1783 "#include E<lt>stdlib.hE<gt>\n"
1784 "#include E<lt>string.hE<gt>\n"
1785 "#include E<lt>sys/mman.hE<gt>\n"
1786 "#include E<lt>sys/types.hE<gt>\n"
1787 "#include E<lt>unistd.hE<gt>\n"
1788 "\\&\n"
1789 "int\n"
1790 "main(int argc, char *argv[])\n"
1791 "{\n"
1792 " int fd;\n"
1793 " char *name, *seals_arg;\n"
1794 " ssize_t len;\n"
1795 " unsigned int seals;\n"
1796 "\\&\n"
1797 " if (argc E<lt> 3) {\n"
1798 " fprintf(stderr, \"%s name size [seals]\\[rs]n\", argv[0]);\n"
1799 " fprintf(stderr, \"\\[rs]t\\[aq]seals\\[aq] peut contenir un des \"\n"
1800 " \"caractères suivants :\\[rs]n\");\n"
1801 " fprintf(stderr, \"\\[rs]t\\[rs]tg - F_SEAL_GROW\\[rs]n\");\n"
1802 " fprintf(stderr, \"\\[rs]t\\[rs]ts - F_SEAL_SHRINK\\[rs]n\");\n"
1803 " fprintf(stderr, \"\\[rs]t\\[rs]tw - F_SEAL_WRITE\\[rs]n\");\n"
1804 " fprintf(stderr, \"\\[rs]t\\[rs]tW - F_SEAL_FUTURE_WRITE\\[rs]n\");\n"
1805 " fprintf(stderr, \"\\[rs]t\\[rs]tS - F_SEAL_SEAL\\[rs]n\");\n"
1806 " exit(EXIT_FAILURE);\n"
1807 " }\n"
1808 "\\&\n"
1809 " name = argv[1];\n"
1810 " len = atoi(argv[2]);\n"
1811 " seals_arg = argv[3];\n"
1812 "\\&\n"
1813 " /* Créer un fichier anonyme dans tmpfs ; permet de poser\n"
1814 " des verrous sur le fichier. */\n"
1815 "\\&\n"
1816 " fd = memfd_create(name, MFD_ALLOW_SEALING);\n"
1817 " if (fd == -1)\n"
1818 " err(EXIT_FAILURE, \"memfd_create\");\n"
1819 "\\&\n"
1820 " /* Taille du fichier indiquée sur la ligne de commande. */\n"
1821 "\\&\n"
1822 " if (ftruncate(fd, len) == -1)\n"
1823 " err(EXIT_FAILURE, \"truncate\");\n"
1824 "\\&\n"
1825 " printf(\"PID: %jd; fd: %d; /proc/%jd/fd/%d\\[rs]n\",\n"
1826 " (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);\n"
1827 "\\&\n"
1828 " /* Code pour projeter le fichier et remplir la projection\n"
1829 " avec des données omises. */\n"
1830 "\\&\n"
1831 " /* Si un paramètre \\[aq]seals\\[aq] de la ligne de commande est fourni,\n"
1832 " poser des verrous sur le fichier. */\n"
1833 "\\&\n"
1834 " if (seals_arg != NULL) {\n"
1835 " seals = 0;\n"
1836 "\\&\n"
1837 " if (strchr(seals_arg, \\[aq]g\\[aq]) != NULL)\n"
1838 " seals |= F_SEAL_GROW;\n"
1839 " if (strchr(seals_arg, \\[aq]s\\[aq]) != NULL)\n"
1840 " seals |= F_SEAL_SHRINK;\n"
1841 " if (strchr(seals_arg, \\[aq]w\\[aq]) != NULL)\n"
1842 " seals |= F_SEAL_WRITE;\n"
1843 " if (strchr(seals_arg, \\[aq]W\\[aq]) != NULL)\n"
1844 " seals |= F_SEAL_FUTURE_WRITE;\n"
1845 " if (strchr(seals_arg, \\[aq]S\\[aq]) != NULL)\n"
1846 " seals |= F_SEAL_SEAL;\n"
1847 "\\&\n"
1848 " if (fcntl(fd, F_ADD_SEALS, seals) == -1)\n"
1849 " err(EXIT_FAILURE, \"fcntl\");\n"
1850 " }\n"
1851 "\\&\n"
1852 " /* Continuer l’exécution pour que le fichier créé par\n"
1853 " memfd_create() continue à exister. */\n"
1854 "\\&\n"
1855 " pause();\n"
1856 "\\&\n"
1857 " exit(EXIT_SUCCESS);\n"
1858 "}\n"
1859
1860 #. type: TH
1861 #: mageia-cauldron
1862 #, no-wrap
1863 msgid "Linux man-pages 6.17"
1864 msgstr "Pages du manuel de Linux 6.17"
1865
1866 #. type: TH
1867 #: opensuse-leap-16-1 opensuse-tumbleweed
1868 #, no-wrap
1869 msgid "Linux man-pages (unreleased)"
1870 msgstr "Pages du manuel de Linux (non publiées)"