OSDN Git Service

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