Debian Codegraph @

po/ru/man7/unix.7.po

raw
1 # Russian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Azamat Hackimov <[email protected]>, 2013, 2016.
5 # Dmitriy Ovchinnikov <[email protected]>, 2012.
6 # Dmitry Bolkhovskikh <[email protected]>, 2017.
7 # Katrin Kutepova <[email protected]>, 2018.
8 # Yuri Kozlov <[email protected]>, 2011-2019.
9 # Иван Павлов <[email protected]>, 2017.
10 msgid ""
11 msgstr ""
12 "Project-Id-Version: manpages-l10n\n"
13 "POT-Creation-Date: 2026-06-05 06:50+0200\n"
14 "PO-Revision-Date: 2024-12-21 19:50+0300\n"
15 "Last-Translator: Yuri Kozlov <[email protected]>\n"
16 "Language-Team: Russian <[email protected]>\n"
17 "Language: ru\n"
18 "MIME-Version: 1.0\n"
19 "Content-Type: text/plain; charset=UTF-8\n"
20 "Content-Transfer-Encoding: 8bit\n"
21 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
22 "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
23 "(n%100>=11 && n%100<=14)? 2 : 3);\n"
24 "X-Generator: Lokalize 2.0\n"
25
26 #. type: TH
27 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
28 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
29 #, no-wrap
30 msgid "UNIX"
31 msgstr "UNIX"
32
33 #. type: TH
34 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
35 #: opensuse-tumbleweed
36 #, no-wrap
37 msgid "2026-02-08"
38 msgstr "8 февраля 2026 г."
39
40 #. type: TH
41 #: archlinux debian-unstable
42 #, fuzzy, no-wrap
43 #| msgid "Linux man-pages 6.17"
44 msgid "Linux man-pages 6.18"
45 msgstr "Справочные страницы Linux 6.17"
46
47 #. type: SH
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 #, no-wrap
51 msgid "NAME"
52 msgstr "НАИМЕНОВАНИЕ"
53
54 #. type: Plain text
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 msgid "unix - sockets for local interprocess communication"
58 msgstr "unix - сокеты для локального межпроцессного взаимодействия"
59
60 #. type: SH
61 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 #, no-wrap
64 msgid "SYNOPSIS"
65 msgstr "СИНТАКСИС"
66
67 #. type: Plain text
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, fuzzy, no-wrap
71 #| msgid ""
72 #| "B<#include E<lt>sys/types.hE<gt>>\n"
73 #| "B<#include E<lt>sys/xattr.hE<gt>>\n"
74 msgid ""
75 "B<#include E<lt>sys/socket.hE<gt>>\n"
76 "B<#include E<lt>sys/un.hE<gt>>\n"
77 msgstr ""
78 "B<#include E<lt>sys/types.hE<gt>>\n"
79 "B<#include E<lt>sys/xattr.hE<gt>>\n"
80
81 #. type: Plain text
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 #, fuzzy, no-wrap
85 #| msgid "I<error>B< = socketpair(AF_UNIX, type, 0, int *>I<sv>B<);>"
86 msgid ""
87 "I<unix_socket>B< = socket(AF_UNIX, type, 0);>\n"
88 "I<error>B< = socketpair(AF_UNIX, type, 0, int *>I<sv>B<);>\n"
89 msgstr "I<error>B< = socketpair(AF_UNIX, type, 0, int *>I<sv>B<);>"
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 #. type: Plain text
99 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
101 msgid ""
102 "The B<AF_UNIX> (also known as B<AF_LOCAL>) socket family is used to "
103 "communicate between processes on the same machine efficiently. "
104 "Traditionally, UNIX domain sockets can be either unnamed, or bound to a "
105 "filesystem pathname (marked as being of type socket). Linux also supports "
106 "an abstract namespace which is independent of the filesystem."
107 msgstr ""
108 "Семейство сокетов B<AF_UNIX> (также известное, как B<AF_LOCAL>) используется "
109 "для эффективного взаимодействия между процессами на одной машине. Доменные "
110 "сокеты UNIX могут быть как безымянными, так и иметь имя файла в файловой "
111 "системе (типизированный сокет). В Linux также поддерживается абстрактное "
112 "пространство имён, которое не зависит от файловой системы."
113
114 #. type: Plain text
115 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
116 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
117 msgid ""
118 "Valid socket types in the UNIX domain are: B<SOCK_STREAM>, for a stream-"
119 "oriented socket; B<SOCK_DGRAM>, for a datagram-oriented socket that "
120 "preserves message boundaries (as on most UNIX implementations, UNIX domain "
121 "datagram sockets are always reliable and don't reorder datagrams); and "
122 "(since Linux 2.6.4) B<SOCK_SEQPACKET>, for a sequenced-packet socket that "
123 "is connection-oriented, preserves message boundaries, and delivers messages "
124 "in the order that they were sent."
125 msgstr ""
126 "Допустимые типы сокета для домена UNIX: потоковый сокет B<SOCK_STREAM>, "
127 "датаграмный сокет B<SOCK_DGRAM>, сохраняющий границы сообщений (в "
128 "большинстве реализаций UNIX, доменные датаграмные сокеты UNIX всегда надёжны "
129 "и не меняют порядок датаграмм); и (начиная с Linux 2.6.4) ориентированный "
130 "на соединение задающий последовательность пакетам сокет B<SOCK_SEQPACKET>, "
131 "сохраняющий границы сообщений и доставляющий сообщения в том же порядке, в "
132 "каком они были отправлены."
133
134 #. type: Plain text
135 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
136 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
137 msgid ""
138 "UNIX domain sockets support passing file descriptors or process credentials "
139 "to other processes using ancillary data."
140 msgstr ""
141 "Доменные сокеты UNIX поддерживают передачу файловых дескрипторов или учётных "
142 "данных (credentials) о процессе другим процессам, используя вспомогательные "
143 "(ancillary) данные."
144
145 #. type: SS
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 #, no-wrap
149 msgid "Address format"
150 msgstr "Формат адреса"
151
152 #. type: Plain text
153 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
154 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
155 msgid "A UNIX domain socket address is represented in the following structure:"
156 msgstr "Адрес доменного сокета UNIX представляет собой следующую структуру:"
157
158 #. #define UNIX_PATH_MAX 108
159 #. type: Plain text
160 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
161 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
162 #, no-wrap
163 msgid ""
164 "struct sockaddr_un {\n"
165 " sa_family_t sun_family; /* AF_UNIX */\n"
166 " char sun_path[108]; /* Pathname */\n"
167 "};\n"
168 msgstr ""
169 "struct sockaddr_un {\n"
170 " sa_family_t sun_family; /* AF_UNIX */\n"
171 " char sun_path[108]; /* имя пути */\n"
172 "};\n"
173
174 #. type: Plain text
175 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
176 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
177 #, fuzzy
178 #| msgid ""
179 #| "The I<sun_family> field always contains B<AF_UNIX>. On Linux, "
180 #| "I<sun_path> is 108 bytes in size; see also NOTES, below."
181 msgid ""
182 "The I<sun_family> field always contains B<AF_UNIX>. On Linux, I<sun_path> "
183 "is 108 bytes in size; see also BUGS, below."
184 msgstr ""
185 "Поле I<sun_family> всегда содержит B<AF_UNIX>. В Linux размер I<sun_path> "
186 "равен 108 байтам; также смотрите ЗАМЕЧАНИЯ ниже."
187
188 #. type: Plain text
189 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
190 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
191 #, fuzzy
192 #| msgid ""
193 #| "Various systems calls (for example, B<bind>(2), B<connect>(2), and "
194 #| "B<sendto>(2)) take a I<sockaddr_un> argument as input. Some other "
195 #| "system calls (for example, B<getsockname>(2), B<getpeername>(2), "
196 #| "B<recvfrom>(2), and B<accept>(2)) return an argument of this type."
197 msgid ""
198 "Various system calls (for example, B<bind>(2), B<connect>(2), and "
199 "B<sendto>(2)) take a I<sockaddr_un> argument as input. Some other system "
200 "calls (for example, B<getsockname>(2), B<getpeername>(2), B<recvfrom>(2), "
201 "and B<accept>(2)) return an argument of this type."
202 msgstr ""
203 "В различных системных вызовах (например, B<bind>(2), B<connect>(2) и "
204 "B<sendto>(2)) в качестве входных данных используется параметр "
205 "I<sockaddr_un>. Другие системные вызовы (например, B<getsockname>(2), "
206 "B<getpeername>(2), B<recvfrom>(2) и B<accept>(2)) возвращают результат в "
207 "параметре этого типа."
208
209 #. type: Plain text
210 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
211 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
212 msgid ""
213 "Three types of address are distinguished in the I<sockaddr_un> structure:"
214 msgstr "В I<sockaddr_un> структуре различают три типа адресов:"
215
216 #. type: TP
217 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
218 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
219 #, no-wrap
220 msgid "pathname"
221 msgstr "pathname (путь)"
222
223 #. type: Plain text
224 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
225 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
226 #, fuzzy
227 #| msgid ""
228 #| "I<pathname>: a UNIX domain socket can be bound to a null-terminated "
229 #| "filesystem pathname using B<bind>(2). When the address of a pathname "
230 #| "socket is returned (by one of the system calls noted above), its length is"
231 msgid ""
232 "a UNIX domain socket can be bound to a null-terminated filesystem pathname "
233 "using B<bind>(2). When the address of a pathname socket is returned (by one "
234 "of the system calls noted above), its length is"
235 msgstr ""
236 "I<с именем пути>: доменный сокет UNIX может быть привязан к имени пути (с "
237 "завершающимся null) в файловой системе с помощью B<bind>(2). При возврате "
238 "адреса имени пути сокета (одним и системных вызовов, упомянутых выше), его "
239 "длина равна"
240
241 #. type: Plain text
242 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
243 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
244 #, fuzzy, no-wrap
245 #| msgid " offsetof(struct sockaddr_un, sun_path) + strlen(sun_path) + 1\n"
246 msgid "offsetof(struct sockaddr_un, sun_path) + strlen(sun_path) + 1\n"
247 msgstr " offsetof(struct sockaddr_un, sun_path) + strlen(sun_path) + 1\n"
248
249 #. type: Plain text
250 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
251 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
252 msgid ""
253 "and I<sun_path> contains the null-terminated pathname. (On Linux, the above "
254 "B<offsetof>() expression equates to the same value as "
255 "I<sizeof(sa_family_t)>, but some other implementations include other fields "
256 "before I<sun_path>, so the B<offsetof>() expression more portably describes "
257 "the size of the address structure.)"
258 msgstr ""
259 "и I<sun_path> содержит путь, оканчивающийся null (в Linux, указанное выше "
260 "выражение B<offsetof>() равно I<sizeof(sa_family_t)>, но в некоторых "
261 "реализациях включаются другие поля перед I<sun_path>, поэтому выражение "
262 "B<offsetof>() описывает размер адресной структуры более переносимым "
263 "способом)."
264
265 #. type: Plain text
266 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
267 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
268 msgid "For further details of pathname sockets, see below."
269 msgstr "Дополнительную информацию о путях сокета смотрите далее."
270
271 #. type: TP
272 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
273 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
274 #, fuzzy, no-wrap
275 #| msgid "username"
276 msgid "unnamed"
277 msgstr "username (имя пользователя)"
278
279 #. There is quite some variation across implementations: FreeBSD
280 #. says the length is 16 bytes, HP-UX 11 says it's zero bytes.
281 #. type: Plain text
282 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
283 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
284 #, fuzzy
285 #| msgid ""
286 #| "I<unnamed>: A stream socket that has not been bound to a pathname using "
287 #| "B<bind>(2) has no name. Likewise, the two sockets created by "
288 #| "B<socketpair>(2) are unnamed. When the address of an unnamed socket is "
289 #| "returned, its length is I<sizeof(sa_family_t)>, and I<sun_path> should "
290 #| "not be inspected."
291 msgid ""
292 "A stream socket that has not been bound to a pathname using B<bind>(2) has "
293 "no name. Likewise, the two sockets created by B<socketpair>(2) are "
294 "unnamed. When the address of an unnamed socket is returned, its length is "
295 "I<sizeof(sa_family_t)>, and I<sun_path> should not be inspected."
296 msgstr ""
297 "I<безымянный>: Потоковый сокет, который не привязан к имени пути с помощью "
298 "B<bind>(), не имеет имени. Аналогично, два сокета, создаваемые "
299 "B<socketpair>(), также не имеют имён. При возврате адреса сокета его длина "
300 "равна I<sizeof(sa_family_t)>, а значение I<sun_path> не используется."
301
302 #. type: TP
303 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
304 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
305 #, no-wrap
306 msgid "abstract"
307 msgstr ""
308
309 #. type: Plain text
310 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
311 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
312 #, fuzzy
313 #| msgid ""
314 #| "I<abstract>: an abstract socket address is distinguished (from a pathname "
315 #| "socket) by the fact that I<sun_path[0]> is a null byte (\\(aq\\e0\\"
316 #| "(aq). The socket's address in this namespace is given by the additional "
317 #| "bytes in I<sun_path> that are covered by the specified length of the "
318 #| "address structure. (Null bytes in the name have no special "
319 #| "significance.) The name has no connection with filesystem pathnames. "
320 #| "When the address of an abstract socket is returned, the returned "
321 #| "I<addrlen> is greater than I<sizeof(sa_family_t)> (i.e., greater than 2), "
322 #| "and the name of the socket is contained in the first I<(addrlen - "
323 #| "sizeof(sa_family_t))> bytes of I<sun_path>."
324 msgid ""
325 "an abstract socket address is distinguished (from a pathname socket) by the "
326 "fact that I<sun_path[0]> is a null byte (\\[aq]\\[rs]0\\[aq]). The socket's "
327 "address in this namespace is given by the additional bytes in I<sun_path> "
328 "that are covered by the specified length of the address structure. (Null "
329 "bytes in the name have no special significance.) The name has no connection "
330 "with filesystem pathnames. When the address of an abstract socket is "
331 "returned, the returned I<addrlen> is greater than I<sizeof(sa_family_t)> "
332 "(i.e., greater than 2), and the name of the socket is contained in the first "
333 "I<(addrlen - sizeof(sa_family_t))> bytes of I<sun_path>."
334 msgstr ""
335 "I<абстрактный>: абстрактный адрес сокета отличается (от имени пути сокета) "
336 "тем, что значением I<sun_path[0]> является байт null (\\(aq\\e0\\(aq). Адрес "
337 "сокета в этом пространстве имён определяется дополнительными байтами в "
338 "I<sun_path>, количество которых определяется длиной указанной структуры "
339 "адреса. Байты null в имени не имеют специального значения. Имя не связано с "
340 "именем пути в файловой системе. При возврате адреса абстрактного сокета "
341 "возвращаемое значение I<addrlen> больше чем I<sizeof(sa_family_t)> (т.е. "
342 "больше 2), а имя сокета содержится в первых I<(addrlen - "
343 "sizeof(sa_family_t))> байтах I<sun_path>."
344
345 #. type: SS
346 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
347 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
348 #, no-wrap
349 msgid "Pathname sockets"
350 msgstr "Путевые сокеты"
351
352 #. type: Plain text
353 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
354 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
355 msgid ""
356 "When binding a socket to a pathname, a few rules should be observed for "
357 "maximum portability and ease of coding:"
358 msgstr ""
359 "При привязке сокета к пути для максимальной переносимости и простоте "
360 "кодирования нужно учесть несколько правил:"
361
362 #. type: IP
363 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
364 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
365 #, no-wrap
366 msgid "\\[bu]"
367 msgstr "\\[bu]"
368
369 #. type: Plain text
370 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
371 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
372 msgid "The pathname in I<sun_path> should be null-terminated."
373 msgstr "Имя пути в I<sun_path> должно завершаться null."
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 "The length of the pathname, including the terminating null byte, should not "
380 "exceed the size of I<sun_path>."
381 msgstr ""
382 "Длина имени пути, включая завершающий байт null, не должна превышать размер "
383 "I<sun_path>."
384
385 #. type: Plain text
386 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
387 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
388 msgid ""
389 "The I<addrlen> argument that describes the enclosing I<sockaddr_un> "
390 "structure should have a value of at least:"
391 msgstr ""
392 "Аргумент I<addrlen>, описывающий включаемую структуру I<sockaddr_un>, должен "
393 "содержать значение, как минимум:"
394
395 #. type: Plain text
396 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
397 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
398 #, fuzzy, no-wrap
399 #| msgid " offsetof(struct sockaddr_un, sun_path)+strlen(addr.sun_path)+1\n"
400 msgid "offsetof(struct sockaddr_un, sun_path)+strlen(addr.sun_path)+1\n"
401 msgstr " offsetof(struct sockaddr_un, sun_path)+strlen(addr.sun_path)+1\n"
402
403 #. type: Plain text
404 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
405 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
406 msgid ""
407 "or, more simply, I<addrlen> can be specified as I<sizeof(struct "
408 "sockaddr_un)>."
409 msgstr ""
410 "или, проще говоря, для I<addrlen> можно использовать I<sizeof(struct "
411 "sockaddr_un)>."
412
413 #. Linux does this, including for the case where the supplied path
414 #. is 108 bytes
415 #. type: Plain text
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 msgid ""
419 "There is some variation in how implementations handle UNIX domain socket "
420 "addresses that do not follow the above rules. For example, some (but not "
421 "all) implementations append a null terminator if none is present in the "
422 "supplied I<sun_path>."
423 msgstr ""
424 "Есть несколько реализаций по работе с адресами доменных сокетов UNIX, "
425 "которые не следуют данным правилам. Например, в некоторых реализациях (но не "
426 "во всех) добавляется конечный null, если если его нет в I<sun_path>."
427
428 #. HP-UX
429 #. Modern BSDs generally have 104, Tru64 and AIX have 104,
430 #. Solaris and Irix have 108
431 #. type: Plain text
432 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
433 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
434 msgid ""
435 "When coding portable applications, keep in mind that some implementations "
436 "have I<sun_path> as short as 92 bytes."
437 msgstr ""
438 "При написании переносимых приложений учтите, что в некоторых реализациях "
439 "размер I<sun_path>равен 92 байтам."
440
441 #. type: Plain text
442 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
443 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
444 msgid ""
445 "Various system calls (B<accept>(2), B<recvfrom>(2), B<getsockname>(2), "
446 "B<getpeername>(2)) return socket address structures. When applied to UNIX "
447 "domain sockets, the value-result I<addrlen> argument supplied to the call "
448 "should be initialized as above. Upon return, the argument is set to "
449 "indicate the I<actual> size of the address structure. The caller should "
450 "check the value returned in this argument: if the output value exceeds the "
451 "input value, then there is no guarantee that a null terminator is present in "
452 "I<sun_path>. (See BUGS.)"
453 msgstr ""
454 "Различные системные вызовы (например, B<accept>(2), B<recvfrom>(2), "
455 "B<getsockname>(2), B<getpeername>(2)) возвращают адресные структуры сокета. "
456 "В случае с доменными сокетами UNIX аргумент значение-результат I<addrlen>, "
457 "передаваемый вызову, должен быть инициализирован как описано выше. При "
458 "возврате в аргументе содержится I<реальный> размер адресной структуры. "
459 "Вызывающий должен проверить полученное значение этого аргумента: если оно "
460 "превышает значение до вызова, то не гарантируется наличие конечного null в "
461 "I<sun_path> (смотрите ДЕФЕКТЫ)."
462
463 #. type: SS
464 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
465 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
466 #, no-wrap
467 msgid "Pathname socket ownership and permissions"
468 msgstr "Пути к сокетам и права"
469
470 #. type: Plain text
471 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
472 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
473 msgid ""
474 "In the Linux implementation, pathname sockets honor the permissions of the "
475 "directory they are in. Creation of a new socket fails if the process does "
476 "not have write and search (execute) permission on the directory in which the "
477 "socket is created."
478 msgstr ""
479 "В реализации Linux учитываются права на каталоги, в которых располагаются "
480 "сокеты. Создание нового сокета завершается ошибкой, если процесс не имеет "
481 "права писать или искать (выполнять) в каталог, в котором создаётся сокет."
482
483 #. type: Plain text
484 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
485 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
486 msgid ""
487 "On Linux, connecting to a stream socket object requires write permission on "
488 "that socket; sending a datagram to a datagram socket likewise requires write "
489 "permission on that socket. POSIX does not make any statement about the "
490 "effect of the permissions on a socket file, and on some systems (e.g., older "
491 "BSDs), the socket permissions are ignored. Portable programs should not "
492 "rely on this feature for security."
493 msgstr ""
494 "В Linux для подключения к объекту потокового сокета требуются права на "
495 "запись в этот сокет; схожим образом, для отправки дейтаграммы в "
496 "дейтаграммный сокет требуются права на запись в этот сокет. В POSIX ничего "
497 "не сказано о влиянии прав файла сокета и в некоторых системах (например, в "
498 "старых BSD) права на сокет игнорируются. Переносимые программы не должны "
499 "полагаться на это свойство для обеспечения безопасности."
500
501 #. type: Plain text
502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
504 msgid ""
505 "When creating a new socket, the owner and group of the socket file are set "
506 "according to the usual rules. The socket file has all permissions enabled, "
507 "other than those that are turned off by the process B<umask>(2)."
508 msgstr ""
509 "При создании нового сокета владелец и группа файла сокета назначаются "
510 "согласно обычных правил. К файлу сокета разрешается любой доступ кроме "
511 "выключенного процессом с помощью B<umask>(2)."
512
513 #. However, fchown() and fchmod() do not seem to have an effect
514 #. type: Plain text
515 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
516 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
517 msgid ""
518 "The owner, group, and permissions of a pathname socket can be changed (using "
519 "B<chown>(2) and B<chmod>(2))."
520 msgstr ""
521 "Владелец, группа и права доступа пути сокета можно изменять (с помощью "
522 "B<chown>(2) и B<chmod>(2))."
523
524 #. type: SS
525 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
526 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
527 #, no-wrap
528 msgid "Abstract sockets"
529 msgstr "Абстрактные сокеты"
530
531 #. type: Plain text
532 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
533 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
534 msgid ""
535 "Socket permissions have no meaning for abstract sockets: the process "
536 "B<umask>(2) has no effect when binding an abstract socket, and changing the "
537 "ownership and permissions of the object (via B<fchown>(2) and "
538 "B<fchmod>(2)) has no effect on the accessibility of the socket."
539 msgstr ""
540 "Права на сокеты не учитываются у абстрактных сокетов: B<umask>(2) процесса "
541 "не учитывается при подключении к абстрактному сокету как и изменение "
542 "владельца и прав доступа к объекту (посредством B<fchown>(2) и B<fchmod>(2)) "
543 "не влияют на доступность сокета."
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 "Abstract sockets automatically disappear when all open references to the "
550 "socket are closed."
551 msgstr ""
552 "Абстрактные сокеты автоматически исчезают при закрытии всех открытых ссылок "
553 "на них."
554
555 #. type: Plain text
556 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
557 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
558 msgid "The abstract socket namespace is a nonportable Linux extension."
559 msgstr ""
560 "Пространство имён абстрактных сокетов является непереносимым расширением "
561 "Linux."
562
563 #. type: SS
564 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
565 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
566 #, no-wrap
567 msgid "Socket options"
568 msgstr "Параметры сокета"
569
570 #. type: Plain text
571 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
572 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
573 msgid ""
574 "For historical reasons, these socket options are specified with a "
575 "B<SOL_SOCKET> type even though they are B<AF_UNIX> specific. They can be "
576 "set with B<setsockopt>(2) and read with B<getsockopt>(2) by specifying "
577 "B<SOL_SOCKET> as the socket family."
578 msgstr ""
579 "В силу исторических причин эти параметры сокетов относятся к типу "
580 "B<SOL_SOCKET>, даже если они относятся к B<AF_UNIX>. Они могут быть "
581 "установлены с помощью B<setsockopt>(2) и прочитаны с помощью "
582 "B<getsockopt>(2); тип B<SOL_SOCKET> указывается в качестве семейства сокета."
583
584 #. type: TP
585 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
586 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
587 #, no-wrap
588 msgid "B<SO_PASSCRED>"
589 msgstr "B<SO_PASSCRED>"
590
591 #. type: Plain text
592 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
593 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
594 msgid ""
595 "Enabling this socket option causes receipt of the credentials of the sending "
596 "process in an B<SCM_CREDENTIALS ancillary> message in each subsequently "
597 "received message. The returned credentials are those specified by the "
598 "sender using B<SCM_CREDENTIALS>, or a default that includes the sender's "
599 "PID, real user ID, and real group ID, if the sender did not specify "
600 "B<SCM_CREDENTIALS> ancillary data."
601 msgstr ""
602 "Разрешает приём учётных данных посылающего процесса в вспомогательном "
603 "сообщении B<SCM_CREDENTIALS> каждого последующего принятого сообщения. "
604 "Полученные учётные данные были заданы отправителем с помощью "
605 "B<SCM_CREDENTIALS>, или имеют значение по умолчанию, которое содержит PID "
606 "отправителя, фактический пользовательский и групповой ID, если отправитель "
607 "не задал вспомогательные данные B<SCM_CREDENTIALS>."
608
609 #. type: Plain text
610 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
611 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
612 msgid ""
613 "When this option is set and the socket is not yet connected, a unique name "
614 "in the abstract namespace will be generated automatically."
615 msgstr ""
616 "Если при включении этого параметра сокет ещё не соединён, то в абстрактном "
617 "пространстве имён будет автоматически создано уникальное имя."
618
619 #. type: Plain text
620 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
621 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
622 msgid ""
623 "The value given as an argument to B<setsockopt>(2) and returned as the "
624 "result of B<getsockopt>(2) is an integer boolean flag."
625 msgstr ""
626 "Значение передаётся в аргументе B<setsockopt>(2) и возвращается в результате "
627 "B<getsockopt>(2) в виде целочисленного логического флага."
628
629 #. type: TP
630 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
631 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
632 #, no-wrap
633 msgid "B<SO_PASSSEC>"
634 msgstr "B<SO_PASSSEC>"
635
636 #. type: Plain text
637 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
638 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
639 msgid ""
640 "Enables receiving of the SELinux security label of the peer socket in an "
641 "ancillary message of type B<SCM_SECURITY> (see below)."
642 msgstr ""
643 "Разрешает приём метки безопасности SELinux однорангового сокета в "
644 "вспомогательном сообщении с типом B<SCM_SECURITY> (смотрите ниже)."
645
646 #. commit 877ce7c1b3afd69a9b1caeb1b9964c992641f52a
647 #. commit 37a9a8df8ce9de6ea73349c9ac8bdf6ba4ec4f70
648 #. type: Plain text
649 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
650 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
651 msgid ""
652 "The B<SO_PASSSEC> option is supported for UNIX domain datagram sockets since "
653 "Linux 2.6.18; support for UNIX domain stream sockets was added in Linux 4.2."
654 msgstr ""
655 "Параметр B<SO_PASSSEC> поддерживается для дейтаграммных доменных сокетов "
656 "UNIX начиная с Linux 2.6.18; поддержка потоковых доменных сокетов UNIX "
657 "добавлена в Linux 4.2."
658
659 #. type: TP
660 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
661 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
662 #, no-wrap
663 msgid "B<SO_PEEK_OFF>"
664 msgstr "B<SO_PEEK_OFF>"
665
666 #. type: Plain text
667 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
668 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
669 msgid "See B<socket>(7)."
670 msgstr "Смотрите B<socket>(7)."
671
672 #. type: TP
673 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
674 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
675 #, no-wrap
676 msgid "B<SO_PEERCRED>"
677 msgstr "B<SO_PEERCRED>"
678
679 #. type: Plain text
680 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
681 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
682 #, fuzzy
683 #| msgid ""
684 #| "This read-only socket option returns the credentials of the peer process "
685 #| "connected to this socket. The returned credentials are those that were "
686 #| "in effect at the time of the call to B<connect>(2) or B<socketpair>(2)."
687 msgid ""
688 "This read-only socket option returns the credentials of the peer process "
689 "connected to this socket. The returned credentials are those that were in "
690 "effect at the time of the call to B<connect>(2), B<listen>(2), or "
691 "B<socketpair>(2)."
692 msgstr ""
693 "С параметром сокета, доступным только для чтения, возвращаются учётные "
694 "данные однорангового процесса, соединённого с сокетом. Возвращаются "
695 "информационные данные, которые были действительными на момент вызова "
696 "B<connect>(2) или B<socketpair>(2)."
697
698 #. type: Plain text
699 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
700 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
701 msgid ""
702 "The argument to B<getsockopt>(2) is a pointer to a I<ucred> structure; "
703 "define the B<_GNU_SOURCE> feature test macro to obtain the definition of "
704 "that structure from I<E<lt>sys/socket.hE<gt>>."
705 msgstr ""
706 "Аргументом B<getsockopt>(2) является указатель на структуру I<ucred>; "
707 "определите макрос тестирования свойств B<_GNU_SOURCE> для получения "
708 "определения этой структуры из I<E<lt>sys/socket.hE<gt>>."
709
710 #. type: Plain text
711 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
712 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
713 msgid ""
714 "The use of this option is possible only for connected B<AF_UNIX> stream "
715 "sockets and for B<AF_UNIX> stream and datagram socket pairs created using "
716 "B<socketpair>(2)."
717 msgstr ""
718 "Использование этого параметра возможо только для соединённых потоковых "
719 "сокетов B<AF_UNIX> и потоков B<AF_UNIX> и для дейтаграммных сокетных пар, "
720 "созданных с помощью B<socketpair>(2)."
721
722 #. type: SS
723 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
724 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
725 #, no-wrap
726 msgid "Autobind feature"
727 msgstr "Свойство автоматической привязки"
728
729 #. i.e., sizeof(short)
730 #. type: Plain text
731 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
732 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
733 #, fuzzy
734 #| msgid ""
735 #| "If a B<bind>(2) call specifies I<addrlen> as I<sizeof(sa_family_t)>, or "
736 #| "the B<SO_PASSCRED> socket option was specified for a socket that was not "
737 #| "explicitly bound to an address, then the socket is autobound to an "
738 #| "abstract address. The address consists of a null byte followed by 5 "
739 #| "bytes in the character set I<[0-9a-f]>. Thus, there is a limit of 2^20 "
740 #| "autobind addresses. (From Linux 2.1.15, when the autobind feature was "
741 #| "added, 8 bytes were used, and the limit was thus 2^32 autobind "
742 #| "addresses. The change to 5 bytes came in Linux 2.3.15.)"
743 msgid ""
744 "If a B<bind>(2) call specifies I<addrlen> as I<sizeof(sa_family_t)>, or the "
745 "B<SO_PASSCRED> socket option was specified for a socket that was not "
746 "explicitly bound to an address, then the socket is autobound to an abstract "
747 "address. The address consists of a null byte followed by 5 bytes in the "
748 "character set I<[0-9a-f]>. Thus, there is a limit of 2\\[ha]20 autobind "
749 "addresses. (From Linux 2.1.15, when the autobind feature was added, 8 bytes "
750 "were used, and the limit was thus 2\\[ha]32 autobind addresses. The change "
751 "to 5 bytes came in Linux 2.3.15.)"
752 msgstr ""
753 "Если в вызов B<bind>(2) передано значение I<addrlen> равное "
754 "I<sizeof(sa_family_t)>, или для сокета, который не привязан к адресу явно, "
755 "был указан параметр сокета B<SO_PASSCRED>, то сокет автоматически "
756 "привязывается к абстрактному адресу. Адрес состоит из байта null и 5 байтов "
757 "символов из набора I<[0-9a-f]>. Таким образом, максимальное количество "
758 "автоматически привязываемых адресов равно 2^20 (в Linux 2.1.15, когда была "
759 "добавлена автоматическая привязка, использовалось 8 байт, и, таким образом, "
760 "ограничение было 2^32 адресов. В Linux 2.3.15 количество байт сократили до "
761 "5)."
762
763 #. type: SS
764 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
765 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
766 #, no-wrap
767 msgid "Sockets API"
768 msgstr "Программный интерфейс сокетов"
769
770 #. type: Plain text
771 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
772 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
773 msgid ""
774 "The following paragraphs describe domain-specific details and unsupported "
775 "features of the sockets API for UNIX domain sockets on Linux."
776 msgstr ""
777 "В следующих параграфах описываются специфичные тонкости доменов и "
778 "неподдерживаемые возможности программного интерфейса сокетов для доменных "
779 "сокетов UNIX в Linux."
780
781 #. type: Plain text
782 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
783 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
784 msgid ""
785 "UNIX domain sockets do not support the transmission of out-of-band data (the "
786 "B<MSG_OOB> flag for B<send>(2) and B<recv>(2))."
787 msgstr ""
788 "Доменные сокеты UNIX не поддерживают передачу внеполосных данных (флаг "
789 "B<MSG_OOB> у B<send>(2) и B<recv>(2))."
790
791 #. type: Plain text
792 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
793 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
794 msgid ""
795 "The B<send>(2) B<MSG_MORE> flag is not supported by UNIX domain sockets."
796 msgstr ""
797 "Флаг B<MSG_MORE> у B<send>(2) не поддерживается доменными сокетами UNIX."
798
799 #. commit 9f6f9af7694ede6314bed281eec74d588ba9474f
800 #. type: Plain text
801 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
802 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
803 msgid ""
804 "Before Linux 3.4, the use of B<MSG_TRUNC> in the I<flags> argument of "
805 "B<recv>(2) was not supported by UNIX domain sockets."
806 msgstr ""
807 "До Linux 3.4 использование B<MSG_TRUNC> в аргументе I<flags> у B<recv>(2) не "
808 "поддерживалось доменными сокетами UNIX."
809
810 #. type: Plain text
811 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
812 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
813 msgid ""
814 "The B<SO_SNDBUF> socket option does have an effect for UNIX domain sockets, "
815 "but the B<SO_RCVBUF> option does not. For datagram sockets, the "
816 "B<SO_SNDBUF> value imposes an upper limit on the size of outgoing "
817 "datagrams. This limit is calculated as the doubled (see B<socket>(7)) "
818 "option value less 32 bytes used for overhead."
819 msgstr ""
820 "Параметр сокета B<SO_SNDBUF> учитывается в доменных сокетах UNIX, а параметр "
821 "B<SO_RCVBUF> \\(em нет. Для датаграмных сокетов значение B<SO_SNDBUF> "
822 "считается максимальным размером для исходящих датаграмм. Это ограничение, "
823 "вычисляемое как удвоенное значение (см. B<socket>(7)) параметра, содержит "
824 "меньше 32 байт накладных расходов."
825
826 #. type: SS
827 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
828 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
829 #, no-wrap
830 msgid "Ancillary messages"
831 msgstr "Вспомогательные сообщения"
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 "Ancillary data is sent and received using B<sendmsg>(2) and B<recvmsg>(2). "
838 "For historical reasons, the ancillary message types listed below are "
839 "specified with a B<SOL_SOCKET> type even though they are B<AF_UNIX> "
840 "specific. To send them, set the I<cmsg_level> field of the struct "
841 "I<cmsghdr> to B<SOL_SOCKET> and the I<cmsg_type> field to the type. For "
842 "more information, see B<cmsg>(3)."
843 msgstr ""
844 "Вспомогательные данные отправляются и принимаются с помощью B<sendmsg>(2) и "
845 "B<recvmsg>(2). В силу исторических причин перечисленные типы вспомогательных "
846 "сообщений относятся к типу B<SOL_SOCKET>, даже если они относятся к "
847 "B<AF_UNIX>. Для того, чтобы отправить их, установите значение поля "
848 "I<cmsg_level> структуры I<cmsghdr> равным B<SOL_SOCKET>, а в значении поля "
849 "I<cmsg_type> укажите его тип. Дополнительная информация приведена в "
850 "B<cmsg>(3)."
851
852 #. type: TP
853 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
854 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
855 #, no-wrap
856 msgid "B<SCM_RIGHTS>"
857 msgstr "B<SCM_RIGHTS>"
858
859 #. type: Plain text
860 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
861 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
862 msgid ""
863 "Send or receive a set of open file descriptors from another process. The "
864 "data portion contains an integer array of the file descriptors."
865 msgstr ""
866 "Передать или принять набор открытых файловых дескрипторов из другого "
867 "процесса. Часть с данными содержит целочисленный массив файловых "
868 "дескрипторов."
869
870 #. type: Plain text
871 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
872 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
873 msgid ""
874 "Commonly, this operation is referred to as \"passing a file descriptor\" to "
875 "another process. However, more accurately, what is being passed is a "
876 "reference to an open file description (see B<open>(2)), and in the receiving "
877 "process it is likely that a different file descriptor number will be used. "
878 "Semantically, this operation is equivalent to duplicating (B<dup>(2)) a "
879 "file descriptor into the file descriptor table of another process."
880 msgstr ""
881 "Обычно, эта операция упоминается как «передача дескриптора файла» другому "
882 "процессу. Но если точнее, то передается ссылка на открытое файловое описание "
883 "(смотрите B<open>(2)) и в принимающем процессе будет использоваться, "
884 "вероятно, файловый дескриптор с другим номером. Семантически, эта операция "
885 "эквивалентна дублированию (B<dup>(2)) файлового дескриптора в таблицу "
886 "файловых дескрипторов другого процесса."
887
888 #. type: Plain text
889 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
890 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
891 msgid ""
892 "If the buffer used to receive the ancillary data containing file descriptors "
893 "is too small (or is absent), then the ancillary data is truncated (or "
894 "discarded) and the excess file descriptors are automatically closed in the "
895 "receiving process."
896 msgstr ""
897 "Если используемый для приёма вспомогательных данных с файловыми "
898 "дескрипторами буфер слишком мал (или отсутствует), то вспомогательные данные "
899 "обрезаются (или отбрасываются), а избыточные файловые дескрипторы "
900 "автоматически закрываются в принимающем процессе."
901
902 #. type: Plain text
903 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
904 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
905 msgid ""
906 "If the number of file descriptors received in the ancillary data would cause "
907 "the process to exceed its B<RLIMIT_NOFILE> resource limit (see "
908 "B<getrlimit>(2)), the excess file descriptors are automatically closed in "
909 "the receiving process."
910 msgstr ""
911 "Если количество файловых дескрипторов, полученных во вспомогательных данных, "
912 "превышает ограничение ресурса процесса B<RLIMIT_NOFILE> (смотрите "
913 "B<getrlimit>(2)), то превысившие файловые дескрипторы автоматически "
914 "закрываются в принимающем процессе."
915
916 #. commit bba14de98753cb6599a2dae0e520714b2153522d
917 #. type: Plain text
918 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
919 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
920 #, fuzzy
921 #| msgid ""
922 #| "The kernel constant B<SCM_MAX_FD> defines a limit on the number of file "
923 #| "descriptors in the array. Attempting to send an array larger than this "
924 #| "limit causes B<sendmsg>(2) to fail with the error B<EINVAL>. "
925 #| "B<SCM_MAX_FD> has the value 253 (or 255 in kernels before 2.6.38)."
926 msgid ""
927 "The kernel constant B<SCM_MAX_FD> defines a limit on the number of file "
928 "descriptors in the array. Attempting to send an array larger than this "
929 "limit causes B<sendmsg>(2) to fail with the error B<EINVAL>. B<SCM_MAX_FD> "
930 "has the value 253 (or 255 before Linux 2.6.38)."
931 msgstr ""
932 "Константой ядра B<SCM_MAX_FD> задаётся ограничение на количество файловых "
933 "дескрипторов в массиве. Попытка послать с помощью B<sendmsg>(2) массив "
934 "превышающий ограничение завершается ошибкой B<EINVAL>. Значение "
935 "B<SCM_MAX_FD> равно 253 (или 255 в ядрах до версии 2.6.38)."
936
937 #. type: TP
938 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
939 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
940 #, no-wrap
941 msgid "B<SCM_CREDENTIALS>"
942 msgstr "B<SCM_CREDENTIALS>"
943
944 #. type: Plain text
945 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
946 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
947 #, fuzzy
948 #| msgid ""
949 #| "Send or receive UNIX credentials. This can be used for authentication. "
950 #| "The credentials are passed as a I<struct ucred> ancillary message. Thus "
951 #| "structure is defined in I<E<lt>sys/socket.hE<gt>> as follows:"
952 msgid ""
953 "Send or receive UNIX credentials. This can be used for authentication. The "
954 "credentials are passed as a I<struct ucred> ancillary message. This "
955 "structure is defined in I<E<lt>sys/socket.hE<gt>> as follows:"
956 msgstr ""
957 "Передать или принять учётные данные UNIX. Может быть использована для "
958 "аутентификации. Учётные данные передаются в виде структуры I<struct ucred> "
959 "вспомогательного сообщения. Эта структура определена в I<E<lt>sys/"
960 "socket.hE<gt>> следующим образом:"
961
962 #. type: Plain text
963 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
964 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
965 #, no-wrap
966 msgid ""
967 "struct ucred {\n"
968 " pid_t pid; /* Process ID of the sending process */\n"
969 " uid_t uid; /* User ID of the sending process */\n"
970 " gid_t gid; /* Group ID of the sending process */\n"
971 "};\n"
972 msgstr ""
973 "struct ucred {\n"
974 " pid_t pid; /* идентификатор посылающего процесса */\n"
975 " uid_t uid; /* идентификатор пользователя посылающего процесса */\n"
976 " gid_t gid; /* идентификатор группы посылающего процесса */\n"
977 "};\n"
978
979 #. type: Plain text
980 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
981 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
982 msgid ""
983 "Since glibc 2.8, the B<_GNU_SOURCE> feature test macro must be defined "
984 "(before including I<any> header files) in order to obtain the definition of "
985 "this structure."
986 msgstr ""
987 "Начиная с glibc 2.8, чтобы получить определение данной структуры должен быть "
988 "определён макрос тестирования свойств B<_GNU_SOURCE> (до включения I<каких-"
989 "либо> заголовочных файлов)."
990
991 #. type: Plain text
992 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
993 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
994 #, fuzzy
995 #| msgid ""
996 #| "The credentials which the sender specifies are checked by the kernel. A "
997 #| "privileged process is allowed to specify values that do not match its "
998 #| "own. The sender must specify its own process ID (unless it has the "
999 #| "capability B<CAP_SYS_ADMIN>), its real user ID, effective user ID, or "
1000 #| "saved set-user-ID (unless it has B<CAP_SETUID>), and its real group ID, "
1001 #| "effective group ID, or saved set-group-ID (unless it has B<CAP_SETGID>)."
1002 msgid ""
1003 "The credentials which the sender specifies are checked by the kernel. A "
1004 "privileged process is allowed to specify values that do not match its own. "
1005 "The sender must specify its own process ID (unless it has the capability "
1006 "B<CAP_SYS_ADMIN>, in which case the PID of any existing process may be "
1007 "specified), its real user ID, effective user ID, or saved set-user-ID "
1008 "(unless it has B<CAP_SETUID>), and its real group ID, effective group ID, or "
1009 "saved set-group-ID (unless it has B<CAP_SETGID>)."
1010 msgstr ""
1011 "Учётные данные (credentials), указываемые отправителем, проверяются ядром. "
1012 "Привилегированный процесс может указывать значения, отличные от его "
1013 "собственных. Отправитель должен указать идентификатор своего процесса (если "
1014 "только он не имеет мандата B<CAP_SYS_ADMIN>), свой реальный идентификатор "
1015 "пользователя, действующий идентификатор или сохранённый set-user-ID (если "
1016 "только он не имеет B<CAP_SETUID>) и реальный идентификатор своей группы, "
1017 "действующий идентификатор группы или сохранённый set-group-ID (если только "
1018 "он не имеет B<CAP_SETGID>)."
1019
1020 #. type: Plain text
1021 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1022 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1023 msgid ""
1024 "To receive a I<struct ucred> message, the B<SO_PASSCRED> option must be "
1025 "enabled on the socket."
1026 msgstr ""
1027 "Для получения сообщения со структурой I<struct ucred> у сокета должен быть "
1028 "включён параметр B<SO_PASSCRED>."
1029
1030 #. type: TP
1031 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1032 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1033 #, no-wrap
1034 msgid "B<SCM_SECURITY>"
1035 msgstr "B<SCM_SECURITY>"
1036
1037 #. type: Plain text
1038 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1039 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1040 msgid ""
1041 "Receive the SELinux security context (the security label) of the peer "
1042 "socket. The received ancillary data is a null-terminated string containing "
1043 "the security context. The receiver should allocate at least B<NAME_MAX> "
1044 "bytes in the data portion of the ancillary message for this data."
1045 msgstr ""
1046 "Получить контекст безопасности SELinux (метку безопасности) однорангового "
1047 "сокета. Полученные вспомогательные данные представляют собой строку (с null "
1048 "в конце) с контекстом безопасности. Получатель должен выделить не менее "
1049 "B<NAME_MAX> байт под эти данные в в части данных вспомогательного сообщения."
1050
1051 #. type: Plain text
1052 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1053 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1054 msgid ""
1055 "To receive the security context, the B<SO_PASSSEC> option must be enabled on "
1056 "the socket (see above)."
1057 msgstr ""
1058 "Для получения контекста безопасности у сокета должен быть включён параметр "
1059 "B<SO_PASSSEC> (смотрите выше)."
1060
1061 #. type: Plain text
1062 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1063 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1064 msgid ""
1065 "When sending ancillary data with B<sendmsg>(2), only one item of each of the "
1066 "above types may be included in the sent message."
1067 msgstr ""
1068 "При отправке вспомогательных данных с помощью B<sendmsg>(2) посылаемое "
1069 "сообщение может содержать только по одному элементу каждого типа, из "
1070 "представленных выше."
1071
1072 #. type: Plain text
1073 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1074 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1075 msgid ""
1076 "At least one byte of real data should be sent when sending ancillary data. "
1077 "On Linux, this is required to successfully send ancillary data over a UNIX "
1078 "domain stream socket. When sending ancillary data over a UNIX domain "
1079 "datagram socket, it is not necessary on Linux to send any accompanying real "
1080 "data. However, portable applications should also include at least one byte "
1081 "of real data when sending ancillary data over a datagram socket."
1082 msgstr ""
1083 "По крайней мере один байт реальных данных должен быть отправлен при отправке "
1084 "вспомогательных данных. В Linux это требуется для успешной отправки "
1085 "вспомогательных данных через потоковый доменный сокет UNIX. При отправке "
1086 "вспомогательных данных через дейтаграммный доменный сокет UNIX в Linux "
1087 "необязательно отправлять какие-либо реальные сопровождающие данные. Однако "
1088 "переносимые приложения должны также включать, по крайней мере, один байт "
1089 "реальных данных при отправке вспомогательных данных через дейтаграммный "
1090 "сокет."
1091
1092 #. type: Plain text
1093 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1094 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1095 msgid ""
1096 "When receiving from a stream socket, ancillary data forms a kind of barrier "
1097 "for the received data. For example, suppose that the sender transmits as "
1098 "follows:"
1099 msgstr ""
1100 "При получении из потокового сокета вспомогательные данные формируют своего "
1101 "рода барьер для полученных данных. Например, предположим, что отправитель "
1102 "передает так:"
1103
1104 #. type: IP
1105 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1106 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1107 #, no-wrap
1108 msgid "(1)"
1109 msgstr "(1)"
1110
1111 #. type: Plain text
1112 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1113 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1114 msgid "B<sendmsg>(2) of four bytes, with no ancillary data."
1115 msgstr "B<sendmsg>(2) отправляет четыре байта без вспомогательных данных."
1116
1117 #. type: IP
1118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1120 #, no-wrap
1121 msgid "(2)"
1122 msgstr "(2)"
1123
1124 #. type: Plain text
1125 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1126 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1127 msgid "B<sendmsg>(2) of one byte, with ancillary data."
1128 msgstr "B<sendmsg>(2) отправляет один байт вспомогательных данных."
1129
1130 #. type: IP
1131 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1132 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1133 #, no-wrap
1134 msgid "(3)"
1135 msgstr "(3)"
1136
1137 #. type: Plain text
1138 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1139 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1140 #, fuzzy
1141 #| msgid ""
1142 #| "Suppose that the receiver now performs B<recvmsg>(2) calls each with a "
1143 #| "buffer size of 20 bytes. The first call will receive five bytes of data, "
1144 #| "along with the ancillary data sent by the second B<sendmsg>(2) call. "
1145 #| "The next call will receive the remaining five bytes of data."
1146 msgid ""
1147 "Suppose that the receiver now performs B<recvmsg>(2) calls each with a "
1148 "buffer size of 20 bytes. The first call will receive five bytes of data, "
1149 "along with the ancillary data sent by the second B<sendmsg>(2) call. The "
1150 "next call will receive the remaining four bytes of data."
1151 msgstr ""
1152 "Предположим, что получатель теперь выполняет каждый вызов B<recvmsg>(2) с "
1153 "буфером размером 20 байтов. Первый вызов получит пять байтов данных вместе с "
1154 "вспомогательными данными, отправленными вторым вызовом B<sendmsg>(2). "
1155 "Следующий вызов получит оставшиеся пять байтов данных."
1156
1157 #. type: Plain text
1158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1160 msgid ""
1161 "If the space allocated for receiving incoming ancillary data is too small "
1162 "then the ancillary data is truncated to the number of headers that will fit "
1163 "in the supplied buffer (or, in the case of an B<SCM_RIGHTS> file descriptor "
1164 "list, the list of file descriptors may be truncated). If no buffer is "
1165 "provided for incoming ancillary data (i.e., the I<msg_control> field of the "
1166 "I<msghdr> structure supplied to B<recvmsg>(2) is NULL), then the incoming "
1167 "ancillary data is discarded. In both of these cases, the B<MSG_CTRUNC> flag "
1168 "will be set in the I<msg.msg_flags> value returned by B<recvmsg>(2)."
1169 msgstr ""
1170 "Если место, выделенное для получения входящих вспомогательных данных, "
1171 "слишком маленькое, то вспомогательные данные обрезаются по количеству "
1172 "заголовков, которые влезут в предоставленной буфер (или, в случае списка "
1173 "файловых дескрипторов B<SCM_RIGHTS>, может быть обрезан список файловых "
1174 "дескрипторов). Если для входящих вспомогательных данных буфер не был "
1175 "предусмотрен (т. е., поле I<msg_control> в структуре I<msghdr>, указанное "
1176 "B<recvmsg>(2), равно NULL), то входящие вспомогательные данные "
1177 "отбрасываются. В обоих случаях, в возвращаемом значении B<recvmsg>(2) в "
1178 "I<msg.msg_flags> будет установлен флаг B<MSG_CTRUNC>."
1179
1180 #. type: SS
1181 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1182 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1183 #, no-wrap
1184 msgid "Ioctls"
1185 msgstr "Вызовы ioctl"
1186
1187 #. type: Plain text
1188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1190 msgid ""
1191 "The following B<ioctl>(2) calls return information in I<value>. The "
1192 "correct syntax is:"
1193 msgstr ""
1194 "Следующие вызовы B<ioctl>(2) возвращают информацию в аргументе I<value>. "
1195 "Корректный синтаксис:"
1196
1197 #. type: Plain text
1198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1200 #, no-wrap
1201 msgid ""
1202 "B<int>I< value>B<;>\n"
1203 "I<error>B< = ioctl(>I<unix_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
1204 msgstr ""
1205 "B<int>I< value>B<;>\n"
1206 "I<error>B< = ioctl(>I<unix_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
1207
1208 #. type: Plain text
1209 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1210 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1211 msgid "I<ioctl_type> can be:"
1212 msgstr "Значением I<ioctl_type> может быть:"
1213
1214 #. type: TP
1215 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1216 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1217 #, no-wrap
1218 msgid "B<SIOCINQ>"
1219 msgstr "B<SIOCINQ>"
1220
1221 #. #-#-#-#-# archlinux: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1222 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1223 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1224 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1225 #. quite what userland might expect. It seems to return the number
1226 #. of bytes allocated for buffers containing pending output.
1227 #. That number is normally larger than the number of bytes of pending
1228 #. output. Since this info is, from userland's point of view, imprecise,
1229 #. and it may well change, probably best not to document this now.
1230 #. type: Plain text
1231 #. #-#-#-#-# debian-trixie: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1232 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1233 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1234 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1235 #. quite what userland might expect. It seems to return the number
1236 #. of bytes allocated for buffers containing pending output.
1237 #. That number is normally larger than the number of bytes of pending
1238 #. output. Since this info is, from userland's point of view, imprecise,
1239 #. and it may well change, probably best not to document this now.
1240 #. type: Plain text
1241 #. #-#-#-#-# debian-unstable: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1242 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1243 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1244 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1245 #. quite what userland might expect. It seems to return the number
1246 #. of bytes allocated for buffers containing pending output.
1247 #. That number is normally larger than the number of bytes of pending
1248 #. output. Since this info is, from userland's point of view, imprecise,
1249 #. and it may well change, probably best not to document this now.
1250 #. type: Plain text
1251 #. #-#-#-#-# fedora-44: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1252 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1253 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1254 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1255 #. quite what userland might expect. It seems to return the number
1256 #. of bytes allocated for buffers containing pending output.
1257 #. That number is normally larger than the number of bytes of pending
1258 #. output. Since this info is, from userland's point of view, imprecise,
1259 #. and it may well change, probably best not to document this now.
1260 #. type: Plain text
1261 #. #-#-#-#-# fedora-rawhide: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1262 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1263 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1264 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1265 #. quite what userland might expect. It seems to return the number
1266 #. of bytes allocated for buffers containing pending output.
1267 #. That number is normally larger than the number of bytes of pending
1268 #. output. Since this info is, from userland's point of view, imprecise,
1269 #. and it may well change, probably best not to document this now.
1270 #. type: Plain text
1271 #. #-#-#-#-# mageia-cauldron: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1272 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1273 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1274 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1275 #. quite what userland might expect. It seems to return the number
1276 #. of bytes allocated for buffers containing pending output.
1277 #. That number is normally larger than the number of bytes of pending
1278 #. output. Since this info is, from userland's point of view, imprecise,
1279 #. and it may well change, probably best not to document this now.
1280 #. type: Plain text
1281 #. #-#-#-#-# opensuse-leap-16-1: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1282 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1283 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1284 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1285 #. quite what userland might expect. It seems to return the number
1286 #. of bytes allocated for buffers containing pending output.
1287 #. That number is normally larger than the number of bytes of pending
1288 #. output. Since this info is, from userland's point of view, imprecise,
1289 #. and it may well change, probably best not to document this now.
1290 #. type: Plain text
1291 #. #-#-#-#-# opensuse-tumbleweed: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1292 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1293 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1294 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1295 #. quite what userland might expect. It seems to return the number
1296 #. of bytes allocated for buffers containing pending output.
1297 #. That number is normally larger than the number of bytes of pending
1298 #. output. Since this info is, from userland's point of view, imprecise,
1299 #. and it may well change, probably best not to document this now.
1300 #. type: Plain text
1301 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1302 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1303 msgid ""
1304 "For B<SOCK_STREAM> sockets, this call returns the number of unread bytes in "
1305 "the receive buffer. The socket must not be in LISTEN state, otherwise an "
1306 "error (B<EINVAL>) is returned. B<SIOCINQ> is defined in I<E<lt>linux/"
1307 "sockios.hE<gt>>. Alternatively, you can use the synonymous B<FIONREAD>, "
1308 "defined in I<E<lt>sys/ioctl.hE<gt>>. For B<SOCK_DGRAM> sockets, the "
1309 "returned value is the same as for Internet domain datagram sockets; see "
1310 "B<udp>(7)."
1311 msgstr ""
1312 "Для сокетов B<SOCK_STREAM> этот вызов возвращает количество непрочитанных "
1313 "данных в приёмном буфере. Сокет не должен быть в состоянии LISTEN, иначе "
1314 "возвращается ошибка (B<EINVAL>). Значение B<SIOCINQ> определено в "
1315 "I<E<lt>linux/sockios.hE<gt>>. В качестве альтернативы можно использовать "
1316 "синоним B<FIONREAD>, определённый в I<E<lt>sys/ioctl.hE<gt>>. Для сокетов "
1317 "B<SOCK_DGRAM> возвращаемое значение совпадает с дейтаграммными доменными "
1318 "сокетами Интернета; смотрите B<udp>(7)."
1319
1320 #. type: SH
1321 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1322 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1323 #, no-wrap
1324 msgid "ERRORS"
1325 msgstr "ОШИБКИ"
1326
1327 #. type: TP
1328 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1329 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1330 #, no-wrap
1331 msgid "B<EADDRINUSE>"
1332 msgstr "B<EADDRINUSE>"
1333
1334 #. type: Plain text
1335 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1336 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1337 msgid ""
1338 "The specified local address is already in use or the filesystem socket "
1339 "object already exists."
1340 msgstr ""
1341 "Заданный локальный адрес уже используется, или сокетный объект файловой "
1342 "системы уже существует."
1343
1344 #. type: TP
1345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1347 #, no-wrap
1348 msgid "B<EBADF>"
1349 msgstr "B<EBADF>"
1350
1351 #. type: Plain text
1352 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1353 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1354 msgid ""
1355 "This error can occur for B<sendmsg>(2) when sending a file descriptor as "
1356 "ancillary data over a UNIX domain socket (see the description of "
1357 "B<SCM_RIGHTS>, above), and indicates that the file descriptor number that is "
1358 "being sent is not valid (e.g., it is not an open file descriptor)."
1359 msgstr ""
1360 "Эта ошибка может возникать в B<sendmsg>(2) при отправке файлового "
1361 "дескриптора в вспомогательных данных через доменный сокет UNIX (смотрите "
1362 "описание B<SCM_RIGHTS> выше), и указывает на то, что отправляемый номер "
1363 "файлового дескриптора некорректен (например, не является открытым файловым "
1364 "дескриптором)."
1365
1366 #. type: TP
1367 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1368 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1369 #, no-wrap
1370 msgid "B<ECONNREFUSED>"
1371 msgstr "B<ECONNREFUSED>"
1372
1373 #. type: Plain text
1374 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1375 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1376 msgid ""
1377 "The remote address specified by B<connect>(2) was not a listening socket. "
1378 "This error can also occur if the target pathname is not a socket."
1379 msgstr ""
1380 "Удалённый адрес, указанный B<connect>(2) не является слушающим сокетом. Эта "
1381 "ошибка также может возникнуть, если путь назначения не является сокетом."
1382
1383 #. type: TP
1384 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1385 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1386 #, no-wrap
1387 msgid "B<ECONNRESET>"
1388 msgstr "B<ECONNRESET>"
1389
1390 #. type: Plain text
1391 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1392 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1393 msgid "Remote socket was unexpectedly closed."
1394 msgstr "Удалённый сокет был неожиданно закрыт."
1395
1396 #. type: TP
1397 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1398 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1399 #, no-wrap
1400 msgid "B<EFAULT>"
1401 msgstr "B<EFAULT>"
1402
1403 #. type: Plain text
1404 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1405 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1406 msgid "User memory address was not valid."
1407 msgstr "Некорректный адрес пользовательской памяти."
1408
1409 #. type: TP
1410 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1411 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1412 #, no-wrap
1413 msgid "B<EINVAL>"
1414 msgstr "B<EINVAL>"
1415
1416 #. type: Plain text
1417 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1418 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1419 msgid ""
1420 "Invalid argument passed. A common cause is that the value B<AF_UNIX> was "
1421 "not specified in the I<sun_type> field of passed addresses, or the socket "
1422 "was in an invalid state for the applied operation."
1423 msgstr ""
1424 "Передан неправильный аргумент. Основная причина \\(em не задано значение "
1425 "B<AF_UNIX> в поле I<sun_type> передаваемых адресов или сокет находится в "
1426 "некорректном состоянии для производимой операции."
1427
1428 #. type: TP
1429 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1430 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1431 #, no-wrap
1432 msgid "B<EISCONN>"
1433 msgstr "B<EISCONN>"
1434
1435 #. type: Plain text
1436 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1437 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1438 msgid ""
1439 "B<connect>(2) called on an already connected socket or a target address was "
1440 "specified on a connected socket."
1441 msgstr ""
1442 "Вызов B<connect>(2) запущен для уже соединённого сокета, или адрес "
1443 "назначения указывает на соединённый сокет."
1444
1445 #. type: TP
1446 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1447 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1448 #, no-wrap
1449 msgid "B<ENFILE>"
1450 msgstr "B<ENFILE>"
1451
1452 #. type: Plain text
1453 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1454 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1455 msgid ""
1456 "The system-wide limit on the total number of open files has been reached."
1457 msgstr "Достигнуто максимальное количество открытых файлов в системе."
1458
1459 #. type: TP
1460 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1461 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1462 #, no-wrap
1463 msgid "B<ENOENT>"
1464 msgstr "B<ENOENT>"
1465
1466 #. type: Plain text
1467 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1468 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1469 msgid ""
1470 "The pathname in the remote address specified to B<connect>(2) did not exist."
1471 msgstr "Путь, указанный в удалённом адресе для B<connect>(2), не существует."
1472
1473 #. type: TP
1474 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1475 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1476 #, no-wrap
1477 msgid "B<ENOMEM>"
1478 msgstr "B<ENOMEM>"
1479
1480 #. type: Plain text
1481 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1482 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1483 msgid "Out of memory."
1484 msgstr "Не хватает памяти."
1485
1486 #. type: TP
1487 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1488 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1489 #, no-wrap
1490 msgid "B<ENOTCONN>"
1491 msgstr "B<ENOTCONN>"
1492
1493 #. type: Plain text
1494 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1495 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1496 msgid ""
1497 "Socket operation needs a target address, but the socket is not connected."
1498 msgstr ""
1499 "Для операции над сокетом требуется адрес назначения, а сокет не соединён."
1500
1501 #. type: TP
1502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1504 #, no-wrap
1505 msgid "B<EOPNOTSUPP>"
1506 msgstr "B<EOPNOTSUPP>"
1507
1508 #. type: Plain text
1509 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1510 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1511 msgid ""
1512 "Stream operation called on non-stream oriented socket or tried to use the "
1513 "out-of-band data option."
1514 msgstr ""
1515 "Вызвана потоковая операция для не потокового сокета, или произведена попытка "
1516 "использования параметра для внеполосных данных."
1517
1518 #. type: TP
1519 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1520 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1521 #, no-wrap
1522 msgid "B<EPERM>"
1523 msgstr "B<EPERM>"
1524
1525 #. type: Plain text
1526 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1527 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1528 msgid "The sender passed invalid credentials in the I<struct ucred>."
1529 msgstr ""
1530 "Отправитель указал неправильную информацию (credentials) в структуре "
1531 "I<struct ucred>."
1532
1533 #. type: TP
1534 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1535 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1536 #, no-wrap
1537 msgid "B<EPIPE>"
1538 msgstr "B<EPIPE>"
1539
1540 #. type: Plain text
1541 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1542 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1543 msgid ""
1544 "Remote socket was closed on a stream socket. If enabled, a B<SIGPIPE> is "
1545 "sent as well. This can be avoided by passing the B<MSG_NOSIGNAL> flag to "
1546 "B<send>(2) or B<sendmsg>(2)."
1547 msgstr ""
1548 "Удалённый сокет был закрыт в потоковом сокете. Если разрешено, также будет "
1549 "послан сигнал B<SIGPIPE>. Этого можно избежать, передав флаг B<MSG_NOSIGNAL> "
1550 "при вызове B<send>(2) или B<sendmsg>(2)."
1551
1552 #. type: TP
1553 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1554 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1555 #, no-wrap
1556 msgid "B<EPROTONOSUPPORT>"
1557 msgstr "B<EPROTONOSUPPORT>"
1558
1559 #. type: Plain text
1560 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1561 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1562 msgid "Passed protocol is not B<AF_UNIX>."
1563 msgstr "Указанный протокол не является B<AF_UNIX>."
1564
1565 #. type: TP
1566 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1567 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1568 #, no-wrap
1569 msgid "B<EPROTOTYPE>"
1570 msgstr "B<EPROTOTYPE>"
1571
1572 #. type: Plain text
1573 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1574 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1575 msgid ""
1576 "Remote socket does not match the local socket type (B<SOCK_DGRAM> versus "
1577 "B<SOCK_STREAM>)."
1578 msgstr ""
1579 "Удалённый сокет не совпадает с типом локального сокета (B<SOCK_DGRAM> против "
1580 "B<SOCK_STREAM>)."
1581
1582 #. type: TP
1583 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1584 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1585 #, no-wrap
1586 msgid "B<ESOCKTNOSUPPORT>"
1587 msgstr "B<ESOCKTNOSUPPORT>"
1588
1589 #. type: Plain text
1590 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1591 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1592 msgid "Unknown socket type."
1593 msgstr "Неизвестный тип сокета."
1594
1595 #. type: TP
1596 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1597 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1598 #, no-wrap
1599 msgid "B<ESRCH>"
1600 msgstr "B<ESRCH>"
1601
1602 #. type: Plain text
1603 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1604 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1605 msgid ""
1606 "While sending an ancillary message containing credentials "
1607 "(B<SCM_CREDENTIALS>), the caller specified a PID that does not match any "
1608 "existing process."
1609 msgstr ""
1610
1611 #. type: TP
1612 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1613 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1614 #, no-wrap
1615 msgid "B<ETOOMANYREFS>"
1616 msgstr "B<ETOOMANYREFS>"
1617
1618 #. type: Plain text
1619 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1620 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1621 msgid ""
1622 "This error can occur for B<sendmsg>(2) when sending a file descriptor as "
1623 "ancillary data over a UNIX domain socket (see the description of "
1624 "B<SCM_RIGHTS>, above). It occurs if the number of \"in-flight\" file "
1625 "descriptors exceeds the B<RLIMIT_NOFILE> resource limit and the caller does "
1626 "not have the B<CAP_SYS_RESOURCE> capability. An in-flight file descriptor "
1627 "is one that has been sent using B<sendmsg>(2) but has not yet been accepted "
1628 "in the recipient process using B<recvmsg>(2)."
1629 msgstr ""
1630 "Эта ошибка может возникнуть в B<sendmsg>(2) при передаче через доменный "
1631 "сокет UNIX в качестве вспомогательных данных файлового дескриптора (смотрите "
1632 "описание B<SCM_RIGHTS> выше). Это происходит, если количество файловых "
1633 "дескрипторов «в полёте» превышает ограничитель ресурса B<RLIMIT_NOFILE> и "
1634 "вызывающий не имеет мандата B<CAP_SYS_RESOURCE>. Файловым дескриптором в "
1635 "полёте считается посланный с помощью B<sendmsg>(2), но ещё не принятый "
1636 "процессом-получателем с помощью B<recvmsg>(2)."
1637
1638 #. commit 712f4aad406bb1ed67f3f98d04c044191f0ff593
1639 #. type: Plain text
1640 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1641 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1642 msgid ""
1643 "This error is diagnosed since mainline Linux 4.5 (and in some earlier kernel "
1644 "versions where the fix has been backported). In earlier kernel versions, it "
1645 "was possible to place an unlimited number of file descriptors in flight, by "
1646 "sending each file descriptor with B<sendmsg>(2) and then closing the file "
1647 "descriptor so that it was not accounted against the B<RLIMIT_NOFILE> "
1648 "resource limit."
1649 msgstr ""
1650 "Данная ошибка выявляется начиная с Linux 4.5 (и в некоторых старых версиях, "
1651 "в которые перенесено исправление). В ранних версиях ядра было возможно "
1652 "получить неограниченное количество файловых дескрипторов в полёте, посылая "
1653 "каждый файловый дескриптор с помощью B<sendmsg>(2) и затем закрывая файловый "
1654 "дескриптор, и таким образом он не учитывался в ограничителе ресурса "
1655 "B<RLIMIT_NOFILE>."
1656
1657 #. type: Plain text
1658 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1659 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1660 msgid ""
1661 "Other errors can be generated by the generic socket layer or by the "
1662 "filesystem while generating a filesystem socket object. See the appropriate "
1663 "manual pages for more information."
1664 msgstr ""
1665 "При создании сокетного объекта на уровне сокетов или файловой системы могут "
1666 "генерироваться другие ошибки. За дополнительной информацией обращайтесь к "
1667 "соответствующей справочной странице."
1668
1669 #. type: SH
1670 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1671 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1672 #, no-wrap
1673 msgid "VERSIONS"
1674 msgstr "ВЕРСИИ"
1675
1676 #. type: Plain text
1677 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1678 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1679 msgid ""
1680 "B<SCM_CREDENTIALS> and the abstract namespace were introduced with Linux 2.2 "
1681 "and should not be used in portable programs. (Some BSD-derived systems also "
1682 "support credential passing, but the implementation details differ.)"
1683 msgstr ""
1684 "B<SCM_CREDENTIALS> и абстрактное пространство имён появились в Linux 2.2 и "
1685 "не должны использоваться в переносимых программах. Некоторые клоны BSD также "
1686 "поддерживают передачу дополнительной информации (credential), но методы "
1687 "реализации передачи могут серьезно отличаться на разных системах."
1688
1689 #. type: SH
1690 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1691 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1692 #, no-wrap
1693 msgid "NOTES"
1694 msgstr "ПРИМЕЧАНИЯ"
1695
1696 #. type: Plain text
1697 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1698 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1699 msgid ""
1700 "Binding to a socket with a filename creates a socket in the filesystem that "
1701 "must be deleted by the caller when it is no longer needed (using "
1702 "B<unlink>(2)). The usual UNIX close-behind semantics apply; the socket can "
1703 "be unlinked at any time and will be finally removed from the filesystem when "
1704 "the last reference to it is closed."
1705 msgstr ""
1706 "Привязка сокета к имени файла создаёт сокет в файловой системе, который "
1707 "должен быть удалён создателем, когда необходимость в нём отпадёт (с помощью "
1708 "B<unlink>(2)). Обычная система ссылок UNIX также подходит для работы с "
1709 "сокетами; сокет может быть удалён в любое время, а реальное удаление из "
1710 "файловой системы будет произведено при закрытии последней на него ссылки."
1711
1712 #. type: Plain text
1713 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1714 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1715 #, fuzzy
1716 #| msgid ""
1717 #| "To pass file descriptors or credentials over a B<SOCK_STREAM> socket, you "
1718 #| "must to send or receive at least one byte of nonancillary data in the "
1719 #| "same B<sendmsg>(2) or B<recvmsg>(2) call."
1720 msgid ""
1721 "To pass file descriptors or credentials over a B<SOCK_STREAM> socket, you "
1722 "must send or receive at least one byte of nonancillary data in the same "
1723 "B<sendmsg>(2) or B<recvmsg>(2) call."
1724 msgstr ""
1725 "Для передачи файловых дескрипторов или учётных данных (credentials) через "
1726 "сокет B<SOCK_STREAM> необходимо передать или принять, по меньшей мере, один "
1727 "байт не вспомогательных данных в том же вызове B<sendmsg>(2) или "
1728 "B<recvmsg>(2)."
1729
1730 #. type: Plain text
1731 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1732 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1733 msgid ""
1734 "UNIX domain stream sockets do not support the notion of out-of-band data."
1735 msgstr ""
1736 "В потоковых доменных сокетах UNIX отсутствует такое понятие как внеполосные "
1737 "данные."
1738
1739 #. type: SH
1740 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1741 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1742 #, no-wrap
1743 msgid "BUGS"
1744 msgstr "ПРОГРАММНЫЕ ОШИБКИ"
1745
1746 #. The behavior on Solaris is quite similar.
1747 #. type: Plain text
1748 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1749 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1750 #, fuzzy
1751 #| msgid ""
1752 #| "When binding a socket to an address, Linux is one of the implementations "
1753 #| "that appends a null terminator if none is supplied in I<sun_path>. In "
1754 #| "most cases this is unproblematic: when the socket address is retrieved, "
1755 #| "it will be one byte longer than that supplied when the socket was bound. "
1756 #| "However, there is one case where confusing behavior can result: if 108 "
1757 #| "non-null bytes are supplied when a socket is bound, then the addition of "
1758 #| "the null terminator takes the length of the pathname beyond "
1759 #| "I<sizeof(sun_path)>. Consequently, when retrieving the socket address "
1760 #| "(for example, via B<accept>(2)), if the input I<addrlen> argument for the "
1761 #| "retrieving call is specified as I<sizeof(struct sockaddr_un)>, then the "
1762 #| "returned address structure I<won't> have a null terminator in I<sun_path>."
1763 msgid ""
1764 "When binding a socket to an address, Linux is one of the implementations "
1765 "that append a null terminator if none is supplied in I<sun_path>. In most "
1766 "cases this is unproblematic: when the socket address is retrieved, it will "
1767 "be one byte longer than that supplied when the socket was bound. However, "
1768 "there is one case where confusing behavior can result: if 108 non-null bytes "
1769 "are supplied when a socket is bound, then the addition of the null "
1770 "terminator takes the length of the pathname beyond I<sizeof(sun_path)>. "
1771 "Consequently, when retrieving the socket address (for example, via "
1772 "B<accept>(2)), if the input I<addrlen> argument for the retrieving call is "
1773 "specified as I<sizeof(struct sockaddr_un)>, then the returned address "
1774 "structure I<won't> have a null terminator in I<sun_path>."
1775 msgstr ""
1776 "При привязке сокета к адресу Linux является одной из реализаций, которые "
1777 "добавляют конечный null, если он отсутствует в I<sun_path>. В большинстве "
1778 "случаев в этом нет проблемы: когда адрес сокета возвращается, он будет на "
1779 "один байт длиннее чем был перед привязкой сокета. Однако такое неожиданное "
1780 "поведение может привести к следующему: если передаётся 108 не-null байтов "
1781 "при привязке сокета, то с дополнительным конечным null пути превышает длину "
1782 "I<sizeof(sun_path)>. В последствии при возврате адреса сокета (например, из "
1783 "B<accept>(2)), если входной аргумент I<addrlen> перед вызовом был равен "
1784 "I<sizeof(struct sockaddr_un)>, то в I<sun_path> возвращаемой структуры "
1785 "адреса I<будет отсутствовать> конечный null."
1786
1787 #. i.e., traditional BSD
1788 #. type: Plain text
1789 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1790 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1791 msgid ""
1792 "In addition, some implementations don't require a null terminator when "
1793 "binding a socket (the I<addrlen> argument is used to determine the length of "
1794 "I<sun_path>) and when the socket address is retrieved on these "
1795 "implementations, there is no null terminator in I<sun_path>."
1796 msgstr ""
1797 "Также, некоторые реализации не требуют наличия конечного null при привязке "
1798 "сокета (для определения длины I<sun_path> используется аргумент I<addrlen>) "
1799 "и когда в этих реализациях возвращается адрес сокета, то в I<sun_path> также "
1800 "отсутствует конечный null."
1801
1802 #. type: Plain text
1803 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1804 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1805 msgid ""
1806 "Applications that retrieve socket addresses can (portably) code to handle "
1807 "the possibility that there is no null terminator in I<sun_path> by "
1808 "respecting the fact that the number of valid bytes in the pathname is:"
1809 msgstr ""
1810 "Приложения, которые получают адрес сокета могут содержать код (переносимый) "
1811 "для обработки случая, когда нет конечного null в I<sun_path>, учитывая "
1812 "фактическое количество пригодных байт в пути:"
1813
1814 #. type: Plain text
1815 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1816 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1817 #, fuzzy, no-wrap
1818 #| msgid " strnlen(addr.sun_path, addrlen - offsetof(sockaddr_un, sun_path))\n"
1819 msgid "strnlen(addr.sun_path, addrlen - offsetof(sockaddr_un, sun_path))\n"
1820 msgstr " strnlen(addr.sun_path, addrlen - offsetof(sockaddr_un, sun_path))\n"
1821
1822 #. type: Plain text
1823 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1824 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1825 msgid ""
1826 "Alternatively, an application can retrieve the socket address by allocating "
1827 "a buffer of size I<sizeof(struct sockaddr_un)+1> that is zeroed out before "
1828 "the retrieval. The retrieving call can specify I<addrlen> as "
1829 "I<sizeof(struct sockaddr_un)>, and the extra zero byte ensures that there "
1830 "will be a null terminator for the string returned in I<sun_path>:"
1831 msgstr ""
1832 "Или же приложение может перед получением адреса сокета выделить буфер "
1833 "размера I<sizeof(struct sockaddr_un)+1>, который будет обнулён перед "
1834 "возвращением. Возвращающий вызов может задать в I<addrlen> значение "
1835 "I<sizeof(struct sockaddr_un)>, и дополнительный нулевой байт здесь будет "
1836 "конечным null в строке, возвращаемой в I<sun_path>:"
1837
1838 #. type: Plain text
1839 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1840 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1841 #, fuzzy, no-wrap
1842 #| msgid ""
1843 #| "addrlen = sizeof(struct sockaddr_un);\n"
1844 #| "addrp = malloc(addrlen + 1);\n"
1845 #| "if (addrp == NULL)\n"
1846 #| " /* Handle error */ ;\n"
1847 #| "memset(addrp, 0, addrlen + 1);\n"
1848 msgid ""
1849 "void *addrp;\n"
1850 "\\&\n"
1851 "addrlen = sizeof(struct sockaddr_un);\n"
1852 "addrp = malloc(addrlen + 1);\n"
1853 "if (addrp == NULL)\n"
1854 " /* Handle error */ ;\n"
1855 "memset(addrp, 0, addrlen + 1);\n"
1856 "\\&\n"
1857 "if (getsockname(sfd, (struct sockaddr *) addrp, &addrlen)) == -1)\n"
1858 " /* handle error */ ;\n"
1859 "\\&\n"
1860 "printf(\"sun_path = %s\\[rs]n\", ((struct sockaddr_un *) addrp)-E<gt>sun_path);\n"
1861 msgstr ""
1862 "addrlen = sizeof(struct sockaddr_un);\n"
1863 "addrp = malloc(addrlen + 1);\n"
1864 "if (addrp == NULL)\n"
1865 " /* обработка ошибки */ ;\n"
1866 "memset(addrp, 0, addrlen + 1);\n"
1867
1868 #. type: Plain text
1869 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1870 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1871 msgid ""
1872 "This sort of messiness can be avoided if it is guaranteed that the "
1873 "applications that I<create> pathname sockets follow the rules outlined above "
1874 "under I<Pathname sockets>."
1875 msgstr ""
1876 "Данного беспорядка можно избежать, если гарантировать, что приложения, "
1877 "I<создающие> путевые сокеты, следуют правилам, описанным в общих чертах выше "
1878 "в I<Путевые сокеты>."
1879
1880 #. type: SH
1881 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1882 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1883 #, no-wrap
1884 msgid "EXAMPLES"
1885 msgstr "ПРИМЕРЫ"
1886
1887 #. type: Plain text
1888 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1889 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1890 msgid ""
1891 "The following code demonstrates the use of sequenced-packet sockets for "
1892 "local interprocess communication. It consists of two programs. The server "
1893 "program waits for a connection from the client program. The client sends "
1894 "each of its command-line arguments in separate messages. The server treats "
1895 "the incoming messages as integers and adds them up. The client sends the "
1896 "command string \"END\". The server sends back a message containing the sum "
1897 "of the client's integers. The client prints the sum and exits. The server "
1898 "waits for the next client to connect. To stop the server, the client is "
1899 "called with the command-line argument \"DOWN\"."
1900 msgstr ""
1901 "В следующем коде демонстрируется использование пакето-упорядочивающих "
1902 "сокетов для локального межпроцессного обмена. Он состоит из двух программ. "
1903 "Программа-сервер ждёт подключения программы-клиента. Клиент посылает свой "
1904 "каждый аргумент командной строки в виде отдельного сообщения. Сервер считает "
1905 "входящие сообщения как целые числа и складывает их. Клиент посылает строку-"
1906 "команду «END». Сервер посылает ответное сообщение, содержащее сумму чисел "
1907 "клиента. Клиент печатает сумму и завершает работу. Сервер ждёт подключение "
1908 "следующего клиента. Для остановки сервера, клиент вызывается с аргументом "
1909 "командной строки «DOWN»."
1910
1911 #. type: Plain text
1912 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1913 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1914 msgid ""
1915 "The following output was recorded while running the server in the background "
1916 "and repeatedly executing the client. Execution of the server program ends "
1917 "when it receives the \"DOWN\" command."
1918 msgstr ""
1919 "Следующий вывод был записан при работе сервера в фоновом режиме и "
1920 "повторяющемся запуске клиента. Выполнение программы-сервера завершилось "
1921 "после получения им команды «DOWN»."
1922
1923 #. type: SS
1924 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1925 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1926 #, no-wrap
1927 msgid "Example output"
1928 msgstr "Пример вывода"
1929
1930 #. type: Plain text
1931 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1932 #: opensuse-tumbleweed
1933 #, fuzzy, no-wrap
1934 #| msgid ""
1935 #| "$ B<./server &>\n"
1936 #| "[1] 25887\n"
1937 #| "$ B<./client 3 4>\n"
1938 #| "Result = 7\n"
1939 #| "$ B<./client 11 -5>\n"
1940 #| "Result = 6\n"
1941 #| "$ B<./client DOWN>\n"
1942 #| "Result = 0\n"
1943 #| "[1]+ Done ./server\n"
1944 #| "$\n"
1945 msgid ""
1946 "$B< ./server &>\n"
1947 "[1] 25887\n"
1948 "$B< ./client 3 4>;\n"
1949 "Result = 7\n"
1950 "$B< ./client 11 -5>;\n"
1951 "Result = 6\n"
1952 "$B< ./client DOWN>;\n"
1953 "Result = 0\n"
1954 "[1]+ Done ./server\n"
1955 "$\n"
1956 msgstr ""
1957 "$ B<./server &>\n"
1958 "[1] 25887\n"
1959 "$ B<./client 3 4>\n"
1960 "Результат = 7\n"
1961 "$ B<./client 11 -5>\n"
1962 "Результат = 6\n"
1963 "$ B<./client DOWN>\n"
1964 "Результат = 0\n"
1965 "[1]+ Done ./server\n"
1966 "$\n"
1967
1968 #. type: SS
1969 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1970 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1971 #, no-wrap
1972 msgid "Program source"
1973 msgstr "Исходный код программы"
1974
1975 #. type: Plain text
1976 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1977 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1978 #, fuzzy, no-wrap
1979 #| msgid ""
1980 #| "#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n"
1981 #| "#define BUFFER_SIZE 12\n"
1982 msgid ""
1983 "/*\n"
1984 " * File connection.h\n"
1985 " */\n"
1986 "#ifndef CONNECTION_H\n"
1987 "#define CONNECTION_H\n"
1988 "\\&\n"
1989 "#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n"
1990 "#define BUFFER_SIZE 12\n"
1991 "\\&\n"
1992 "#endif // include guard\n"
1993 msgstr ""
1994 "#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n"
1995 "#define BUFFER_SIZE 12\n"
1996
1997 #. type: Plain text
1998 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1999 #: opensuse-tumbleweed
2000 #, no-wrap
2001 msgid ""
2002 "/*\n"
2003 " * File server.c\n"
2004 " */\n"
2005 "\\&\n"
2006 "#include E<lt>stdio.hE<gt>\n"
2007 "#include E<lt>stdlib.hE<gt>\n"
2008 "#include E<lt>string.hE<gt>\n"
2009 "#include E<lt>sys/socket.hE<gt>\n"
2010 "#include E<lt>sys/types.hE<gt>\n"
2011 "#include E<lt>sys/un.hE<gt>\n"
2012 "#include E<lt>unistd.hE<gt>\n"
2013 "\\&\n"
2014 "#include \"connection.h\"\n"
2015 "\\&\n"
2016 "int\n"
2017 "main(void)\n"
2018 "{\n"
2019 " int down_flag = 0;\n"
2020 " int ret;\n"
2021 " int connection_socket;\n"
2022 " int data_socket;\n"
2023 " int result;\n"
2024 " ssize_t r, w;\n"
2025 " struct sockaddr_un name;\n"
2026 " char buffer[BUFFER_SIZE];\n"
2027 "\\&\n"
2028 " /* Create local socket. */\n"
2029 "\\&\n"
2030 " connection_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n"
2031 " if (connection_socket == -1) {\n"
2032 " perror(\"socket\");\n"
2033 " exit(EXIT_FAILURE);\n"
2034 " }\n"
2035 "\\&\n"
2036 " /*\n"
2037 " * For portability clear the whole structure, since some\n"
2038 " * implementations have additional (nonstandard) fields in\n"
2039 " * the structure.\n"
2040 " */\n"
2041 "\\&\n"
2042 " memset(&name, 0, sizeof(name));\n"
2043 "\\&\n"
2044 " /* Bind socket to socket name. */\n"
2045 "\\&\n"
2046 " name.sun_family = AF_UNIX;\n"
2047 " strncpy(name.sun_path, SOCKET_NAME, sizeof(name.sun_path) - 1);\n"
2048 "\\&\n"
2049 " ret = bind(connection_socket, (const struct sockaddr *) &name,\n"
2050 " sizeof(name));\n"
2051 " if (ret == -1) {\n"
2052 " perror(\"bind\");\n"
2053 " exit(EXIT_FAILURE);\n"
2054 " }\n"
2055 "\\&\n"
2056 " /*\n"
2057 " * Prepare for accepting connections. The backlog size is set\n"
2058 " * to 20. So while one request is being processed other requests\n"
2059 " * can be waiting.\n"
2060 " */\n"
2061 "\\&\n"
2062 " ret = listen(connection_socket, 20);\n"
2063 " if (ret == -1) {\n"
2064 " perror(\"listen\");\n"
2065 " exit(EXIT_FAILURE);\n"
2066 " }\n"
2067 "\\&\n"
2068 " /* This is the main loop for handling connections. */\n"
2069 "\\&\n"
2070 " for (;;) {\n"
2071 "\\&\n"
2072 " /* Wait for incoming connection. */\n"
2073 "\\&\n"
2074 " data_socket = accept(connection_socket, NULL, NULL);\n"
2075 " if (data_socket == -1) {\n"
2076 " perror(\"accept\");\n"
2077 " exit(EXIT_FAILURE);\n"
2078 " }\n"
2079 "\\&\n"
2080 " result = 0;\n"
2081 " for (;;) {\n"
2082 "\\&\n"
2083 " /* Wait for next data packet. */\n"
2084 "\\&\n"
2085 " r = read(data_socket, buffer, sizeof(buffer));\n"
2086 " if (r == -1) {\n"
2087 " perror(\"read\");\n"
2088 " exit(EXIT_FAILURE);\n"
2089 " }\n"
2090 "\\&\n"
2091 " /* Ensure buffer is 0-terminated. */\n"
2092 "\\&\n"
2093 " buffer[sizeof(buffer) - 1] = 0;\n"
2094 "\\&\n"
2095 " /* Handle commands. */\n"
2096 "\\&\n"
2097 " if (!strncmp(buffer, \"DOWN\", sizeof(buffer))) {\n"
2098 " down_flag = 1;\n"
2099 " continue;\n"
2100 " }\n"
2101 "\\&\n"
2102 " if (!strncmp(buffer, \"END\", sizeof(buffer))) {\n"
2103 " break;\n"
2104 " }\n"
2105 "\\&\n"
2106 " if (down_flag) {\n"
2107 " continue;\n"
2108 " }\n"
2109 "\\&\n"
2110 " /* Add received summand. */\n"
2111 "\\&\n"
2112 " result += atoi(buffer);\n"
2113 " }\n"
2114 "\\&\n"
2115 " /* Send result. */\n"
2116 "\\&\n"
2117 " sprintf(buffer, \"%d\", result);\n"
2118 " w = write(data_socket, buffer, sizeof(buffer));\n"
2119 " if (w == -1) {\n"
2120 " perror(\"write\");\n"
2121 " exit(EXIT_FAILURE);\n"
2122 " }\n"
2123 "\\&\n"
2124 " /* Close socket. */\n"
2125 "\\&\n"
2126 " close(data_socket);\n"
2127 "\\&\n"
2128 " /* Quit on DOWN command. */\n"
2129 "\\&\n"
2130 " if (down_flag) {\n"
2131 " break;\n"
2132 " }\n"
2133 " }\n"
2134 "\\&\n"
2135 " close(connection_socket);\n"
2136 "\\&\n"
2137 " /* Unlink the socket. */\n"
2138 "\\&\n"
2139 " unlink(SOCKET_NAME);\n"
2140 "\\&\n"
2141 " exit(EXIT_SUCCESS);\n"
2142 "}\n"
2143 msgstr ""
2144
2145 #. type: Plain text
2146 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
2147 #: opensuse-tumbleweed
2148 #, no-wrap
2149 msgid ""
2150 "/*\n"
2151 " * File client.c\n"
2152 " */\n"
2153 "\\&\n"
2154 "#include E<lt>stdio.hE<gt>\n"
2155 "#include E<lt>stdlib.hE<gt>\n"
2156 "#include E<lt>string.hE<gt>\n"
2157 "#include E<lt>sys/socket.hE<gt>\n"
2158 "#include E<lt>sys/types.hE<gt>\n"
2159 "#include E<lt>sys/un.hE<gt>\n"
2160 "#include E<lt>unistd.hE<gt>\n"
2161 "\\&\n"
2162 "#include \"connection.h\"\n"
2163 "\\&\n"
2164 "int\n"
2165 "main(int argc, char *argv[])\n"
2166 "{\n"
2167 " int ret;\n"
2168 " int data_socket;\n"
2169 " ssize_t r, w;\n"
2170 " struct sockaddr_un addr;\n"
2171 " char buffer[BUFFER_SIZE];\n"
2172 "\\&\n"
2173 " /* Create local socket. */\n"
2174 "\\&\n"
2175 " data_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n"
2176 " if (data_socket == -1) {\n"
2177 " perror(\"socket\");\n"
2178 " exit(EXIT_FAILURE);\n"
2179 " }\n"
2180 "\\&\n"
2181 " /*\n"
2182 " * For portability clear the whole structure, since some\n"
2183 " * implementations have additional (nonstandard) fields in\n"
2184 " * the structure.\n"
2185 " */\n"
2186 "\\&\n"
2187 " memset(&addr, 0, sizeof(addr));\n"
2188 "\\&\n"
2189 " /* Connect socket to socket address. */\n"
2190 "\\&\n"
2191 " addr.sun_family = AF_UNIX;\n"
2192 " strncpy(addr.sun_path, SOCKET_NAME, sizeof(addr.sun_path) - 1);\n"
2193 "\\&\n"
2194 " ret = connect(data_socket, (const struct sockaddr *) &addr,\n"
2195 " sizeof(addr));\n"
2196 " if (ret == -1) {\n"
2197 " fprintf(stderr, \"The server is down.\\[rs]n\");\n"
2198 " exit(EXIT_FAILURE);\n"
2199 " }\n"
2200 "\\&\n"
2201 " /* Send arguments. */\n"
2202 "\\&\n"
2203 " for (int i = 1; i E<lt> argc; ++i) {\n"
2204 " w = write(data_socket, argv[i], strlen(argv[i]) + 1);\n"
2205 " if (w == -1) {\n"
2206 " perror(\"write\");\n"
2207 " break;\n"
2208 " }\n"
2209 " }\n"
2210 "\\&\n"
2211 " /* Request result. */\n"
2212 "\\&\n"
2213 " strcpy(buffer, \"END\");\n"
2214 " w = write(data_socket, buffer, strlen(buffer) + 1);\n"
2215 " if (w == -1) {\n"
2216 " perror(\"write\");\n"
2217 " exit(EXIT_FAILURE);\n"
2218 " }\n"
2219 "\\&\n"
2220 " /* Receive result. */\n"
2221 "\\&\n"
2222 " r = read(data_socket, buffer, sizeof(buffer));\n"
2223 " if (r == -1) {\n"
2224 " perror(\"read\");\n"
2225 " exit(EXIT_FAILURE);\n"
2226 " }\n"
2227 "\\&\n"
2228 " /* Ensure buffer is 0-terminated. */\n"
2229 "\\&\n"
2230 " buffer[sizeof(buffer) - 1] = 0;\n"
2231 "\\&\n"
2232 " printf(\"Result = %s\\[rs]n\", buffer);\n"
2233 "\\&\n"
2234 " /* Close socket. */\n"
2235 "\\&\n"
2236 " close(data_socket);\n"
2237 "\\&\n"
2238 " exit(EXIT_SUCCESS);\n"
2239 "}\n"
2240 msgstr ""
2241
2242 #. type: Plain text
2243 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2244 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2245 #, fuzzy
2246 #| msgid "For an example of the use of B<SCM_RIGHTS> see B<cmsg>(3)."
2247 msgid ""
2248 "For examples of the use of B<SCM_RIGHTS>, see B<cmsg>(3) and "
2249 "B<seccomp_unotify>(2)."
2250 msgstr "Пример использования B<SCM_RIGHTS> приведён в B<cmsg>(3)."
2251
2252 #. type: SH
2253 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2254 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2255 #, no-wrap
2256 msgid "SEE ALSO"
2257 msgstr "СМОТРИТЕ ТАКЖЕ"
2258
2259 #. type: Plain text
2260 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2261 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2262 msgid ""
2263 "B<recvmsg>(2), B<sendmsg>(2), B<socket>(2), B<socketpair>(2), B<cmsg>(3), "
2264 "B<capabilities>(7), B<credentials>(7), B<socket>(7), B<udp>(7)"
2265 msgstr ""
2266 "B<recvmsg>(2), B<sendmsg>(2), B<socket>(2), B<socketpair>(2), B<cmsg>(3), "
2267 "B<capabilities>(7), B<credentials>(7), B<socket>(7), B<udp>(7)"
2268
2269 #. type: TH
2270 #: debian-trixie fedora-44 fedora-rawhide
2271 #, no-wrap
2272 msgid "2024-06-15"
2273 msgstr "15 июня 2024 г."
2274
2275 #. type: TH
2276 #: debian-trixie
2277 #, no-wrap
2278 msgid "Linux man-pages 6.9.1"
2279 msgstr "Страницы руководства Linux 6.9.1"
2280
2281 #. type: TP
2282 #: debian-trixie fedora-44 fedora-rawhide
2283 #, no-wrap
2284 msgid "B<SO_PEERSEC>"
2285 msgstr "B<SO_PEERSEC>"
2286
2287 #. type: Plain text
2288 #: debian-trixie fedora-44 fedora-rawhide
2289 msgid ""
2290 "This read-only socket option returns the security context of the peer socket "
2291 "connected to this socket. By default, this will be the same as the security "
2292 "context of the process that created the peer socket unless overridden by the "
2293 "policy or by a process with the required permissions."
2294 msgstr ""
2295
2296 #. type: Plain text
2297 #: debian-trixie fedora-44 fedora-rawhide
2298 msgid ""
2299 "The argument to B<getsockopt>(2) is a pointer to a buffer of the specified "
2300 "length in bytes into which the security context string will be copied. If "
2301 "the buffer length is less than the length of the security context string, "
2302 "then B<getsockopt>(2) returns -1, sets I<errno> to B<ERANGE>, and returns "
2303 "the required length via I<optlen>. The caller should allocate at least "
2304 "B<NAME_MAX> bytes for the buffer initially, although this is not guaranteed "
2305 "to be sufficient. Resizing the buffer to the returned length and retrying "
2306 "may be necessary."
2307 msgstr ""
2308
2309 #. type: Plain text
2310 #: debian-trixie fedora-44 fedora-rawhide
2311 msgid ""
2312 "The security context string may include a terminating null character in the "
2313 "returned length, but is not guaranteed to do so: a security context \"foo\" "
2314 "might be represented as either {'f','o','o'} of length 3 or "
2315 "{'f','o','o','\\e0'} of length 4, which are considered to be "
2316 "interchangeable. The string is printable, does not contain non-terminating "
2317 "null characters, and is in an unspecified encoding (in particular, it is not "
2318 "guaranteed to be ASCII or UTF-8)."
2319 msgstr ""
2320
2321 #. commit 0b811db2cb2aabc910e53d34ebb95a15997c33e7
2322 #. type: Plain text
2323 #: debian-trixie fedora-44 fedora-rawhide
2324 #, fuzzy
2325 #| msgid ""
2326 #| "The use of this option is possible only for connected B<AF_UNIX> stream "
2327 #| "sockets and for B<AF_UNIX> stream and datagram socket pairs created using "
2328 #| "B<socketpair>(2)."
2329 msgid ""
2330 "The use of this option for sockets in the B<AF_UNIX> address family is "
2331 "supported since Linux 2.6.2 for connected stream sockets, and since Linux "
2332 "4.18 also for stream and datagram socket pairs created using "
2333 "B<socketpair>(2)."
2334 msgstr ""
2335 "Использование этого параметра возможо только для соединённых потоковых "
2336 "сокетов B<AF_UNIX> и потоков B<AF_UNIX> и для дейтаграммных сокетных пар, "
2337 "созданных с помощью B<socketpair>(2)."
2338
2339 #. type: Plain text
2340 #: debian-trixie fedora-44 fedora-rawhide
2341 #, no-wrap
2342 msgid ""
2343 "$ B<./server &>\n"
2344 "[1] 25887\n"
2345 "$ B<./client 3 4>\n"
2346 "Result = 7\n"
2347 "$ B<./client 11 -5>\n"
2348 "Result = 6\n"
2349 "$ B<./client DOWN>\n"
2350 "Result = 0\n"
2351 "[1]+ Done ./server\n"
2352 "$\n"
2353 msgstr ""
2354 "$ B<./server &>\n"
2355 "[1] 25887\n"
2356 "$ B<./client 3 4>\n"
2357 "Результат = 7\n"
2358 "$ B<./client 11 -5>\n"
2359 "Результат = 6\n"
2360 "$ B<./client DOWN>\n"
2361 "Результат = 0\n"
2362 "[1]+ Done ./server\n"
2363 "$\n"
2364
2365 #. type: Plain text
2366 #: debian-trixie fedora-44 fedora-rawhide
2367 #, no-wrap
2368 msgid ""
2369 "/*\n"
2370 " * File server.c\n"
2371 " */\n"
2372 "\\&\n"
2373 "#include E<lt>stdio.hE<gt>\n"
2374 "#include E<lt>stdlib.hE<gt>\n"
2375 "#include E<lt>string.hE<gt>\n"
2376 "#include E<lt>sys/socket.hE<gt>\n"
2377 "#include E<lt>sys/types.hE<gt>\n"
2378 "#include E<lt>sys/un.hE<gt>\n"
2379 "#include E<lt>unistd.hE<gt>\n"
2380 "\\&\n"
2381 "#include \"connection.h\"\n"
2382 "\\&\n"
2383 "int\n"
2384 "main(void)\n"
2385 "{\n"
2386 " int down_flag = 0;\n"
2387 " int ret;\n"
2388 " int connection_socket;\n"
2389 " int data_socket;\n"
2390 " int result;\n"
2391 " ssize_t r, w;\n"
2392 " struct sockaddr_un name;\n"
2393 " char buffer[BUFFER_SIZE];\n"
2394 "\\&\n"
2395 " /* Create local socket. */\n"
2396 "\\&\n"
2397 " connection_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n"
2398 " if (connection_socket == -1) {\n"
2399 " perror(\"socket\");\n"
2400 " exit(EXIT_FAILURE);\n"
2401 " }\n"
2402 "\\&\n"
2403 " /*\n"
2404 " * For portability clear the whole structure, since some\n"
2405 " * implementations have additional (nonstandard) fields in\n"
2406 " * the structure.\n"
2407 " */\n"
2408 "\\&\n"
2409 " memset(&name, 0, sizeof(name));\n"
2410 "\\&\n"
2411 " /* Bind socket to socket name. */\n"
2412 "\\&\n"
2413 " name.sun_family = AF_UNIX;\n"
2414 " strncpy(name.sun_path, SOCKET_NAME, sizeof(name.sun_path) - 1);\n"
2415 "\\&\n"
2416 " ret = bind(connection_socket, (const struct sockaddr *) &name,\n"
2417 " sizeof(name));\n"
2418 " if (ret == -1) {\n"
2419 " perror(\"bind\");\n"
2420 " exit(EXIT_FAILURE);\n"
2421 " }\n"
2422 "\\&\n"
2423 " /*\n"
2424 " * Prepare for accepting connections. The backlog size is set\n"
2425 " * to 20. So while one request is being processed other requests\n"
2426 " * can be waiting.\n"
2427 " */\n"
2428 "\\&\n"
2429 " ret = listen(connection_socket, 20);\n"
2430 " if (ret == -1) {\n"
2431 " perror(\"listen\");\n"
2432 " exit(EXIT_FAILURE);\n"
2433 " }\n"
2434 "\\&\n"
2435 " /* This is the main loop for handling connections. */\n"
2436 "\\&\n"
2437 " for (;;) {\n"
2438 "\\&\n"
2439 " /* Wait for incoming connection. */\n"
2440 "\\&\n"
2441 " data_socket = accept(connection_socket, NULL, NULL);\n"
2442 " if (data_socket == -1) {\n"
2443 " perror(\"accept\");\n"
2444 " exit(EXIT_FAILURE);\n"
2445 " }\n"
2446 "\\&\n"
2447 " result = 0;\n"
2448 " for (;;) {\n"
2449 "\\&\n"
2450 " /* Wait for next data packet. */\n"
2451 "\\&\n"
2452 " r = read(data_socket, buffer, sizeof(buffer));\n"
2453 " if (r == -1) {\n"
2454 " perror(\"read\");\n"
2455 " exit(EXIT_FAILURE);\n"
2456 " }\n"
2457 "\\&\n"
2458 " /* Ensure buffer is 0-terminated. */\n"
2459 "\\&\n"
2460 " buffer[sizeof(buffer) - 1] = 0;\n"
2461 "\\&\n"
2462 " /* Handle commands. */\n"
2463 "\\&\n"
2464 " if (!strncmp(buffer, \"DOWN\", sizeof(buffer))) {\n"
2465 " down_flag = 1;\n"
2466 " continue;\n"
2467 " }\n"
2468 "\\&\n"
2469 " if (!strncmp(buffer, \"END\", sizeof(buffer))) {\n"
2470 " break;\n"
2471 " }\n"
2472 "\\&\n"
2473 " if (down_flag) {\n"
2474 " continue;\n"
2475 " }\n"
2476 "\\&\n"
2477 " /* Add received summand. */\n"
2478 "\\&\n"
2479 " result += atoi(buffer);\n"
2480 " }\n"
2481 "\\&\n"
2482 " /* Send result. */\n"
2483 "\\&\n"
2484 " sprintf(buffer, \"%d\", result);\n"
2485 " w = write(data_socket, buffer, sizeof(buffer));\n"
2486 " if (w == -1) {\n"
2487 " perror(\"write\");\n"
2488 " exit(EXIT_FAILURE);\n"
2489 " }\n"
2490 "\\&\n"
2491 " /* Close socket. */\n"
2492 "\\&\n"
2493 " close(data_socket);\n"
2494 "\\&\n"
2495 " /* Quit on DOWN command. */\n"
2496 "\\&\n"
2497 " if (down_flag) {\n"
2498 " break;\n"
2499 " }\n"
2500 " }\n"
2501 "\\&\n"
2502 " close(connection_socket);\n"
2503 "\\&\n"
2504 " /* Unlink the socket. */\n"
2505 "\\&\n"
2506 " unlink(SOCKET_NAME);\n"
2507 "\\&\n"
2508 " exit(EXIT_SUCCESS);\n"
2509 "}\n"
2510 msgstr ""
2511
2512 #. type: Plain text
2513 #: debian-trixie fedora-44 fedora-rawhide
2514 #, no-wrap
2515 msgid ""
2516 "/*\n"
2517 " * File client.c\n"
2518 " */\n"
2519 "\\&\n"
2520 "#include E<lt>stdio.hE<gt>\n"
2521 "#include E<lt>stdlib.hE<gt>\n"
2522 "#include E<lt>string.hE<gt>\n"
2523 "#include E<lt>sys/socket.hE<gt>\n"
2524 "#include E<lt>sys/types.hE<gt>\n"
2525 "#include E<lt>sys/un.hE<gt>\n"
2526 "#include E<lt>unistd.hE<gt>\n"
2527 "\\&\n"
2528 "#include \"connection.h\"\n"
2529 "\\&\n"
2530 "int\n"
2531 "main(int argc, char *argv[])\n"
2532 "{\n"
2533 " int ret;\n"
2534 " int data_socket;\n"
2535 " ssize_t r, w;\n"
2536 " struct sockaddr_un addr;\n"
2537 " char buffer[BUFFER_SIZE];\n"
2538 "\\&\n"
2539 " /* Create local socket. */\n"
2540 "\\&\n"
2541 " data_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n"
2542 " if (data_socket == -1) {\n"
2543 " perror(\"socket\");\n"
2544 " exit(EXIT_FAILURE);\n"
2545 " }\n"
2546 "\\&\n"
2547 " /*\n"
2548 " * For portability clear the whole structure, since some\n"
2549 " * implementations have additional (nonstandard) fields in\n"
2550 " * the structure.\n"
2551 " */\n"
2552 "\\&\n"
2553 " memset(&addr, 0, sizeof(addr));\n"
2554 "\\&\n"
2555 " /* Connect socket to socket address. */\n"
2556 "\\&\n"
2557 " addr.sun_family = AF_UNIX;\n"
2558 " strncpy(addr.sun_path, SOCKET_NAME, sizeof(addr.sun_path) - 1);\n"
2559 "\\&\n"
2560 " ret = connect(data_socket, (const struct sockaddr *) &addr,\n"
2561 " sizeof(addr));\n"
2562 " if (ret == -1) {\n"
2563 " fprintf(stderr, \"The server is down.\\[rs]n\");\n"
2564 " exit(EXIT_FAILURE);\n"
2565 " }\n"
2566 "\\&\n"
2567 " /* Send arguments. */\n"
2568 "\\&\n"
2569 " for (int i = 1; i E<lt> argc; ++i) {\n"
2570 " w = write(data_socket, argv[i], strlen(argv[i]) + 1);\n"
2571 " if (w == -1) {\n"
2572 " perror(\"write\");\n"
2573 " break;\n"
2574 " }\n"
2575 " }\n"
2576 "\\&\n"
2577 " /* Request result. */\n"
2578 "\\&\n"
2579 " strcpy(buffer, \"END\");\n"
2580 " w = write(data_socket, buffer, strlen(buffer) + 1);\n"
2581 " if (w == -1) {\n"
2582 " perror(\"write\");\n"
2583 " exit(EXIT_FAILURE);\n"
2584 " }\n"
2585 "\\&\n"
2586 " /* Receive result. */\n"
2587 "\\&\n"
2588 " r = read(data_socket, buffer, sizeof(buffer));\n"
2589 " if (r == -1) {\n"
2590 " perror(\"read\");\n"
2591 " exit(EXIT_FAILURE);\n"
2592 " }\n"
2593 "\\&\n"
2594 " /* Ensure buffer is 0-terminated. */\n"
2595 "\\&\n"
2596 " buffer[sizeof(buffer) - 1] = 0;\n"
2597 "\\&\n"
2598 " printf(\"Result = %s\\[rs]n\", buffer);\n"
2599 "\\&\n"
2600 " /* Close socket. */\n"
2601 "\\&\n"
2602 " close(data_socket);\n"
2603 "\\&\n"
2604 " exit(EXIT_SUCCESS);\n"
2605 "}\n"
2606 msgstr ""
2607
2608 #. type: TH
2609 #: fedora-44 fedora-rawhide
2610 #, no-wrap
2611 msgid "Linux man-pages 6.13"
2612 msgstr "Страницы руководства Linux 6.13"
2613
2614 #. type: TH
2615 #: mageia-cauldron
2616 #, no-wrap
2617 msgid "Linux man-pages 6.17"
2618 msgstr "Страницы руководства Linux 6.17"
2619
2620 #. type: TH
2621 #: opensuse-leap-16-1 opensuse-tumbleweed
2622 #, no-wrap
2623 msgid "Linux man-pages (unreleased)"
2624 msgstr "Страницы руководства Linux (не выпущены)"