Debian Codegraph @

templates/man3/getutent.3.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:26+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "getutent"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid ""
50 "getutent, getutid, getutline, pututline, setutent, endutent, utmpname - "
51 "access utmp file entries"
52 msgstr ""
53
54 #. type: SH
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 #, no-wrap
58 msgid "LIBRARY"
59 msgstr ""
60
61 #. type: Plain text
62 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
63 #: opensuse-leap-16-1 opensuse-tumbleweed
64 msgid "Standard C library (I<libc>,\\ I<-lc>)"
65 msgstr ""
66
67 #. type: SH
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, no-wrap
71 msgid "SYNOPSIS"
72 msgstr ""
73
74 #. type: Plain text
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 #, no-wrap
78 msgid "B<#include E<lt>utmp.hE<gt>>\n"
79 msgstr ""
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 #, no-wrap
85 msgid ""
86 "B<struct utmp *getutent(void);>\n"
87 "B<struct utmp *getutid(const struct utmp *>I<ut>B<);>\n"
88 "B<struct utmp *getutline(const struct utmp *>I<ut>B<);>\n"
89 msgstr ""
90
91 #. type: Plain text
92 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
93 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
94 #, no-wrap
95 msgid "B<struct utmp *pututline(const struct utmp *>I<ut>B<);>\n"
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 #, no-wrap
102 msgid ""
103 "B<void setutent(void);>\n"
104 "B<void endutent(void);>\n"
105 msgstr ""
106
107 #. type: Plain text
108 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
109 #: opensuse-tumbleweed
110 #, no-wrap
111 msgid "B<int utmpname(const char *>I<path>B<);>\n"
112 msgstr ""
113
114 #. type: SH
115 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
116 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
117 #, no-wrap
118 msgid "DESCRIPTION"
119 msgstr ""
120
121 #. type: Plain text
122 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
123 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
124 msgid ""
125 "New applications should use the POSIX.1-specified \"utmpx\" versions of "
126 "these functions; see STANDARDS."
127 msgstr ""
128
129 #. type: Plain text
130 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
131 #: opensuse-tumbleweed
132 msgid ""
133 "B<utmpname>() sets the pathname of the utmp-format file for the other utmp "
134 "functions to access. If B<utmpname>() is not used to set the pathname "
135 "before the other functions are used, they assume B<_PATH_UTMP>, as defined "
136 "in I<E<lt>paths.hE<gt>>."
137 msgstr ""
138
139 #. type: Plain text
140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
142 msgid ""
143 "B<setutent>() rewinds the file pointer to the beginning of the utmp file. "
144 "It is generally a good idea to call it before any of the other functions."
145 msgstr ""
146
147 #. type: Plain text
148 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
149 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
150 msgid ""
151 "B<endutent>() closes the utmp file. It should be called when the user code "
152 "is done accessing the file with the other functions."
153 msgstr ""
154
155 #. type: Plain text
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 msgid ""
159 "B<getutent>() reads a line from the current file position in the utmp "
160 "file. It returns a pointer to a structure containing the fields of the "
161 "line. The definition of this structure is shown in B<utmp>(5)."
162 msgstr ""
163
164 #. type: Plain text
165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
167 msgid ""
168 "B<getutid>() searches forward from the current file position in the utmp "
169 "file based upon I<ut>. If I<ut-E<gt>ut_type> is one of B<RUN_LVL>, "
170 "B<BOOT_TIME>, B<NEW_TIME>, or B<OLD_TIME>, B<getutid>() will find the first "
171 "entry whose I<ut_type> field matches I<ut-E<gt>ut_type>. If I<ut-"
172 "E<gt>ut_type> is one of B<INIT_PROCESS>, B<LOGIN_PROCESS>, B<USER_PROCESS>, "
173 "or B<DEAD_PROCESS>, B<getutid>() will find the first entry whose I<ut_id> "
174 "field matches I<ut-E<gt>ut_id>."
175 msgstr ""
176
177 #. type: Plain text
178 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
179 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
180 msgid ""
181 "B<getutline>() searches forward from the current file position in the utmp "
182 "file. It scans entries whose I<ut_type> is B<USER_PROCESS> or "
183 "B<LOGIN_PROCESS> and returns the first one whose I<ut_line> field matches "
184 "I<ut-E<gt>ut_line>."
185 msgstr ""
186
187 #. type: Plain text
188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
190 msgid ""
191 "B<pututline>() writes the I<utmp> structure I<ut> into the utmp file. It "
192 "uses B<getutid>() to search for the proper place in the file to insert the "
193 "new entry. If it cannot find an appropriate slot for I<ut>, B<pututline>() "
194 "will append the new entry to the end of the file."
195 msgstr ""
196
197 #. type: SH
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 #, no-wrap
201 msgid "RETURN VALUE"
202 msgstr ""
203
204 #. type: Plain text
205 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
206 #: opensuse-tumbleweed
207 msgid ""
208 "B<getutent>(), B<getutid>(), and B<getutline>() return a pointer to a "
209 "I<struct\\ utmp> on success, and NULL on failure (which includes the "
210 "\"record not found\" case). This I<struct\\ utmp> is allocated in static "
211 "storage, and may be overwritten by subsequent calls."
212 msgstr ""
213
214 #. type: Plain text
215 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
216 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
217 msgid "On success B<pututline>() returns I<ut>; on failure, it returns NULL."
218 msgstr ""
219
220 #. type: Plain text
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 msgid ""
224 "B<utmpname>() returns 0 if the new name was successfully stored, or -1 on "
225 "failure."
226 msgstr ""
227
228 #. type: Plain text
229 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
230 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
231 msgid "On failure, these functions I<errno> set to indicate the error."
232 msgstr ""
233
234 #. type: SH
235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
237 #, no-wrap
238 msgid "ERRORS"
239 msgstr ""
240
241 #. type: TP
242 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
243 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
244 #, no-wrap
245 msgid "B<ENOMEM>"
246 msgstr ""
247
248 #. type: Plain text
249 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
250 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
251 msgid "Out of memory."
252 msgstr ""
253
254 #. type: TP
255 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
256 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
257 #, no-wrap
258 msgid "B<ESRCH>"
259 msgstr ""
260
261 #. type: Plain text
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 msgid "Record not found."
265 msgstr ""
266
267 #. type: Plain text
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 msgid ""
271 "B<setutent>(), B<pututline>(), and the B<getut*>() functions can also fail "
272 "for the reasons described in B<open>(2)."
273 msgstr ""
274
275 #. type: SH
276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
278 #, no-wrap
279 msgid "FILES"
280 msgstr ""
281
282 #. type: TP
283 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
284 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
285 #, no-wrap
286 msgid "I</var/run/utmp>"
287 msgstr ""
288
289 #. type: Plain text
290 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
291 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
292 msgid "database of currently logged-in users"
293 msgstr ""
294
295 #. type: TP
296 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
297 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
298 #, no-wrap
299 msgid "I</var/log/wtmp>"
300 msgstr ""
301
302 #. type: Plain text
303 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
304 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
305 msgid "database of past user logins"
306 msgstr ""
307
308 #. type: SH
309 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
310 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
311 #, no-wrap
312 msgid "ATTRIBUTES"
313 msgstr ""
314
315 #. type: Plain text
316 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
317 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
318 msgid ""
319 "For an explanation of the terms used in this section, see B<attributes>(7)."
320 msgstr ""
321
322 #. type: tbl table
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 #, no-wrap
326 msgid "Interface"
327 msgstr ""
328
329 #. type: tbl table
330 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
331 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
332 #, no-wrap
333 msgid "Attribute"
334 msgstr ""
335
336 #. type: tbl table
337 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
338 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
339 #, no-wrap
340 msgid "Value"
341 msgstr ""
342
343 #. type: tbl table
344 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
345 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
346 #, no-wrap
347 msgid ".na\n"
348 msgstr ""
349
350 #. type: tbl table
351 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
352 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
353 #, no-wrap
354 msgid ".nh\n"
355 msgstr ""
356
357 #. type: tbl table
358 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
359 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
360 #, no-wrap
361 msgid "B<getutent>()"
362 msgstr ""
363
364 #. type: tbl table
365 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
366 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
367 #, no-wrap
368 msgid "Thread safety"
369 msgstr ""
370
371 #. type: tbl table
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 #, no-wrap
375 msgid ""
376 "MT-Unsafe init race:utent\n"
377 "race:utentbuf sig:ALRM timer"
378 msgstr ""
379
380 #. type: tbl table
381 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
382 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
383 #, no-wrap
384 msgid ""
385 "B<getutid>(),\n"
386 "B<getutline>()"
387 msgstr ""
388
389 #. type: tbl table
390 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
391 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
392 #, no-wrap
393 msgid ""
394 "MT-Unsafe init race:utent\n"
395 "sig:ALRM timer"
396 msgstr ""
397
398 #. type: tbl table
399 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
400 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
401 #, no-wrap
402 msgid "B<pututline>()"
403 msgstr ""
404
405 #. type: tbl table
406 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
407 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
408 #, no-wrap
409 msgid ""
410 "MT-Unsafe race:utent\n"
411 "sig:ALRM timer"
412 msgstr ""
413
414 #. type: tbl table
415 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
416 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
417 #, no-wrap
418 msgid ""
419 "B<setutent>(),\n"
420 "B<endutent>(),\n"
421 "B<utmpname>()"
422 msgstr ""
423
424 #. type: tbl table
425 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
426 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
427 #, no-wrap
428 msgid "MT-Unsafe race:utent"
429 msgstr ""
430
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 "In the above table, I<utent> in I<race:utent> signifies that if any of the "
436 "functions B<setutent>(), B<getutent>(), B<getutid>(), B<getutline>(), "
437 "B<pututline>(), B<utmpname>(), or B<endutent>() are used in parallel in "
438 "different threads of a program, then data races could occur."
439 msgstr ""
440
441 #. type: SH
442 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
443 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
444 #, no-wrap
445 msgid "STANDARDS"
446 msgstr ""
447
448 #. type: Plain text
449 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
450 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
451 msgid "None."
452 msgstr ""
453
454 #. type: SH
455 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
456 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
457 #, no-wrap
458 msgid "HISTORY"
459 msgstr ""
460
461 #. type: Plain text
462 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
463 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
464 msgid "XPG2, SVr4."
465 msgstr ""
466
467 #. type: Plain text
468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
470 msgid ""
471 "In XPG2 and SVID 2 the function B<pututline>() is documented to return "
472 "void, and that is what it does on many systems (AIX, HP-UX). HP-UX "
473 "introduces a new function B<_pututline>() with the prototype given above "
474 "for B<pututline>()."
475 msgstr ""
476
477 #. type: Plain text
478 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
479 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
480 msgid ""
481 "All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and "
482 "POSIX.1-2008, following SUSv1, does not have any of these functions, but "
483 "instead uses"
484 msgstr ""
485
486 #. type: Plain text
487 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
488 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
489 #, no-wrap
490 msgid "B<#include E<lt>utmpx.hE<gt>>\n"
491 msgstr ""
492
493 #. type: Plain text
494 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
495 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
496 #, no-wrap
497 msgid ""
498 "B<struct utmpx *getutxent(void);>\n"
499 "B<struct utmpx *getutxid(const struct utmpx *);>\n"
500 "B<struct utmpx *getutxline(const struct utmpx *);>\n"
501 "B<struct utmpx *pututxline(const struct utmpx *);>\n"
502 "B<void setutxent(void);>\n"
503 "B<void endutxent(void);>\n"
504 msgstr ""
505
506 #. type: Plain text
507 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
508 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
509 msgid ""
510 "These functions are provided by glibc, and perform the same task as their "
511 "equivalents without the \"x\", but use I<struct utmpx>, defined on Linux to "
512 "be the same as I<struct utmp>. For completeness, glibc also provides "
513 "B<utmpxname>(), although this function is not specified by POSIX.1."
514 msgstr ""
515
516 #. type: Plain text
517 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
518 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
519 msgid ""
520 "On some other systems, the I<utmpx> structure is a superset of the I<utmp> "
521 "structure, with additional fields, and larger versions of the existing "
522 "fields, and parallel files are maintained, often I</var/*/utmpx> and I</var/"
523 "*/wtmpx>."
524 msgstr ""
525
526 #. type: Plain text
527 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
528 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
529 msgid ""
530 "Linux glibc on the other hand does not use a parallel I<utmpx> file since "
531 "its I<utmp> structure is already large enough. The \"x\" functions listed "
532 "above are just aliases for their counterparts without the \"x\" (e.g., "
533 "B<getutxent>() is an alias for B<getutent>())."
534 msgstr ""
535
536 #. type: SH
537 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
538 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
539 #, no-wrap
540 msgid "NOTES"
541 msgstr ""
542
543 #. type: SS
544 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
545 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
546 #, no-wrap
547 msgid "glibc notes"
548 msgstr ""
549
550 #. type: Plain text
551 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
552 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
553 msgid "The above functions are not thread-safe. glibc adds reentrant versions"
554 msgstr ""
555
556 #. type: Plain text
557 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
558 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
559 #, no-wrap
560 msgid ""
561 "B<int getutent_r(struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
562 "B<int getutid_r(struct utmp *>I<ut>B<,>\n"
563 "B< struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
564 "B<int getutline_r(struct utmp *>I<ut>B<,>\n"
565 "B< struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
566 msgstr ""
567
568 #. type: Plain text
569 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
570 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
571 msgid ""
572 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
573 msgstr ""
574
575 #. type: Plain text
576 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
577 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
578 msgid "B<getutent_r>(), B<getutid_r>(), B<getutline_r>():"
579 msgstr ""
580
581 #. type: Plain text
582 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
583 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
584 #, no-wrap
585 msgid ""
586 " _GNU_SOURCE\n"
587 " || /* Since glibc 2.19: */ _DEFAULT_SOURCE\n"
588 " || /* glibc E<lt>= 2.19: */ _SVID_SOURCE || _BSD_SOURCE\n"
589 msgstr ""
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 "These functions are GNU extensions, analogs of the functions of the same "
596 "name without the _r suffix. The I<ubuf> argument gives these functions a "
597 "place to store their result. On success, they return 0, and a pointer to "
598 "the result is written in I<*ubufp>. On error, these functions return -1. "
599 "There are no utmpx equivalents of the above functions. (POSIX.1 does not "
600 "specify such functions.)"
601 msgstr ""
602
603 #. type: SH
604 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
605 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
606 #, no-wrap
607 msgid "EXAMPLES"
608 msgstr ""
609
610 #. type: Plain text
611 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
612 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
613 msgid ""
614 "The following example adds and removes a utmp record, assuming it is run "
615 "from within a pseudo terminal. For usage in a real application, you should "
616 "check the return values of B<getpwuid>(3) and B<ttyname>(3)."
617 msgstr ""
618
619 #. type: Plain text
620 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
621 #: opensuse-leap-16-1 opensuse-tumbleweed
622 #, no-wrap
623 msgid ""
624 "#include E<lt>err.hE<gt>\n"
625 "#include E<lt>pwd.hE<gt>\n"
626 "#include E<lt>stdlib.hE<gt>\n"
627 "#include E<lt>string.hE<gt>\n"
628 "#include E<lt>time.hE<gt>\n"
629 "#include E<lt>unistd.hE<gt>\n"
630 "#include E<lt>utmp.hE<gt>\n"
631 "\\&\n"
632 "int\n"
633 "main(void)\n"
634 "{\n"
635 " struct utmp entry;\n"
636 "\\&\n"
637 " if (system(\"echo before adding entry:;who\") == -1)\n"
638 " err(EXIT_FAILURE, \"system\");\n"
639 "\\&\n"
640 " entry.ut_type = USER_PROCESS;\n"
641 " entry.ut_pid = getpid();\n"
642 " strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen(\"/dev/\"));\n"
643 " /* only correct for ptys named /dev/tty[pqr][0-9a-z] */\n"
644 " strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen(\"/dev/tty\"));\n"
645 " entry.ut_time = time(NULL);\n"
646 " strcpy(entry.ut_user, getpwuid(getuid())-E<gt>pw_name);\n"
647 " memset(entry.ut_host, 0, UT_HOSTSIZE);\n"
648 " entry.ut_addr = 0;\n"
649 " setutent();\n"
650 " if (pututline(&entry) == NULL)\n"
651 " err(EXIT_FAILURE, \"pututline\");\n"
652 "\\&\n"
653 " if (system(\"echo after adding entry:;who\") == -1)\n"
654 " err(EXIT_FAILURE, \"system\");\n"
655 "\\&\n"
656 " entry.ut_type = DEAD_PROCESS;\n"
657 " memset(entry.ut_line, 0, UT_LINESIZE);\n"
658 " entry.ut_time = 0;\n"
659 " memset(entry.ut_user, 0, UT_NAMESIZE);\n"
660 " setutent();\n"
661 " if (pututline(&entry) == NULL)\n"
662 " err(EXIT_FAILURE, \"pututline\");\n"
663 "\\&\n"
664 " if (system(\"echo after removing entry:;who\") == -1)\n"
665 " err(EXIT_FAILURE, \"system\");\n"
666 "\\&\n"
667 " endutent();\n"
668 " exit(EXIT_SUCCESS);\n"
669 "}\n"
670 msgstr ""
671
672 #. SRC END
673 #. type: SH
674 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
675 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
676 #, no-wrap
677 msgid "SEE ALSO"
678 msgstr ""
679
680 #. type: Plain text
681 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
682 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
683 msgid "B<getutmp>(3), B<utmp>(5)"
684 msgstr ""
685
686 #. type: TH
687 #: debian-trixie
688 #, no-wrap
689 msgid "2024-05-02"
690 msgstr ""
691
692 #. type: TH
693 #: debian-trixie
694 #, no-wrap
695 msgid "Linux man-pages 6.9.1"
696 msgstr ""
697
698 #. type: Plain text
699 #: debian-trixie
700 msgid "Standard C library (I<libc>, I<-lc>)"
701 msgstr ""
702
703 #. type: Plain text
704 #: debian-trixie fedora-44 fedora-rawhide
705 #, no-wrap
706 msgid "B<int utmpname(const char *>I<file>B<);>\n"
707 msgstr ""
708
709 #. type: Plain text
710 #: debian-trixie fedora-44 fedora-rawhide
711 msgid ""
712 "B<utmpname>() sets the name of the utmp-format file for the other utmp "
713 "functions to access. If B<utmpname>() is not used to set the filename "
714 "before the other functions are used, they assume B<_PATH_UTMP>, as defined "
715 "in I<E<lt>paths.hE<gt>>."
716 msgstr ""
717
718 #. type: Plain text
719 #: debian-trixie fedora-44 fedora-rawhide
720 msgid ""
721 "B<getutent>(), B<getutid>(), and B<getutline>() return a pointer to a "
722 "I<struct utmp> on success, and NULL on failure (which includes the \"record "
723 "not found\" case). This I<struct utmp> is allocated in static storage, and "
724 "may be overwritten by subsequent calls."
725 msgstr ""
726
727 #. type: Plain text
728 #: debian-trixie
729 #, no-wrap
730 msgid ""
731 "#include E<lt>pwd.hE<gt>\n"
732 "#include E<lt>stdlib.hE<gt>\n"
733 "#include E<lt>string.hE<gt>\n"
734 "#include E<lt>time.hE<gt>\n"
735 "#include E<lt>unistd.hE<gt>\n"
736 "#include E<lt>utmp.hE<gt>\n"
737 "\\&\n"
738 "int\n"
739 "main(void)\n"
740 "{\n"
741 " struct utmp entry;\n"
742 "\\&\n"
743 " system(\"echo before adding entry:;who\");\n"
744 "\\&\n"
745 " entry.ut_type = USER_PROCESS;\n"
746 " entry.ut_pid = getpid();\n"
747 " strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen(\"/dev/\"));\n"
748 " /* only correct for ptys named /dev/tty[pqr][0-9a-z] */\n"
749 " strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen(\"/dev/tty\"));\n"
750 " entry.ut_time = time(NULL);\n"
751 " strcpy(entry.ut_user, getpwuid(getuid())-E<gt>pw_name);\n"
752 " memset(entry.ut_host, 0, UT_HOSTSIZE);\n"
753 " entry.ut_addr = 0;\n"
754 " setutent();\n"
755 " pututline(&entry);\n"
756 "\\&\n"
757 " system(\"echo after adding entry:;who\");\n"
758 "\\&\n"
759 " entry.ut_type = DEAD_PROCESS;\n"
760 " memset(entry.ut_line, 0, UT_LINESIZE);\n"
761 " entry.ut_time = 0;\n"
762 " memset(entry.ut_user, 0, UT_NAMESIZE);\n"
763 " setutent();\n"
764 " pututline(&entry);\n"
765 "\\&\n"
766 " system(\"echo after removing entry:;who\");\n"
767 "\\&\n"
768 " endutent();\n"
769 " exit(EXIT_SUCCESS);\n"
770 "}\n"
771 msgstr ""
772
773 #. type: TH
774 #: fedora-44 fedora-rawhide
775 #, no-wrap
776 msgid "2024-07-23"
777 msgstr ""
778
779 #. type: TH
780 #: fedora-44 fedora-rawhide
781 #, no-wrap
782 msgid "Linux man-pages 6.13"
783 msgstr ""
784
785 #. type: TH
786 #: mageia-cauldron
787 #, no-wrap
788 msgid "Linux man-pages 6.17"
789 msgstr ""
790
791 #. type: TH
792 #: opensuse-leap-16-1 opensuse-tumbleweed
793 #, no-wrap
794 msgid "Linux man-pages (unreleased)"
795 msgstr ""