OSDN Git Service

(split) LDP: Force update POT and ja.po
[linuxjm/LDP_man-pages.git] / po4a / utmp / po / utmp.pot
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: 2013-03-26 16:48+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\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 #: build/C/man3/getutent.3:31
21 #, no-wrap
22 msgid "GETUTENT"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man3/getutent.3:31
27 #, no-wrap
28 msgid "2008-06-29"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man3/getutent.3:31 build/C/man3/getutmp.3:26 build/C/man3/login.3:25 build/C/man3/updwtmp.3:29 build/C/man5/utmp.5:30
33 #, no-wrap
34 msgid "Linux Programmer's Manual"
35 msgstr ""
36
37 #. type: SH
38 #: build/C/man3/getutent.3:32 build/C/man3/getutmp.3:27 build/C/man3/login.3:26 build/C/man3/updwtmp.3:30 build/C/man5/utmp.5:31
39 #, no-wrap
40 msgid "NAME"
41 msgstr ""
42
43 #. type: Plain text
44 #: build/C/man3/getutent.3:35
45 msgid ""
46 "getutent, getutid, getutline, pututline, setutent, endutent, utmpname - "
47 "access utmp file entries"
48 msgstr ""
49
50 #. type: SH
51 #: build/C/man3/getutent.3:35 build/C/man3/getutmp.3:29 build/C/man3/login.3:28 build/C/man3/updwtmp.3:32 build/C/man5/utmp.5:33
52 #, no-wrap
53 msgid "SYNOPSIS"
54 msgstr ""
55
56 #. type: Plain text
57 #: build/C/man3/getutent.3:37 build/C/man3/login.3:30 build/C/man5/utmp.5:35
58 msgid "B<#include E<lt>utmp.hE<gt>>"
59 msgstr ""
60
61 #. type: Plain text
62 #: build/C/man3/getutent.3:39
63 msgid "B<struct utmp *getutent(void);>"
64 msgstr ""
65
66 #. type: Plain text
67 #: build/C/man3/getutent.3:41
68 msgid "B<struct utmp *getutid(struct utmp *>I<ut>B<);>"
69 msgstr ""
70
71 #. type: Plain text
72 #: build/C/man3/getutent.3:43
73 msgid "B<struct utmp *getutline(struct utmp *>I<ut>B<);>"
74 msgstr ""
75
76 #. type: Plain text
77 #: build/C/man3/getutent.3:45
78 msgid "B<struct utmp *pututline(struct utmp *>I<ut>B<);>"
79 msgstr ""
80
81 #. type: Plain text
82 #: build/C/man3/getutent.3:47
83 msgid "B<void setutent(void);>"
84 msgstr ""
85
86 #. type: Plain text
87 #: build/C/man3/getutent.3:49
88 msgid "B<void endutent(void);>"
89 msgstr ""
90
91 #. type: Plain text
92 #: build/C/man3/getutent.3:51
93 msgid "B<int utmpname(const char *>I<file>B<);>"
94 msgstr ""
95
96 #. type: SH
97 #: build/C/man3/getutent.3:51 build/C/man3/getutmp.3:37 build/C/man3/login.3:36 build/C/man3/updwtmp.3:41 build/C/man5/utmp.5:35
98 #, no-wrap
99 msgid "DESCRIPTION"
100 msgstr ""
101
102 #. type: Plain text
103 #: build/C/man3/getutent.3:54
104 msgid ""
105 "New applications should use the POSIX.1-specified \"utmpx\" versions of "
106 "these functions; see CONFORMING TO."
107 msgstr ""
108
109 #. type: Plain text
110 #: build/C/man3/getutent.3:63
111 msgid ""
112 "B<utmpname>()  sets the name of the utmp-format file for the other utmp "
113 "functions to access.  If B<utmpname>()  is not used to set the filename "
114 "before the other functions are used, they assume B<_PATH_UTMP>, as defined "
115 "in I<E<lt>paths.hE<gt>>."
116 msgstr ""
117
118 #. type: Plain text
119 #: build/C/man3/getutent.3:68
120 msgid ""
121 "B<setutent>()  rewinds the file pointer to the beginning of the utmp file.  "
122 "It is generally a good idea to call it before any of the other functions."
123 msgstr ""
124
125 #. type: Plain text
126 #: build/C/man3/getutent.3:73
127 msgid ""
128 "B<endutent>()  closes the utmp file.  It should be called when the user code "
129 "is done accessing the file with the other functions."
130 msgstr ""
131
132 #. type: Plain text
133 #: build/C/man3/getutent.3:80
134 msgid ""
135 "B<getutent>()  reads a line from the current file position in the utmp "
136 "file.  It returns a pointer to a structure containing the fields of the "
137 "line.  The definition of this structure is shown in B<utmp>(5)."
138 msgstr ""
139
140 #. type: Plain text
141 #: build/C/man3/getutent.3:96
142 msgid ""
143 "B<getutid>()  searches forward from the current file position in the utmp "
144 "file based upon I<ut>.  If I<ut-E<gt>ut_type> is one of B<RUN_LVL>, "
145 "B<BOOT_TIME>, B<NEW_TIME>, or B<OLD_TIME>, B<getutid>()  will find the first "
146 "entry whose I<ut_type> field matches I<ut-E<gt>ut_type>.  If "
147 "I<ut-E<gt>ut_type> is one of B<INIT_PROCESS>, B<LOGIN_PROCESS>, "
148 "B<USER_PROCESS>, or B<DEAD_PROCESS>, B<getutid>()  will find the first entry "
149 "whose I<ut_id> field matches I<ut-E<gt>ut_id>."
150 msgstr ""
151
152 #. type: Plain text
153 #: build/C/man3/getutent.3:106
154 msgid ""
155 "B<getutline>()  searches forward from the current file position in the utmp "
156 "file.  It scans entries whose I<ut_type> is B<USER_PROCESS> or "
157 "B<LOGIN_PROCESS> and returns the first one whose I<ut_line> field matches "
158 "I<ut-E<gt>ut_line>."
159 msgstr ""
160
161 #. type: Plain text
162 #: build/C/man3/getutent.3:118
163 msgid ""
164 "B<pututline>()  writes the I<utmp> structure I<ut> into the utmp file.  It "
165 "uses B<getutid>()  to search for the proper place in the file to insert the "
166 "new entry.  If it cannot find an appropriate slot for I<ut>, B<pututline>()  "
167 "will append the new entry to the end of the file."
168 msgstr ""
169
170 #. type: SH
171 #: build/C/man3/getutent.3:118 build/C/man3/getutmp.3:51 build/C/man3/login.3:88
172 #, no-wrap
173 msgid "RETURN VALUE"
174 msgstr ""
175
176 #. type: Plain text
177 #: build/C/man3/getutent.3:127
178 msgid ""
179 "B<getutent>(), B<getutid>(), and B<getutline>()  return a pointer to a "
180 "I<struct utmp> on success, and NULL on failure (which includes the \"record "
181 "not found\" case).  This I<struct utmp> is allocated in static storage, and "
182 "may be overwritten by subsequent calls."
183 msgstr ""
184
185 #. type: Plain text
186 #: build/C/man3/getutent.3:133
187 msgid "On success B<pututline>()  returns I<ut>; on failure, it returns NULL."
188 msgstr ""
189
190 #. type: Plain text
191 #: build/C/man3/getutent.3:136
192 msgid ""
193 "B<utmpname>()  returns 0 if the new name was successfully stored, or -1 on "
194 "failure."
195 msgstr ""
196
197 #. type: SH
198 #: build/C/man3/getutent.3:136
199 #, no-wrap
200 msgid "ERRORS"
201 msgstr ""
202
203 #. type: TP
204 #: build/C/man3/getutent.3:137
205 #, no-wrap
206 msgid "B<ENOMEM>"
207 msgstr ""
208
209 #. type: Plain text
210 #: build/C/man3/getutent.3:140
211 msgid "Out of memory."
212 msgstr ""
213
214 #. type: TP
215 #: build/C/man3/getutent.3:140
216 #, no-wrap
217 msgid "B<ESRCH>"
218 msgstr ""
219
220 #. type: Plain text
221 #: build/C/man3/getutent.3:143
222 msgid "Record not found."
223 msgstr ""
224
225 #. type: Plain text
226 #: build/C/man3/getutent.3:150
227 msgid ""
228 "B<setutent>(), B<pututline>(), and the B<getut* ()> functions can also fail "
229 "for the reasons described in B<open>(2)."
230 msgstr ""
231
232 #. type: SH
233 #: build/C/man3/getutent.3:150 build/C/man3/login.3:93 build/C/man3/updwtmp.3:54 build/C/man5/utmp.5:224
234 #, no-wrap
235 msgid "FILES"
236 msgstr ""
237
238 #. type: Plain text
239 #: build/C/man3/getutent.3:152
240 msgid "/var/run/utmp\tdatabase of currently logged-in users"
241 msgstr ""
242
243 #. type: Plain text
244 #: build/C/man3/getutent.3:154
245 msgid "/var/log/wtmp\tdatabase of past user logins"
246 msgstr ""
247
248 #. type: SH
249 #: build/C/man3/getutent.3:154 build/C/man3/getutmp.3:55 build/C/man3/login.3:106 build/C/man3/updwtmp.3:58 build/C/man5/utmp.5:228
250 #, no-wrap
251 msgid "CONFORMING TO"
252 msgstr ""
253
254 #. type: Plain text
255 #: build/C/man3/getutent.3:156
256 msgid "XPG2, SVr4."
257 msgstr ""
258
259 #. type: Plain text
260 #: build/C/man3/getutent.3:166
261 msgid ""
262 "In XPG2 and SVID 2 the function B<pututline>()  is documented to return "
263 "void, and that is what it does on many systems (AIX, HP-UX, Linux libc5).  "
264 "HP-UX introduces a new function B<_pututline>()  with the prototype given "
265 "above for B<pututline>()  (also found in Linux libc5)."
266 msgstr ""
267
268 #. type: Plain text
269 #: build/C/man3/getutent.3:170
270 msgid ""
271 "All these functions are obsolete now on non-Linux systems.  POSIX.1-2001, "
272 "following SUSv1, does not have any of these functions, but instead uses"
273 msgstr ""
274
275 #. type: Plain text
276 #: build/C/man3/getutent.3:172
277 msgid "B<#include E<lt>utmpx.hE<gt>>"
278 msgstr ""
279
280 #. type: Plain text
281 #: build/C/man3/getutent.3:174
282 msgid "B<struct utmpx *getutxent(void);>"
283 msgstr ""
284
285 #. type: Plain text
286 #: build/C/man3/getutent.3:176
287 msgid "B<struct utmpx *getutxid(const struct utmpx *);>"
288 msgstr ""
289
290 #. type: Plain text
291 #: build/C/man3/getutent.3:178
292 msgid "B<struct utmpx *getutxline(const struct utmpx *);>"
293 msgstr ""
294
295 #. type: Plain text
296 #: build/C/man3/getutent.3:180
297 msgid "B<struct utmpx *pututxline(const struct utmpx *);>"
298 msgstr ""
299
300 #. type: Plain text
301 #: build/C/man3/getutent.3:182
302 msgid "B<void setutxent(void);>"
303 msgstr ""
304
305 #. type: Plain text
306 #: build/C/man3/getutent.3:184
307 msgid "B<void endutxent(void);>"
308 msgstr ""
309
310 #. type: Plain text
311 #: build/C/man3/getutent.3:193
312 msgid ""
313 "These functions are provided by glibc, and perform the same task as their "
314 "equivalents without the \"x\", but use I<struct utmpx>, defined on Linux to "
315 "be the same as I<struct utmp>.  For completeness, glibc also provides "
316 "B<utmpxname>(), although this function is not specified by POSIX.1."
317 msgstr ""
318
319 #. type: Plain text
320 #: build/C/man3/getutent.3:201
321 msgid ""
322 "On some other systems, the I<utmpx> structure is a superset of the I<utmp> "
323 "structure, with additional fields, and larger versions of the existing "
324 "fields, and parallel files are maintained, often I</var/*/utmpx> and "
325 "I</var/*/wtmpx>."
326 msgstr ""
327
328 #. type: Plain text
329 #: build/C/man3/getutent.3:209
330 msgid ""
331 "Linux glibc on the other hand does not use a parallel I<utmpx> file since "
332 "its I<utmp> structure is already large enough.  The \"x\" functions listed "
333 "above are just aliases for their counterparts without the \"x\" (e.g., "
334 "B<getutxent>()  is an alias for B<getutent>())."
335 msgstr ""
336
337 #. type: SH
338 #: build/C/man3/getutent.3:209 build/C/man3/getutmp.3:58 build/C/man3/login.3:109 build/C/man3/updwtmp.3:71 build/C/man5/utmp.5:280
339 #, no-wrap
340 msgid "NOTES"
341 msgstr ""
342
343 #. type: SS
344 #: build/C/man3/getutent.3:210
345 #, no-wrap
346 msgid "Glibc notes"
347 msgstr ""
348
349 #. type: Plain text
350 #: build/C/man3/getutent.3:213
351 msgid "The above functions are not thread-safe.  Glibc adds reentrant versions"
352 msgstr ""
353
354 #. type: Plain text
355 #: build/C/man3/getutent.3:218
356 #, no-wrap
357 msgid ""
358 "B<#define _GNU_SOURCE>    /* or _SVID_SOURCE or _BSD_SOURCE;\n"
359 "\\&                          see B<feature_test_macros>(7) */\n"
360 "B<#include E<lt>utmp.hE<gt>>\n"
361 msgstr ""
362
363 #. type: Plain text
364 #: build/C/man3/getutent.3:220
365 #, no-wrap
366 msgid "B<int getutent_r(struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
367 msgstr ""
368
369 #. type: Plain text
370 #: build/C/man3/getutent.3:223
371 #, no-wrap
372 msgid ""
373 "B<int getutid_r(struct utmp *>I<ut>B<,>\n"
374 "B<              struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
375 msgstr ""
376
377 #. type: Plain text
378 #: build/C/man3/getutent.3:226
379 #, no-wrap
380 msgid ""
381 "B<int getutline_r(struct utmp *>I<ut>B<,>\n"
382 "B<                struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
383 msgstr ""
384
385 #. type: Plain text
386 #: build/C/man3/getutent.3:238
387 msgid ""
388 "These functions are GNU extensions, analogs of the functions of the same "
389 "name without the _r suffix.  The I<ubuf> argument gives these functions a "
390 "place to store their result.  On success they return 0, and a pointer to the "
391 "result is written in I<*ubufp>.  On error these functions return -1.  There "
392 "are no utmpx equivalents of the above functions.  (POSIX.1 does not specify "
393 "such functions.)"
394 msgstr ""
395
396 #. type: SH
397 #: build/C/man3/getutent.3:238
398 #, no-wrap
399 msgid "EXAMPLE"
400 msgstr ""
401
402 #. type: Plain text
403 #: build/C/man3/getutent.3:246
404 msgid ""
405 "The following example adds and removes a utmp record, assuming it is run "
406 "from within a pseudo terminal.  For usage in a real application, you should "
407 "check the return values of B<getpwuid>(3)  and B<ttyname>(3)."
408 msgstr ""
409
410 #. type: Plain text
411 #: build/C/man3/getutent.3:253
412 #, no-wrap
413 msgid ""
414 "#include E<lt>string.hE<gt>\n"
415 "#include E<lt>stdlib.hE<gt>\n"
416 "#include E<lt>pwd.hE<gt>\n"
417 "#include E<lt>unistd.hE<gt>\n"
418 "#include E<lt>utmp.hE<gt>\n"
419 msgstr ""
420
421 #. type: Plain text
422 #: build/C/man3/getutent.3:258
423 #, no-wrap
424 msgid ""
425 "int\n"
426 "main(int argc, char *argv[])\n"
427 "{\n"
428 "    struct utmp entry;\n"
429 msgstr ""
430
431 #. type: Plain text
432 #: build/C/man3/getutent.3:260
433 #, no-wrap
434 msgid "    system(\"echo before adding entry:;who\");\n"
435 msgstr ""
436
437 #. type: Plain text
438 #: build/C/man3/getutent.3:272
439 #, no-wrap
440 msgid ""
441 "    entry.ut_type = USER_PROCESS;\n"
442 "    entry.ut_pid = getpid();\n"
443 "    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen(\"/dev/\"));\n"
444 "    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */\n"
445 "    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen(\"/dev/tty\"));\n"
446 "    time(&entry.ut_time);\n"
447 "    strcpy(entry.ut_user, getpwuid(getuid())-E<gt>pw_name);\n"
448 "    memset(entry.ut_host, 0, UT_HOSTSIZE);\n"
449 "    entry.ut_addr = 0;\n"
450 "    setutent();\n"
451 "    pututline(&entry);\n"
452 msgstr ""
453
454 #. type: Plain text
455 #: build/C/man3/getutent.3:274
456 #, no-wrap
457 msgid "    system(\"echo after adding entry:;who\");\n"
458 msgstr ""
459
460 #. type: Plain text
461 #: build/C/man3/getutent.3:281
462 #, no-wrap
463 msgid ""
464 "    entry.ut_type = DEAD_PROCESS;\n"
465 "    memset(entry.ut_line, 0, UT_LINESIZE);\n"
466 "    entry.ut_time = 0;\n"
467 "    memset(entry.ut_user, 0, UT_NAMESIZE);\n"
468 "    setutent();\n"
469 "    pututline(&entry);\n"
470 msgstr ""
471
472 #. type: Plain text
473 #: build/C/man3/getutent.3:283
474 #, no-wrap
475 msgid "    system(\"echo after removing entry:;who\");\n"
476 msgstr ""
477
478 #. type: Plain text
479 #: build/C/man3/getutent.3:287
480 #, no-wrap
481 msgid ""
482 "    endutent();\n"
483 "    exit(EXIT_SUCCESS);\n"
484 "}\n"
485 msgstr ""
486
487 #. type: SH
488 #: build/C/man3/getutent.3:288 build/C/man3/getutmp.3:69 build/C/man3/login.3:124 build/C/man3/updwtmp.3:87 build/C/man5/utmp.5:338
489 #, no-wrap
490 msgid "SEE ALSO"
491 msgstr ""
492
493 #. type: Plain text
494 #: build/C/man3/getutent.3:291
495 msgid "B<getutmp>(3), B<utmp>(5)"
496 msgstr ""
497
498 #. type: SH
499 #: build/C/man3/getutent.3:291 build/C/man3/getutmp.3:72 build/C/man3/login.3:127 build/C/man3/updwtmp.3:90 build/C/man5/utmp.5:352
500 #, no-wrap
501 msgid "COLOPHON"
502 msgstr ""
503
504 #. type: Plain text
505 #: build/C/man3/getutent.3:298 build/C/man3/getutmp.3:79 build/C/man3/login.3:134 build/C/man3/updwtmp.3:97 build/C/man5/utmp.5:359
506 msgid ""
507 "This page is part of release 3.50 of the Linux I<man-pages> project.  A "
508 "description of the project, and information about reporting bugs, can be "
509 "found at http://www.kernel.org/doc/man-pages/."
510 msgstr ""
511
512 #. type: TH
513 #: build/C/man3/getutmp.3:26
514 #, no-wrap
515 msgid "GETUTMP"
516 msgstr ""
517
518 #. type: TH
519 #: build/C/man3/getutmp.3:26
520 #, no-wrap
521 msgid "2010-09-10"
522 msgstr ""
523
524 #. type: TH
525 #: build/C/man3/getutmp.3:26 build/C/man5/utmp.5:30
526 #, no-wrap
527 msgid "Linux"
528 msgstr ""
529
530 #. type: Plain text
531 #: build/C/man3/getutmp.3:29
532 msgid "getutmp, getutmpx - copy utmp structure to utmpx, and vice versa"
533 msgstr ""
534
535 #. type: Plain text
536 #: build/C/man3/getutmp.3:33
537 #, no-wrap
538 msgid ""
539 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
540 "B<#include E<lt>utmpx.hE<gt>>\n"
541 msgstr ""
542
543 #. type: Plain text
544 #: build/C/man3/getutmp.3:36
545 #, no-wrap
546 msgid ""
547 "B< void getutmp(const struct utmpx *>I<ux>B<, struct utmp *>I<u>B<);>\n"
548 "B< void getutmpx(const struct utmp *>I<u>B<, struct utmpx *>I<ux>B<);>\n"
549 msgstr ""
550
551 #. type: Plain text
552 #: build/C/man3/getutmp.3:51
553 msgid ""
554 "The B<getutmp>()  function copies the fields of the I<utmpx> structure "
555 "pointed to by I<ux> to the corresponding fields of the I<utmp> structure "
556 "pointed to by I<u>.  The B<getutmpx>()  function performs the converse "
557 "operation."
558 msgstr ""
559
560 #. type: Plain text
561 #: build/C/man3/getutmp.3:53
562 msgid "These functions do not return a value."
563 msgstr ""
564
565 #. type: SH
566 #: build/C/man3/getutmp.3:53
567 #, no-wrap
568 msgid "VERSIONS"
569 msgstr ""
570
571 #. type: Plain text
572 #: build/C/man3/getutmp.3:55
573 msgid "These functions first appeared in glibc in version 2.1.1."
574 msgstr ""
575
576 #. type: Plain text
577 #: build/C/man3/getutmp.3:58
578 msgid ""
579 "These functions are nonstandard, but appear on a few other systems, such as "
580 "Solaris and NetBSD."
581 msgstr ""
582
583 #.  e.g., on Solaris, the utmpx structure is rather larger than utmp.
584 #. type: Plain text
585 #: build/C/man3/getutmp.3:69
586 msgid ""
587 "These functions exist primarily for compatibility with other systems where "
588 "the I<utmp> and I<utmpx> structures contain different fields, or the size of "
589 "corresponding fields differs.  On Linux, the two structures contain the same "
590 "fields, and the fields have the same sizes."
591 msgstr ""
592
593 #. type: Plain text
594 #: build/C/man3/getutmp.3:72 build/C/man3/login.3:127
595 msgid "B<getutent>(3), B<utmp>(5)"
596 msgstr ""
597
598 #. type: TH
599 #: build/C/man3/login.3:25
600 #, no-wrap
601 msgid "LOGIN"
602 msgstr ""
603
604 #. type: TH
605 #: build/C/man3/login.3:25
606 #, no-wrap
607 msgid "2004-05-06"
608 msgstr ""
609
610 #. type: TH
611 #: build/C/man3/login.3:25 build/C/man3/updwtmp.3:29
612 #, no-wrap
613 msgid "GNU"
614 msgstr ""
615
616 #. type: Plain text
617 #: build/C/man3/login.3:28
618 msgid "login, logout - write utmp and wtmp entries"
619 msgstr ""
620
621 #. type: Plain text
622 #: build/C/man3/login.3:32
623 msgid "B<void login(const struct utmp *>I<ut>B<);>"
624 msgstr ""
625
626 #. type: Plain text
627 #: build/C/man3/login.3:34
628 msgid "B<int logout(const char *>I<ut_line>B<);>"
629 msgstr ""
630
631 #. type: Plain text
632 #: build/C/man3/login.3:36
633 msgid "Link with I<-lutil>."
634 msgstr ""
635
636 #. type: Plain text
637 #: build/C/man3/login.3:41
638 msgid ""
639 "The utmp file records who is currently using the system.  The wtmp file "
640 "records all logins and logouts.  See B<utmp>(5)."
641 msgstr ""
642
643 #. type: Plain text
644 #: build/C/man3/login.3:47
645 msgid ""
646 "The function B<login>()  takes the supplied I<struct utmp>, I<ut>, and "
647 "writes it to both the utmp and the wtmp file."
648 msgstr ""
649
650 #. type: Plain text
651 #: build/C/man3/login.3:51
652 msgid "The function B<logout>()  clears the entry in the utmp file again."
653 msgstr ""
654
655 #. type: SS
656 #: build/C/man3/login.3:51
657 #, no-wrap
658 msgid "GNU details"
659 msgstr ""
660
661 #. type: Plain text
662 #: build/C/man3/login.3:72
663 msgid ""
664 "More precisely, B<login>()  takes the argument I<ut> struct, fills the field "
665 "I<ut-E<gt>ut_type> (if there is such a field) with the value "
666 "B<USER_PROCESS>, and fills the field I<ut-E<gt>ut_pid> (if there is such a "
667 "field) with the process ID of the calling process.  Then it tries to fill "
668 "the field I<ut-E<gt>ut_line>.  It takes the first of I<stdin>, I<stdout>, "
669 "I<stderr> that is a terminal, and stores the corresponding pathname minus a "
670 "possible leading I</dev/> into this field, and then writes the struct to the "
671 "utmp file.  On the other hand, if no terminal name was found, this field is "
672 "filled with \"???\" and the struct is not written to the utmp file.  After "
673 "this, the struct is written to the wtmp file."
674 msgstr ""
675
676 #. type: Plain text
677 #: build/C/man3/login.3:88
678 msgid ""
679 "The B<logout>()  function searches the utmp file for an entry matching the "
680 "I<ut_line> argument.  If a record is found, it is updated by zeroing out the "
681 "I<ut_name> and I<ut_host> fields, updating the I<ut_tv> timestamp field and "
682 "setting I<ut_type> (if there is such a field) to B<DEAD_PROCESS>."
683 msgstr ""
684
685 #. type: Plain text
686 #: build/C/man3/login.3:93
687 msgid ""
688 "The B<logout>()  function returns 1 if the entry was successfully written to "
689 "the database, or 0 if an error occurred."
690 msgstr ""
691
692 #. type: TP
693 #: build/C/man3/login.3:94
694 #, no-wrap
695 msgid "I</var/run/utmp>"
696 msgstr ""
697
698 #. type: Plain text
699 #: build/C/man3/login.3:100
700 msgid ""
701 "user accounting database, configured through B<_PATH_UTMP> in "
702 "I<E<lt>paths.hE<gt>>"
703 msgstr ""
704
705 #. type: TP
706 #: build/C/man3/login.3:100 build/C/man3/updwtmp.3:55
707 #, no-wrap
708 msgid "I</var/log/wtmp>"
709 msgstr ""
710
711 #. type: Plain text
712 #: build/C/man3/login.3:106
713 msgid ""
714 "user accounting log file, configured through B<_PATH_WTMP> in "
715 "I<E<lt>paths.hE<gt>>"
716 msgstr ""
717
718 #. type: Plain text
719 #: build/C/man3/login.3:109
720 msgid "Not in POSIX.1-2001.  Present on the BSDs."
721 msgstr ""
722
723 #. type: Plain text
724 #: build/C/man3/login.3:124
725 msgid ""
726 "Note that the member I<ut_user> of I<struct utmp> is called I<ut_name> in "
727 "BSD.  Therefore, I<ut_name> is defined as an alias for I<ut_user> in "
728 "I<E<lt>utmp.hE<gt>>."
729 msgstr ""
730
731 #. type: TH
732 #: build/C/man3/updwtmp.3:29
733 #, no-wrap
734 msgid "UPDWTMP"
735 msgstr ""
736
737 #. type: TH
738 #: build/C/man3/updwtmp.3:29
739 #, no-wrap
740 msgid "2008-07-02"
741 msgstr ""
742
743 #. type: Plain text
744 #: build/C/man3/updwtmp.3:32
745 msgid "updwtmp, logwtmp - append an entry to the wtmp file"
746 msgstr ""
747
748 #. type: Plain text
749 #: build/C/man3/updwtmp.3:35
750 #, no-wrap
751 msgid "B<#include E<lt>utmp.hE<gt>>\n"
752 msgstr ""
753
754 #. type: Plain text
755 #: build/C/man3/updwtmp.3:37
756 #, no-wrap
757 msgid "B<void updwtmp(const char *>I<wtmp_file>B<, const struct utmp *>I<ut>B<);>\n"
758 msgstr ""
759
760 #. type: Plain text
761 #: build/C/man3/updwtmp.3:40
762 #, no-wrap
763 msgid ""
764 "B<void logwtmp(const char *>I<line>B<, const char *>I<name>B<, const char "
765 "*>I<host>B<);>\n"
766 msgstr ""
767
768 #. type: Plain text
769 #: build/C/man3/updwtmp.3:46
770 msgid "B<updwtmp>()  appends the utmp structure I<ut> to the wtmp file."
771 msgstr ""
772
773 #. type: Plain text
774 #: build/C/man3/updwtmp.3:54
775 msgid ""
776 "B<logwtmp>()  constructs a utmp structure using I<line>, I<name>, I<host>, "
777 "current time and current process ID.  Then it calls B<updwtmp>()  to append "
778 "the structure to the wtmp file."
779 msgstr ""
780
781 #. type: Plain text
782 #: build/C/man3/updwtmp.3:58
783 msgid "database of past user logins"
784 msgstr ""
785
786 #. type: Plain text
787 #: build/C/man3/updwtmp.3:61
788 msgid "Not in POSIX.1-2001.  Present on Solaris, NetBSD, and perhaps other systems."
789 msgstr ""
790
791 #. type: SH
792 #: build/C/man3/updwtmp.3:61
793 #, no-wrap
794 msgid "AVAILABILITY"
795 msgstr ""
796
797 #. type: Plain text
798 #: build/C/man3/updwtmp.3:71
799 msgid ""
800 "Both functions are available under glibc2, but not under libc5.  However, "
801 "B<logwtmp>()  used to occur in the old libbsd.  These days, the B<logwtmp>()  "
802 "function is included in libutil.  (Hence you'll need to add I<-lutil> to "
803 "your compiler command line to get it.)"
804 msgstr ""
805
806 #. type: Plain text
807 #: build/C/man3/updwtmp.3:75
808 msgid ""
809 "For consistency with the other \"utmpx\" functions (see B<getutxent>(3)), "
810 "glibc provides (since version 2.1):"
811 msgstr ""
812
813 #. type: Plain text
814 #: build/C/man3/updwtmp.3:78
815 #, no-wrap
816 msgid "B<#include E<lt>utmpx.hE<gt>>\n"
817 msgstr ""
818
819 #. type: Plain text
820 #: build/C/man3/updwtmp.3:80
821 #, no-wrap
822 msgid ""
823 "B<void updwtmpx (const char *>I<wtmpx_file>B<, const struct utmpx "
824 "*>I<utx>B<);>\n"
825 msgstr ""
826
827 #. type: Plain text
828 #: build/C/man3/updwtmp.3:87
829 msgid ""
830 "This function performs the same task as B<updwtmp>(), but differs in that it "
831 "takes a I<utmpx> structure as its last argument."
832 msgstr ""
833
834 #. type: Plain text
835 #: build/C/man3/updwtmp.3:90
836 msgid "B<getutxent>(3), B<wtmp>(5)"
837 msgstr ""
838
839 #. type: TH
840 #: build/C/man5/utmp.5:30
841 #, no-wrap
842 msgid "UTMP"
843 msgstr ""
844
845 #. type: TH
846 #: build/C/man5/utmp.5:30
847 #, no-wrap
848 msgid "2013-02-11"
849 msgstr ""
850
851 #. type: Plain text
852 #: build/C/man5/utmp.5:33
853 msgid "utmp, wtmp - login records"
854 msgstr ""
855
856 #. type: Plain text
857 #: build/C/man5/utmp.5:42
858 msgid ""
859 "The I<utmp> file allows one to discover information about who is currently "
860 "using the system.  There may be more users currently using the system, "
861 "because not all programs use utmp logging."
862 msgstr ""
863
864 #. type: Plain text
865 #: build/C/man5/utmp.5:52
866 msgid ""
867 "B<Warning:> I<utmp> must not be writable by the user class \"other\", "
868 "because many system programs (foolishly)  depend on its integrity.  You risk "
869 "faked system logfiles and modifications of system files if you leave I<utmp> "
870 "writable to any user other than the owner and group owner of the file."
871 msgstr ""
872
873 #. type: Plain text
874 #: build/C/man5/utmp.5:60
875 msgid ""
876 "The file is a sequence of I<utmp> structures, declared as follows in "
877 "I<E<lt>utmp.hE<gt>> (note that this is only one of several definitions "
878 "around; details depend on the version of libc):"
879 msgstr ""
880
881 #. type: Plain text
882 #: build/C/man5/utmp.5:64
883 #, no-wrap
884 msgid "/* Values for ut_type field, below */\n"
885 msgstr ""
886
887 #. type: Plain text
888 #: build/C/man5/utmp.5:79
889 #, no-wrap
890 msgid ""
891 "#define EMPTY         0 /* Record does not contain valid info\n"
892 "                           (formerly known as UT_UNKNOWN on Linux) */\n"
893 "#define RUN_LVL       1 /* Change in system run-level (see\n"
894 "                           B<init>(8)) */\n"
895 "#define BOOT_TIME     2 /* Time of system boot (in I<ut_tv>) */\n"
896 "#define NEW_TIME      3 /* Time after system clock change\n"
897 "                           (in I<ut_tv>) */\n"
898 "#define OLD_TIME      4 /* Time before system clock change\n"
899 "                           (in I<ut_tv>) */\n"
900 "#define INIT_PROCESS  5 /* Process spawned by B<init>(8) */\n"
901 "#define LOGIN_PROCESS 6 /* Session leader process for user login */\n"
902 "#define USER_PROCESS  7 /* Normal process */\n"
903 "#define DEAD_PROCESS  8 /* Terminated process */\n"
904 "#define ACCOUNTING    9 /* Not implemented */\n"
905 msgstr ""
906
907 #. type: Plain text
908 #: build/C/man5/utmp.5:83
909 #, no-wrap
910 msgid ""
911 "#define UT_LINESIZE      32\n"
912 "#define UT_NAMESIZE      32\n"
913 "#define UT_HOSTSIZE     256\n"
914 msgstr ""
915
916 #. type: Plain text
917 #: build/C/man5/utmp.5:88
918 #, no-wrap
919 msgid ""
920 "struct exit_status {              /* Type for ut_exit, below */\n"
921 "    short int e_termination;      /* Process termination status */\n"
922 "    short int e_exit;             /* Process exit status */\n"
923 "};\n"
924 msgstr ""
925
926 #. type: Plain text
927 #: build/C/man5/utmp.5:116
928 #, no-wrap
929 msgid ""
930 "struct utmp {\n"
931 "    short   ut_type;              /* Type of record */\n"
932 "    pid_t   ut_pid;               /* PID of login process */\n"
933 "    char    ut_line[UT_LINESIZE]; /* Device name of tty - \"/dev/\" */\n"
934 "    char    ut_id[4];             /* Terminal name suffix,\n"
935 "                                     or inittab(5) ID */\n"
936 "    char    ut_user[UT_NAMESIZE]; /* Username */\n"
937 "    char    ut_host[UT_HOSTSIZE]; /* Hostname for remote login, or\n"
938 "                                     kernel version for run-level\n"
939 "                                     messages */\n"
940 "    struct  exit_status ut_exit;  /* Exit status of a process\n"
941 "                                     marked as DEAD_PROCESS; not\n"
942 "                                     used by Linux init(8) */\n"
943 "    /* The ut_session and ut_tv fields must be the same size when\n"
944 "       compiled 32- and 64-bit.  This allows data files and shared\n"
945 "       memory to be shared between 32- and 64-bit applications. */\n"
946 "#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32\n"
947 "    int32_t ut_session;           /* Session ID (B<getsid>(2)),\n"
948 "                                     used for windowing */\n"
949 "    struct {\n"
950 "        int32_t tv_sec;           /* Seconds */\n"
951 "        int32_t tv_usec;          /* Microseconds */\n"
952 "    } ut_tv;                      /* Time entry was made */\n"
953 "#else\n"
954 "     long   ut_session;           /* Session ID */\n"
955 "     struct timeval ut_tv;        /* Time entry was made */\n"
956 "#endif\n"
957 msgstr ""
958
959 #. type: Plain text
960 #: build/C/man5/utmp.5:122
961 #, no-wrap
962 msgid ""
963 "    int32_t ut_addr_v6[4];        /* Internet address of remote\n"
964 "                                     host; IPv4 address uses\n"
965 "                                     just ut_addr_v6[0] */\n"
966 "    char __unused[20];            /* Reserved for future use */\n"
967 "};\n"
968 msgstr ""
969
970 #. type: Plain text
971 #: build/C/man5/utmp.5:130
972 #, no-wrap
973 msgid ""
974 "/* Backward compatibility hacks */\n"
975 "#define ut_name ut_user\n"
976 "#ifndef _NO_UT_TIME\n"
977 "#define ut_time ut_tv.tv_sec\n"
978 "#endif\n"
979 "#define ut_xtime ut_tv.tv_sec\n"
980 "#define ut_addr ut_addr_v6[0]\n"
981 msgstr ""
982
983 #. type: Plain text
984 #: build/C/man5/utmp.5:140
985 msgid ""
986 "This structure gives the name of the special file associated with the user's "
987 "terminal, the user's login name, and the time of login in the form of "
988 "B<time>(2).  String fields are terminated by a null byte (\\(aq\\e0\\(aq)  "
989 "if they are shorter than the size of the field."
990 msgstr ""
991
992 #. type: Plain text
993 #: build/C/man5/utmp.5:157
994 msgid ""
995 "The first entries ever created result from B<init>(8)  processing "
996 "B<inittab>(5).  Before an entry is processed, though, B<init>(8)  cleans up "
997 "utmp by setting I<ut_type> to B<DEAD_PROCESS>, clearing I<ut_user>, "
998 "I<ut_host>, and I<ut_time> with null bytes for each record which I<ut_type> "
999 "is not B<DEAD_PROCESS> or B<RUN_LVL> and where no process with PID I<ut_pid> "
1000 "exists.  If no empty record with the needed I<ut_id> can be found, "
1001 "B<init>(8)  creates a new one.  It sets I<ut_id> from the inittab, I<ut_pid> "
1002 "and I<ut_time> to the current values, and I<ut_type> to B<INIT_PROCESS>."
1003 msgstr ""
1004
1005 #. type: Plain text
1006 #: build/C/man5/utmp.5:176
1007 msgid ""
1008 "B<mingetty>(8)  (or B<agetty>(8))  locates the entry by the PID, changes "
1009 "I<ut_type> to B<LOGIN_PROCESS>, changes I<ut_time>, sets I<ut_line>, and "
1010 "waits for connection to be established.  B<login>(1), after a user has been "
1011 "authenticated, changes I<ut_type> to B<USER_PROCESS>, changes I<ut_time>, "
1012 "and sets I<ut_host> and I<ut_addr>.  Depending on B<mingetty>(8)  (or "
1013 "B<agetty>(8))  and B<login>(1), records may be located by I<ut_line> instead "
1014 "of the preferable I<ut_pid>."
1015 msgstr ""
1016
1017 #. type: Plain text
1018 #: build/C/man5/utmp.5:182
1019 msgid ""
1020 "When B<init>(8)  finds that a process has exited, it locates its utmp entry "
1021 "by I<ut_pid>, sets I<ut_type> to B<DEAD_PROCESS>, and clears I<ut_user>, "
1022 "I<ut_host> and I<ut_time> with null bytes."
1023 msgstr ""
1024
1025 #. type: Plain text
1026 #: build/C/man5/utmp.5:194
1027 msgid ""
1028 "B<xterm>(1)  and other terminal emulators directly create a B<USER_PROCESS> "
1029 "record and generate the I<ut_id> by using the string that suffix part of the "
1030 "terminal name (the characters following I</dev/[pt]ty>).  If they find a "
1031 "B<DEAD_PROCESS> for this ID, they recycle it, otherwise they create a new "
1032 "entry.  If they can, they will mark it as B<DEAD_PROCESS> on exiting and it "
1033 "is advised that they null I<ut_line>, I<ut_time>, I<ut_user>, and I<ut_host> "
1034 "as well."
1035 msgstr ""
1036
1037 #. type: Plain text
1038 #: build/C/man5/utmp.5:202
1039 msgid ""
1040 "B<telnetd>(8)  sets up a B<LOGIN_PROCESS> entry and leaves the rest to "
1041 "B<login>(1)  as usual.  After the telnet session ends, B<telnetd>(8)  cleans "
1042 "up utmp in the described way."
1043 msgstr ""
1044
1045 #. type: Plain text
1046 #: build/C/man5/utmp.5:224
1047 msgid ""
1048 "The I<wtmp> file records all logins and logouts.  Its format is exactly like "
1049 "I<utmp> except that a null username indicates a logout on the associated "
1050 "terminal.  Furthermore, the terminal name B<~> with username B<shutdown> or "
1051 "B<reboot> indicates a system shutdown or reboot and the pair of terminal "
1052 "names B<|>/B<}> logs the old/new system time when B<date>(1)  changes it.  "
1053 "I<wtmp> is maintained by B<login>(1), B<init>(8), and some versions of "
1054 "B<getty>(8)  (e.g., B<mingetty>(8)  or B<agetty>(8)).  None of these "
1055 "programs creates the file, so if it is removed, record-keeping is turned "
1056 "off."
1057 msgstr ""
1058
1059 #. type: Plain text
1060 #: build/C/man5/utmp.5:226
1061 msgid "/var/run/utmp"
1062 msgstr ""
1063
1064 #. type: Plain text
1065 #: build/C/man5/utmp.5:228
1066 msgid "/var/log/wtmp"
1067 msgstr ""
1068
1069 #. type: Plain text
1070 #: build/C/man5/utmp.5:247
1071 msgid ""
1072 "POSIX.1 does not specify a I<utmp> structure, but rather one named I<utmpx>, "
1073 "with specifications for the fields I<ut_type>, I<ut_pid>, I<ut_line>, "
1074 "I<ut_id>, I<ut_user>, and I<ut_tv>.  POSIX.1 does not specify the lengths of "
1075 "the I<ut_line> and I<ut_user> fields."
1076 msgstr ""
1077
1078 #. type: Plain text
1079 #: build/C/man5/utmp.5:253
1080 msgid ""
1081 "Linux defines the I<utmpx> structure to be the same as the I<utmp> "
1082 "structure."
1083 msgstr ""
1084
1085 #. type: SS
1086 #: build/C/man5/utmp.5:253
1087 #, no-wrap
1088 msgid "Comparison with historical systems"
1089 msgstr ""
1090
1091 #. type: Plain text
1092 #: build/C/man5/utmp.5:256
1093 msgid ""
1094 "Linux utmp entries conform neither to v7/BSD nor to System V; they are a mix "
1095 "of the two."
1096 msgstr ""
1097
1098 #. type: Plain text
1099 #: build/C/man5/utmp.5:263
1100 msgid ""
1101 "v7/BSD has fewer fields; most importantly it lacks I<ut_type>, which causes "
1102 "native v7/BSD-like programs to display (for example) dead or login entries.  "
1103 "Further, there is no configuration file which allocates slots to sessions.  "
1104 "BSD does so because it lacks I<ut_id> fields."
1105 msgstr ""
1106
1107 #. type: Plain text
1108 #: build/C/man5/utmp.5:275
1109 msgid ""
1110 "In Linux (as in System V), the I<ut_id> field of a record will never change "
1111 "once it has been set, which reserves that slot without needing a "
1112 "configuration file.  Clearing I<ut_id> may result in race conditions leading "
1113 "to corrupted utmp entries and potential security holes.  Clearing the "
1114 "abovementioned fields by filling them with null bytes is not required by "
1115 "System V semantics, but makes it possible to run many programs which assume "
1116 "BSD semantics and which do not modify utmp.  Linux uses the BSD conventions "
1117 "for line contents, as documented above."
1118 msgstr ""
1119
1120 #.  mtk: What is the referrent of "them" in the following sentence?
1121 #.  System V only uses the type field to mark them and logs
1122 #.  informative messages such as \fB"new time"\fP in the line field.
1123 #. type: Plain text
1124 #: build/C/man5/utmp.5:280
1125 msgid "System V has no I<ut_host> or I<ut_addr_v6> fields."
1126 msgstr ""
1127
1128 #. type: Plain text
1129 #: build/C/man5/utmp.5:288
1130 msgid ""
1131 "Unlike various other systems, where utmp logging can be disabled by removing "
1132 "the file, utmp must always exist on Linux.  If you want to disable B<who>(1)  "
1133 "then do not make utmp world readable."
1134 msgstr ""
1135
1136 #. type: Plain text
1137 #: build/C/man5/utmp.5:291
1138 msgid ""
1139 "The file format is machine-dependent, so it is recommended that it be "
1140 "processed only on the machine architecture where it was created."
1141 msgstr ""
1142
1143 #. type: Plain text
1144 #: build/C/man5/utmp.5:312
1145 msgid ""
1146 "Note that on I<biarch> platforms, that is, systems which can run both 32-bit "
1147 "and 64-bit applications (x86-64, ppc64, s390x, etc.), I<ut_tv> is the same "
1148 "size in 32-bit mode as in 64-bit mode.  The same goes for I<ut_session> and "
1149 "I<ut_time> if they are present.  This allows data files and shared memory to "
1150 "be shared between 32-bit and 64-bit applications.  This is achieved by "
1151 "changing the type of I<ut_session> to I<int32_t>, and that of I<ut_tv> to a "
1152 "struct with two I<int32_t> fields I<tv_sec> and I<tv_usec>.  Since I<ut_tv> "
1153 "may not be the same as I<struct timeval>, then instead of the call:"
1154 msgstr ""
1155
1156 #. type: Plain text
1157 #: build/C/man5/utmp.5:316
1158 #, no-wrap
1159 msgid "gettimeofday((struct timeval *) &ut.ut_tv, NULL);\n"
1160 msgstr ""
1161
1162 #. type: Plain text
1163 #: build/C/man5/utmp.5:320
1164 msgid "the following method of setting this field is recommended:"
1165 msgstr ""
1166
1167 #. type: Plain text
1168 #: build/C/man5/utmp.5:325
1169 #, no-wrap
1170 msgid ""
1171 "struct utmp ut;\n"
1172 "struct timeval tv;\n"
1173 msgstr ""
1174
1175 #. type: Plain text
1176 #: build/C/man5/utmp.5:329
1177 #, no-wrap
1178 msgid ""
1179 "gettimeofday(&tv, NULL);\n"
1180 "ut.ut_tv.tv_sec = tv.tv_sec;\n"
1181 "ut.ut_tv.tv_usec = tv.tv_usec;\n"
1182 msgstr ""
1183
1184 #. type: Plain text
1185 #: build/C/man5/utmp.5:336
1186 msgid ""
1187 "Note that the I<utmp> struct from libc5 has changed in libc6.  Because of "
1188 "this, binaries using the old libc5 struct will corrupt I</var/run/utmp> "
1189 "and/or I</var/log/wtmp>."
1190 msgstr ""
1191
1192 #. type: SH
1193 #: build/C/man5/utmp.5:336
1194 #, no-wrap
1195 msgid "BUGS"
1196 msgstr ""
1197
1198 #. type: Plain text
1199 #: build/C/man5/utmp.5:338
1200 msgid "This man page is based on the libc5 one, things may work differently now."
1201 msgstr ""
1202
1203 #. type: Plain text
1204 #: build/C/man5/utmp.5:352
1205 msgid ""
1206 "B<ac>(1), B<date>(1), B<last>(1), B<login>(1), B<utmpdump>(1), B<who>(1), "
1207 "B<getutent>(3), B<getutmp>(3), B<login>(3), B<logout>(3), B<logwtmp>(3), "
1208 "B<updwtmp>(3), B<init>(8)"
1209 msgstr ""