OSDN Git Service

エントリ -> エントリー
[linuxjm/LDP_man-pages.git] / po4a / utmp / po / ja.po
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 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-23 22:25+0900\n"
10 "PO-Revision-Date: 2015-01-25 07:03+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/getutent.3:31
20 #, no-wrap
21 msgid "GETUTENT"
22 msgstr "GETUTENT"
23
24 #. type: TH
25 #: build/C/man3/getutent.3:31 build/C/man3/updwtmp.3:29 build/C/man5/utmp.5:30
26 #, no-wrap
27 msgid "2014-08-19"
28 msgstr "2014-08-19"
29
30 #. type: TH
31 #: build/C/man3/getutent.3:31 build/C/man3/getutmp.3:26
32 #: 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 "Linux Programmer's Manual"
36
37 #. type: SH
38 #: build/C/man3/getutent.3:32 build/C/man3/getutmp.3:27
39 #: build/C/man3/login.3:26 build/C/man3/updwtmp.3:30 build/C/man5/utmp.5:31
40 #, no-wrap
41 msgid "NAME"
42 msgstr "名前"
43
44 #. type: Plain text
45 #: build/C/man3/getutent.3:35
46 msgid "getutent, getutid, getutline, pututline, setutent, endutent, utmpname - access utmp file entries"
47 msgstr "getutent, getutid, getutline, pututline, setutent, endutent, utmpname - utmp ファイルのエントリーにアクセスする"
48
49 #. type: SH
50 #: build/C/man3/getutent.3:35 build/C/man3/getutmp.3:29
51 #: 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 "B<#include E<lt>utmp.hE<gt>>"
60
61 #. type: Plain text
62 #: build/C/man3/getutent.3:39
63 msgid "B<struct utmp *getutent(void);>"
64 msgstr "B<struct utmp *getutent(void);>"
65
66 #. type: Plain text
67 #: build/C/man3/getutent.3:41
68 msgid "B<struct utmp *getutid(const struct utmp *>I<ut>B<);>"
69 msgstr "B<struct utmp *getutid(const struct utmp *>I<ut>B<);>"
70
71 #. type: Plain text
72 #: build/C/man3/getutent.3:43
73 msgid "B<struct utmp *getutline(const struct utmp *>I<ut>B<);>"
74 msgstr "B<struct utmp *getutline(const struct utmp *>I<ut>B<);>"
75
76 #. type: Plain text
77 #: build/C/man3/getutent.3:45
78 msgid "B<struct utmp *pututline(const struct utmp *>I<ut>B<);>"
79 msgstr "B<struct utmp *pututline(const struct utmp *>I<ut>B<);>"
80
81 #. type: Plain text
82 #: build/C/man3/getutent.3:47
83 msgid "B<void setutent(void);>"
84 msgstr "B<void setutent(void);>"
85
86 #. type: Plain text
87 #: build/C/man3/getutent.3:49
88 msgid "B<void endutent(void);>"
89 msgstr "B<void endutent(void);>"
90
91 #. type: Plain text
92 #: build/C/man3/getutent.3:51
93 msgid "B<int utmpname(const char *>I<file>B<);>"
94 msgstr "B<int utmpname(const char *>I<file>B<);>"
95
96 #. type: SH
97 #: build/C/man3/getutent.3:51 build/C/man3/getutmp.3:37
98 #: build/C/man3/login.3:36 build/C/man3/updwtmp.3:45 build/C/man5/utmp.5:35
99 #, no-wrap
100 msgid "DESCRIPTION"
101 msgstr "説明"
102
103 #. type: Plain text
104 #: build/C/man3/getutent.3:54
105 msgid "New applications should use the POSIX.1-specified \"utmpx\" versions of these functions; see CONFORMING TO."
106 msgstr "新しいアプリケーションでは、これらの関数の \"utmpx\" 版を使用すべきである。 これらは POSIX.1 で規定されている。「準拠」の節を参照。"
107
108 #. type: Plain text
109 #: build/C/man3/getutent.3:63
110 msgid "B<utmpname>()  sets the name of the utmp-format file for the other utmp functions to access.  If B<utmpname>()  is not used to set the filename before the other functions are used, they assume B<_PATH_UTMP>, as defined in I<E<lt>paths.hE<gt>>."
111 msgstr "B<utmpname>()  は、他の utmp 関数がアクセスする (utmp フォーマットの)  ファイルの名前を指定する。他の関数を使う前に B<utmpname>()  を使って ファイル名の指定を行わなかった場合は、 I<E<lt>path.hE<gt>> で 定義されている B<_PATH_UTMP> がファイル名とみなされる。"
112
113 #. type: Plain text
114 #: build/C/man3/getutent.3:68
115 msgid "B<setutent>()  rewinds the file pointer to the beginning of the utmp file.  It is generally a good idea to call it before any of the other functions."
116 msgstr "B<setutent>()  は、ファイルポインターを utmp ファイルの先頭に移動する。 一般的には、他の関数を使う前にこの関数を呼び出しておくと良いだろう。"
117
118 #. type: Plain text
119 #: build/C/man3/getutent.3:73
120 msgid "B<endutent>()  closes the utmp file.  It should be called when the user code is done accessing the file with the other functions."
121 msgstr "B<endutent>()  は utmp ファイルをクローズする。ユーザーコードで 他の関数を使ってこのファイルにアクセスを行った時は、最後にこの関数を 呼び出すべきである。"
122
123 #. type: Plain text
124 #: build/C/man3/getutent.3:80
125 msgid "B<getutent>()  reads a line from the current file position in the utmp file.  It returns a pointer to a structure containing the fields of the line.  The definition of this structure is shown in B<utmp>(5)."
126 msgstr "B<getutent>()  は utmp ファイルの現在のファイル位置から一行読み込み、 行の各フィールドの内容を収めた構造体へのポインターを返す。 この構造体の定義は B<utmp>(5)  に書かれている。"
127
128 #. type: Plain text
129 #: build/C/man3/getutent.3:96
130 msgid "B<getutid>()  searches forward from the current file position in the utmp file based upon I<ut>.  If I<ut-E<gt>ut_type> is one of B<RUN_LVL>, B<BOOT_TIME>, B<NEW_TIME>, or B<OLD_TIME>, B<getutid>()  will find the first entry whose I<ut_type> field matches I<ut-E<gt>ut_type>.  If I<ut-E<gt>ut_type> is one of B<INIT_PROCESS>, B<LOGIN_PROCESS>, B<USER_PROCESS>, or B<DEAD_PROCESS>, B<getutid>()  will find the first entry whose I<ut_id> field matches I<ut-E<gt>ut_id>."
131 msgstr "B<getutid>()  は、 utmp ファイル中の現在の位置から順方向 (末尾に向かう方向) へ I<ut> に基く検索を行う。 I<ut>-E<gt>ut_type が B<RUN_LVL>, B<BOOT_TIME>, B<NEW_TIME>, B<OLD_TIME> の いずれかなら、 B<getutid>()  は B<ut_type> フィールドが I<ut>-E<gt>ut_type に一致する最初のエントリーを探す。 I<ut>-E<gt>ut_type が B<INIT_PROCESS>, B<LOGIN_PROCESS>, B<USER_PROCESS>, B<DEAD_PROCESS> のいずれかなら、 B<getutid>()  は I<ut_id> フィールドが I<ut>-E<gt>ut_id に 一致する最初のエントリーを探す。"
132
133 #. type: Plain text
134 #: build/C/man3/getutent.3:106
135 msgid "B<getutline>()  searches forward from the current file position in the utmp file.  It scans entries whose I<ut_type> is B<USER_PROCESS> or B<LOGIN_PROCESS> and returns the first one whose I<ut_line> field matches I<ut-E<gt>ut_line>."
136 msgstr "B<getutline>()  は、 utmp ファイルの現在の位置から末尾に向かって検索を行う。 I<ut_type> が B<USER_PROCESS> または B<LOGIN_PROCESS> で、 I<ut_line> フィールドが I<ut>-E<gt>ut_line にマッチする最初の行を返す。"
137
138 #. type: Plain text
139 #: build/C/man3/getutent.3:118
140 msgid "B<pututline>()  writes the I<utmp> structure I<ut> into the utmp file.  It uses B<getutid>()  to search for the proper place in the file to insert the new entry.  If it cannot find an appropriate slot for I<ut>, B<pututline>()  will append the new entry to the end of the file."
141 msgstr "B<pututline>()  は I<utmp> 構造体 I<ut> の内容を utmp ファイルに書き出す。 B<pututline>()  は B<getutid>()  を用いて、新たなエントリーを 挿入するのにふさわしい場所を探す。 I<ut> を挿入するふさわしい場所が 見つからない場合は、新たなエントリーをファイルの末尾に追加する。"
142
143 #. type: SH
144 #: build/C/man3/getutent.3:118 build/C/man3/getutmp.3:51
145 #: build/C/man3/login.3:94
146 #, no-wrap
147 msgid "RETURN VALUE"
148 msgstr "返り値"
149
150 #. type: Plain text
151 #: build/C/man3/getutent.3:127
152 msgid "B<getutent>(), B<getutid>(), and B<getutline>()  return a pointer to a I<struct utmp> on success, and NULL on failure (which includes the \"record not found\" case).  This I<struct utmp> is allocated in static storage, and may be overwritten by subsequent calls."
153 msgstr "B<getutent>(), B<getutid>(), B<getutline>()  は、成功すると I<struct utmp> へのポインターを返す。 失敗すると NULL を返す (レコードが見つからなかった場合も失敗となる)。 この I<struct utmp> は静的な記憶領域に確保され、次にこれらの関数を 呼び出した際に上書きされるかもしれない。"
154
155 #. type: Plain text
156 #: build/C/man3/getutent.3:133
157 msgid "On success B<pututline>()  returns I<ut>; on failure, it returns NULL."
158 msgstr "B<pututline>()  は成功すると I<ut> を返す。失敗すると NULL を返す。"
159
160 #. type: Plain text
161 #: build/C/man3/getutent.3:136
162 msgid "B<utmpname>()  returns 0 if the new name was successfully stored, or -1 on failure."
163 msgstr "B<utmpname>()  は、新しい名前の格納に成功すると 0 を返し、失敗すると -1 を返す。"
164
165 #. type: Plain text
166 #: build/C/man3/getutent.3:140
167 msgid "In the event of an error, these functions I<errno> set to indicate the cause."
168 msgstr "エラーが発生した場合、これらの関数は I<errno> にエラーの原因を示す値を設定する。"
169
170 #. type: SH
171 #: build/C/man3/getutent.3:140
172 #, no-wrap
173 msgid "ERRORS"
174 msgstr "エラー"
175
176 #. type: TP
177 #: build/C/man3/getutent.3:141
178 #, no-wrap
179 msgid "B<ENOMEM>"
180 msgstr "B<ENOMEM>"
181
182 #. type: Plain text
183 #: build/C/man3/getutent.3:144
184 msgid "Out of memory."
185 msgstr "メモリー不足。"
186
187 #. type: TP
188 #: build/C/man3/getutent.3:144
189 #, no-wrap
190 msgid "B<ESRCH>"
191 msgstr "B<ESRCH>"
192
193 #. type: Plain text
194 #: build/C/man3/getutent.3:147
195 msgid "Record not found."
196 msgstr "レコードが見つからなかった。"
197
198 #. type: Plain text
199 #: build/C/man3/getutent.3:154
200 msgid "B<setutent>(), B<pututline>(), and the B<getut*>()  functions can also fail for the reasons described in B<open>(2)."
201 msgstr "関数 B<setutent>(), B<pututline>(), B<getut*>()  は B<open>(2)  に書かれている理由でも失敗することがある。"
202
203 #. type: SH
204 #: build/C/man3/getutent.3:154 build/C/man3/login.3:99
205 #: build/C/man3/updwtmp.3:58 build/C/man5/utmp.5:224
206 #, no-wrap
207 msgid "FILES"
208 msgstr "ファイル"
209
210 #. type: Plain text
211 #: build/C/man3/getutent.3:156
212 msgid "/var/run/utmp\tdatabase of currently logged-in users"
213 msgstr "/var/run/utmp 現在ログイン中のユーザーのデータベース"
214
215 #. type: Plain text
216 #: build/C/man3/getutent.3:158
217 msgid "/var/log/wtmp\tdatabase of past user logins"
218 msgstr "/var/log/wtmp 過去のユーザーログインのデータベース"
219
220 #. type: SH
221 #: build/C/man3/getutent.3:158 build/C/man3/getutmp.3:62
222 #: build/C/man3/login.3:112 build/C/man3/updwtmp.3:62 build/C/man5/utmp.5:228
223 #, no-wrap
224 msgid "CONFORMING TO"
225 msgstr "準拠"
226
227 #. type: Plain text
228 #: build/C/man3/getutent.3:160
229 msgid "XPG2, SVr4."
230 msgstr "XPG2, SVr4."
231
232 #. type: Plain text
233 #: build/C/man3/getutent.3:169
234 msgid "In XPG2 and SVID 2 the function B<pututline>()  is documented to return void, and that is what it does on many systems (AIX, HP-UX).  HP-UX introduces a new function B<_pututline>()  with the prototype given above for B<pututline>()."
235 msgstr "XPG2 と SVID 2 では、 B<pututline>() 関数は値を返さないとされており、 (AIX, HP-UX などの) 多くのシステムではそうなっている。 HP-UX では、上述の B<pututline>() と同じプロトタイプを持つ 新しい関数 B<_pututline>() が導入されている。"
236
237 #. type: Plain text
238 #: build/C/man3/getutent.3:173
239 msgid "All these functions are obsolete now on non-Linux systems.  POSIX.1-2001, following SUSv1, does not have any of these functions, but instead uses"
240 msgstr "現在では、Linux 以外のシステムでは、これらの関数は全て廃止されている。 SUSv1 の後に出てきた POSIX.1-2001 では、もはやこれらの関数はなく、 代わりに以下のものを使う。"
241
242 #. type: Plain text
243 #: build/C/man3/getutent.3:175
244 msgid "B<#include E<lt>utmpx.hE<gt>>"
245 msgstr "B<#include E<lt>utmpx.hE<gt>>"
246
247 #. type: Plain text
248 #: build/C/man3/getutent.3:177
249 msgid "B<struct utmpx *getutxent(void);>"
250 msgstr "B<struct utmpx *getutxent(void);>"
251
252 #. type: Plain text
253 #: build/C/man3/getutent.3:179
254 msgid "B<struct utmpx *getutxid(const struct utmpx *);>"
255 msgstr "B<struct utmpx *getutxid(const struct utmpx *);>"
256
257 #. type: Plain text
258 #: build/C/man3/getutent.3:181
259 msgid "B<struct utmpx *getutxline(const struct utmpx *);>"
260 msgstr "B<struct utmpx *getutxline(const struct utmpx *);>"
261
262 #. type: Plain text
263 #: build/C/man3/getutent.3:183
264 msgid "B<struct utmpx *pututxline(const struct utmpx *);>"
265 msgstr "B<struct utmpx *pututxline(const struct utmpx *);>"
266
267 #. type: Plain text
268 #: build/C/man3/getutent.3:185
269 msgid "B<void setutxent(void);>"
270 msgstr "B<void setutxent(void);>"
271
272 #. type: Plain text
273 #: build/C/man3/getutent.3:187
274 msgid "B<void endutxent(void);>"
275 msgstr "B<void endutxent(void);>"
276
277 #. type: Plain text
278 #: build/C/man3/getutent.3:196
279 msgid "These functions are provided by glibc, and perform the same task as their equivalents without the \"x\", but use I<struct utmpx>, defined on Linux to be the same as I<struct utmp>.  For completeness, glibc also provides B<utmpxname>(), although this function is not specified by POSIX.1."
280 msgstr "これらの関数は glibc により提供されており、 \"x\" がない関数と同じ処理を行うが、 I<struct utmpx> を使用する。 Linux では、この構造体の定義は I<struct utmp> と同じになっている。 完全を期すために、glibc では B<utmpxname>()  も提供している。この関数は POSIX.1 では規定されていない。"
281
282 #. type: Plain text
283 #: build/C/man3/getutent.3:204
284 msgid "On some other systems, the I<utmpx> structure is a superset of the I<utmp> structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often I</var/*/utmpx> and I</var/*/wtmpx>."
285 msgstr "Linux 以外のシステムでは、 I<utmpx> 構造体は I<utmp> 構造体の上位集合 (superset) になっていて、 追加のフィールドがあったり、既存のフィールドのサイズが大きくなっていたり するものもある。複数のファイルが使用されている場合もあり、多くの場合 I</var/*/utmpx> と I</var/*/wtmpx> というファイルが使われる。"
286
287 #. type: Plain text
288 #: build/C/man3/getutent.3:212
289 msgid "Linux glibc on the other hand does not use a parallel I<utmpx> file since its I<utmp> structure is already large enough.  The \"x\" functions listed above are just aliases for their counterparts without the \"x\" (e.g., B<getutxent>()  is an alias for B<getutent>())."
290 msgstr ""
291 "一方、 Linux glibc では複数の I<utmpx> ファイル は使われていない。\n"
292 "I<utmp> 構造体が十分に大きいからである。\n"
293 "上記の名前に \"x\" が付いた関数は \"x\" が付いていない対応する関数の別名と\n"
294 "なっている (例えば I<getutxent>() は I<getutent>() の別名である)。"
295
296 #. type: SH
297 #: build/C/man3/getutent.3:212 build/C/man3/getutmp.3:65
298 #: build/C/man3/login.3:115 build/C/man3/updwtmp.3:65 build/C/man5/utmp.5:280
299 #, no-wrap
300 msgid "NOTES"
301 msgstr "注意"
302
303 #. type: SS
304 #: build/C/man3/getutent.3:213
305 #, no-wrap
306 msgid "Glibc notes"
307 msgstr "glibc での注意"
308
309 #. type: Plain text
310 #: build/C/man3/getutent.3:216
311 msgid "The above functions are not thread-safe.  Glibc adds reentrant versions"
312 msgstr "上記の関数群はスレッドセーフではない。 glibc にはリエントラント版 (reentrant) が追加されている。"
313
314 #. type: Plain text
315 #: build/C/man3/getutent.3:221
316 #, no-wrap
317 msgid ""
318 "B<#define _GNU_SOURCE>    /* or _SVID_SOURCE or _BSD_SOURCE;\n"
319 "\\&                          see B<feature_test_macros>(7) */\n"
320 "B<#include E<lt>utmp.hE<gt>>\n"
321 msgstr ""
322 "B<#define _GNU_SOURCE>    /* or _SVID_SOURCE or _BSD_SOURCE;\n"
323 "\\&                          B<feature_test_macros>(7) 参照 */\n"
324 "B<#include E<lt>utmp.hE<gt>>\n"
325
326 #. type: Plain text
327 #: build/C/man3/getutent.3:223
328 #, no-wrap
329 msgid "B<int getutent_r(struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
330 msgstr "B<int getutent_r(struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
331
332 #. type: Plain text
333 #: build/C/man3/getutent.3:226
334 #, no-wrap
335 msgid ""
336 "B<int getutid_r(struct utmp *>I<ut>B<,>\n"
337 "B<              struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
338 msgstr ""
339 "B<int getutid_r(struct utmp *>I<ut>B<,>\n"
340 "B<              struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
341
342 #. type: Plain text
343 #: build/C/man3/getutent.3:229
344 #, no-wrap
345 msgid ""
346 "B<int getutline_r(struct utmp *>I<ut>B<,>\n"
347 "B<                struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
348 msgstr ""
349 "B<int getutline_r(struct utmp *>I<ut>B<,>\n"
350 "B<                struct utmp *>I<ubuf>B<, struct utmp **>I<ubufp>B<);>\n"
351
352 #. type: Plain text
353 #: build/C/man3/getutent.3:241
354 msgid "These functions are GNU extensions, analogs of the functions of the same name without the _r suffix.  The I<ubuf> argument gives these functions a place to store their result.  On success they return 0, and a pointer to the result is written in I<*ubufp>.  On error, these functions return -1.  There are no utmpx equivalents of the above functions.  (POSIX.1 does not specify such functions.)"
355 msgstr "これらの関数は GNU での拡張であり、末尾の _r をとった名前の関数と 同様の機能を持つ。 I<ubuf> パラメーターは結果を格納する場所を指定する。 成功すると 0 を返し、結果へのポインターを I<*ubufp> に書き込む。エラーの場合 -1 を返す。 上記の関数に対応する utmpx 版は存在しない (POSIX.1 ではこれらの関数を規定されていない)。"
356
357 #. type: SH
358 #: build/C/man3/getutent.3:241
359 #, no-wrap
360 msgid "EXAMPLE"
361 msgstr "例"
362
363 #. type: Plain text
364 #: build/C/man3/getutent.3:249
365 msgid "The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal.  For usage in a real application, you should check the return values of B<getpwuid>(3)  and B<ttyname>(3)."
366 msgstr "以下の例では、 utmp のレコードの追加・削除を行っている。このコードは、 擬似端末 (pseudo terminal) から実行されることを想定している。 実際のアプリケーションでは B<getpwuid>(3)  と B<ttyname>(3)  の戻り値を検査するべきである。"
367
368 #. type: Plain text
369 #: build/C/man3/getutent.3:256
370 #, no-wrap
371 msgid ""
372 "#include E<lt>string.hE<gt>\n"
373 "#include E<lt>stdlib.hE<gt>\n"
374 "#include E<lt>pwd.hE<gt>\n"
375 "#include E<lt>unistd.hE<gt>\n"
376 "#include E<lt>utmp.hE<gt>\n"
377 msgstr ""
378 "#include E<lt>string.hE<gt>\n"
379 "#include E<lt>stdlib.hE<gt>\n"
380 "#include E<lt>pwd.hE<gt>\n"
381 "#include E<lt>unistd.hE<gt>\n"
382 "#include E<lt>utmp.hE<gt>\n"
383
384 #. type: Plain text
385 #: build/C/man3/getutent.3:261
386 #, no-wrap
387 msgid ""
388 "int\n"
389 "main(int argc, char *argv[])\n"
390 "{\n"
391 "    struct utmp entry;\n"
392 msgstr ""
393 "int\n"
394 "main(int argc, char *argv[])\n"
395 "{\n"
396 "    struct utmp entry;\n"
397
398 #. type: Plain text
399 #: build/C/man3/getutent.3:263
400 #, no-wrap
401 msgid "    system(\"echo before adding entry:;who\");\n"
402 msgstr "    system(\"echo before adding entry:;who\");\n"
403
404 #. type: Plain text
405 #: build/C/man3/getutent.3:275
406 #, no-wrap
407 msgid ""
408 "    entry.ut_type = USER_PROCESS;\n"
409 "    entry.ut_pid = getpid();\n"
410 "    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen(\"/dev/\"));\n"
411 "    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */\n"
412 "    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen(\"/dev/tty\"));\n"
413 "    time(&entry.ut_time);\n"
414 "    strcpy(entry.ut_user, getpwuid(getuid())-E<gt>pw_name);\n"
415 "    memset(entry.ut_host, 0, UT_HOSTSIZE);\n"
416 "    entry.ut_addr = 0;\n"
417 "    setutent();\n"
418 "    pututline(&entry);\n"
419 msgstr ""
420 "    entry.ut_type = USER_PROCESS;\n"
421 "    entry.ut_pid = getpid();\n"
422 "    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen(\"/dev/\"));\n"
423 "    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */\n"
424 "    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen(\"/dev/tty\"));\n"
425 "    time(&entry.ut_time);\n"
426 "    strcpy(entry.ut_user, getpwuid(getuid())-E<gt>pw_name);\n"
427 "    memset(entry.ut_host, 0, UT_HOSTSIZE);\n"
428 "    entry.ut_addr = 0;\n"
429 "    setutent();\n"
430 "    pututline(&entry);\n"
431
432 #. type: Plain text
433 #: build/C/man3/getutent.3:277
434 #, no-wrap
435 msgid "    system(\"echo after adding entry:;who\");\n"
436 msgstr "    system(\"echo after adding entry:;who\");\n"
437
438 #. type: Plain text
439 #: build/C/man3/getutent.3:284
440 #, no-wrap
441 msgid ""
442 "    entry.ut_type = DEAD_PROCESS;\n"
443 "    memset(entry.ut_line, 0, UT_LINESIZE);\n"
444 "    entry.ut_time = 0;\n"
445 "    memset(entry.ut_user, 0, UT_NAMESIZE);\n"
446 "    setutent();\n"
447 "    pututline(&entry);\n"
448 msgstr ""
449 "    entry.ut_type = DEAD_PROCESS;\n"
450 "    memset(entry.ut_line, 0, UT_LINESIZE);\n"
451 "    entry.ut_time = 0;\n"
452 "    memset(entry.ut_user, 0, UT_NAMESIZE);\n"
453 "    setutent();\n"
454 "    pututline(&entry);\n"
455
456 #. type: Plain text
457 #: build/C/man3/getutent.3:286
458 #, no-wrap
459 msgid "    system(\"echo after removing entry:;who\");\n"
460 msgstr "    system(\"echo after removing entry:;who\");\n"
461
462 #. type: Plain text
463 #: build/C/man3/getutent.3:290
464 #, no-wrap
465 msgid ""
466 "    endutent();\n"
467 "    exit(EXIT_SUCCESS);\n"
468 "}\n"
469 msgstr ""
470 "    endutent();\n"
471 "    exit(EXIT_SUCCESS);\n"
472 "}\n"
473
474 #.  .PP
475 #.  Note that the \fIutmp\fP struct from libc5 has changed in libc6.
476 #.  Because of this,
477 #.  binaries using the old libc5 struct will corrupt
478 #.  .IR /var/run/utmp " and/or " /var/log/wtmp .
479 #.  .SH BUGS
480 #.  This man page is based on the libc5 one, things may work differently now.
481 #. type: SH
482 #: build/C/man3/getutent.3:291 build/C/man3/getutmp.3:76
483 #: build/C/man3/login.3:130 build/C/man3/updwtmp.3:81 build/C/man5/utmp.5:338
484 #, no-wrap
485 msgid "SEE ALSO"
486 msgstr "関連項目"
487
488 #. type: Plain text
489 #: build/C/man3/getutent.3:294
490 msgid "B<getutmp>(3), B<utmp>(5)"
491 msgstr "B<getutmp>(3), B<utmp>(5)"
492
493 #. type: SH
494 #: build/C/man3/getutent.3:294 build/C/man3/getutmp.3:80
495 #: build/C/man3/login.3:133 build/C/man3/updwtmp.3:84 build/C/man5/utmp.5:352
496 #, no-wrap
497 msgid "COLOPHON"
498 msgstr "この文書について"
499
500 #. type: Plain text
501 #: build/C/man3/getutent.3:302 build/C/man3/getutmp.3:88
502 #: build/C/man3/login.3:141 build/C/man3/updwtmp.3:92 build/C/man5/utmp.5:360
503 msgid "This page is part of release 3.78 of the Linux I<man-pages> project.  A description of the project, information about reporting bugs, and the latest version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/."
504 msgstr ""
505 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
506 "である。プロジェクトの説明とバグ報告に関する情報は\n"
507 "http://www.kernel.org/doc/man-pages/ に書かれている。"
508
509 #. type: TH
510 #: build/C/man3/getutmp.3:26
511 #, no-wrap
512 msgid "GETUTMP"
513 msgstr "GETUTMP"
514
515 #. type: TH
516 #: build/C/man3/getutmp.3:26
517 #, no-wrap
518 msgid "2014-04-08"
519 msgstr "2014-04-08"
520
521 #. type: TH
522 #: build/C/man3/getutmp.3:26 build/C/man5/utmp.5:30
523 #, no-wrap
524 msgid "Linux"
525 msgstr "Linux"
526
527 #. type: Plain text
528 #: build/C/man3/getutmp.3:29
529 msgid "getutmp, getutmpx - copy utmp structure to utmpx, and vice versa"
530 msgstr "getutmp, getutmpx - utmp 構造体から utmpx 構造体、その逆のコピーを行う"
531
532 #. type: Plain text
533 #: build/C/man3/getutmp.3:33
534 #, no-wrap
535 msgid ""
536 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
537 "B<#include E<lt>utmpx.hE<gt>>\n"
538 msgstr ""
539 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
540 "B<#include E<lt>utmpx.hE<gt>>\n"
541
542 #. type: Plain text
543 #: build/C/man3/getutmp.3:36
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 "B< void getutmp(const struct utmpx *>I<ux>B<, struct utmp *>I<u>B<);>\n"
550 "B< void getutmpx(const struct utmp *>I<u>B<, struct utmpx *>I<ux>B<);>\n"
551
552 #. type: Plain text
553 #: build/C/man3/getutmp.3:51
554 msgid "The B<getutmp>()  function copies the fields of the I<utmpx> structure pointed to by I<ux> to the corresponding fields of the I<utmp> structure pointed to by I<u>.  The B<getutmpx>()  function performs the converse operation."
555 msgstr ""
556 "B<getutmp>() 関数は、 I<ux> が指す I<utmpx> 構造体の各フィールドを、\n"
557 "I<u> が指す I<utmp> 構造体の対応するフィールドにコピーする。\n"
558 "B<getutmpx>() 関数は逆の操作を行う。"
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 "これらの関数は glibc バージョン 2.1.1 で初めて登場した。"
575
576 #. type: SH
577 #: build/C/man3/getutmp.3:55
578 #, no-wrap
579 msgid "ATTRIBUTES"
580 msgstr "属性"
581
582 #. type: SS
583 #: build/C/man3/getutmp.3:56
584 #, no-wrap
585 msgid "Multithreading (see pthreads(7))"
586 msgstr "マルチスレッディング (pthreads(7) 参照)"
587
588 #. type: Plain text
589 #: build/C/man3/getutmp.3:62
590 msgid "The B<getutmp>()  and B<getutmpx>()  functions are thread-safe."
591 msgstr "関数 B<getutmp>() と B<getutmpx>() はスレッドセーフである。"
592
593 #. type: Plain text
594 #: build/C/man3/getutmp.3:65
595 msgid "These functions are nonstandard, but appear on a few other systems, such as Solaris and NetBSD."
596 msgstr ""
597 "これらの関数は非標準である。\n"
598 "Linux 以外にも、これらの関数が存在するシステムもいくつかある\n"
599 "(Solaris や NetBSD など)。"
600
601 #.  e.g., on Solaris, the utmpx structure is rather larger than utmp.
602 #. type: Plain text
603 #: build/C/man3/getutmp.3:76
604 msgid "These functions exist primarily for compatibility with other systems where the I<utmp> and I<utmpx> structures contain different fields, or the size of corresponding fields differs.  On Linux, the two structures contain the same fields, and the fields have the same sizes."
605 msgstr ""
606 "これらの関数が存在する一番の目的は、\n"
607 "I<utmp> 構造体と I<utmpx> 構造体が異なるフィールドを持たり、\n"
608 "対応するフィールドの大きさが異なっている、他のシステムとの\n"
609 "互換性のためである。\n"
610 "Linux では、これらの構造体は同じフィールドを持っており、\n"
611 "各フィールドのサイズも同じである。"
612
613 #. type: Plain text
614 #: build/C/man3/getutmp.3:80
615 msgid "B<utmpdump>(1), B<getutent>(3), B<utmp>(5)"
616 msgstr "B<utmpdump>(1), B<getutent>(3), B<utmp>(5)"
617
618 #. type: TH
619 #: build/C/man3/login.3:25
620 #, no-wrap
621 msgid "LOGIN"
622 msgstr "LOGIN"
623
624 #. type: TH
625 #: build/C/man3/login.3:25
626 #, no-wrap
627 msgid "2004-05-06"
628 msgstr "2004-05-06"
629
630 #. type: TH
631 #: build/C/man3/login.3:25 build/C/man3/updwtmp.3:29
632 #, no-wrap
633 msgid "GNU"
634 msgstr "GNU"
635
636 #. type: Plain text
637 #: build/C/man3/login.3:28
638 msgid "login, logout - write utmp and wtmp entries"
639 msgstr "login, logout - utmp と wtmp エントリーを書き込む"
640
641 #. type: Plain text
642 #: build/C/man3/login.3:32
643 msgid "B<void login(const struct utmp *>I<ut>B<);>"
644 msgstr "B<void login(const struct utmp *>I<ut>B<);>"
645
646 #. type: Plain text
647 #: build/C/man3/login.3:34
648 msgid "B<int logout(const char *>I<ut_line>B<);>"
649 msgstr "B<int logout(const char *>I<ut_line>B<);>"
650
651 #. type: Plain text
652 #: build/C/man3/login.3:36
653 msgid "Link with I<-lutil>."
654 msgstr "I<-lutil> でリンクする。"
655
656 #. type: Plain text
657 #: build/C/man3/login.3:41
658 msgid "The utmp file records who is currently using the system.  The wtmp file records all logins and logouts.  See B<utmp>(5)."
659 msgstr "utmp ファイルは現在システムを使用しているユーザーを記録する。 wtmp ファイルはすべてのログインとログアウトを記録する。 B<utmp>(5)  を参照すること。"
660
661 #. type: Plain text
662 #: build/C/man3/login.3:48
663 msgid "The function B<login>()  takes the supplied I<struct utmp>, I<ut>, and writes it to both the utmp and the wtmp file."
664 msgstr "関数 B<login>()  は与えられた I<struct utmp> I<ut> を utmp と wtmp ファイルの両方に書き込む。"
665
666 #. type: Plain text
667 #: build/C/man3/login.3:52
668 msgid "The function B<logout>()  clears the entry in the utmp file again."
669 msgstr "関数 B<logout>()  は utmp ファイルにあるエントリーをクリアする。"
670
671 #. type: SS
672 #: build/C/man3/login.3:52
673 #, no-wrap
674 msgid "GNU details"
675 msgstr "GNU 版の詳細"
676
677 #. type: Plain text
678 #: build/C/man3/login.3:78
679 msgid "More precisely, B<login>()  takes the argument I<ut> struct, fills the field I<ut-E<gt>ut_type> (if there is such a field) with the value B<USER_PROCESS>, and fills the field I<ut-E<gt>ut_pid> (if there is such a field) with the process ID of the calling process.  Then it tries to fill the field I<ut-E<gt>ut_line>.  It takes the first of I<stdin>, I<stdout>, I<stderr> that is a terminal, and stores the corresponding pathname minus a possible leading I</dev/> into this field, and then writes the struct to the utmp file.  On the other hand, if no terminal name was found, this field is filled with \"???\" and the struct is not written to the utmp file.  After this, the struct is written to the wtmp file."
680 msgstr "より正確には、 B<login>()  は引き数 I<ut> 構造体をとり、(もし存在するならば) フィールド I<ut-E<gt>ut_type> を B<USER_PROCESS> という値にし、(もし存在するならば) フィールド I<ut-E<gt>ut_pid> を呼び出し元プロセスのプロセス ID の値にする。 次にフィールド I<ut-E<gt>ut_line> の値を設定しようとする。 この関数は、標準入力・標準出力・標準エラー出力の中から端末である最初のものをとり、対応するパス名から先頭の I</dev/> を引いたものを このフィールドに格納して、この構造体を utmp ファイルに書き込む。 一方、端末名が見つからない場合は、このフィールドは \"???\" とされて、 この構造体は utmp ファイルに書き込まれない。 その後にこの構造体は wtmp ファイルに書き込まれる。"
681
682 #. type: Plain text
683 #: build/C/man3/login.3:94
684 msgid "The B<logout>()  function searches the utmp file for an entry matching the I<ut_line> argument.  If a record is found, it is updated by zeroing out the I<ut_name> and I<ut_host> fields, updating the I<ut_tv> timestamp field and setting I<ut_type> (if there is such a field) to B<DEAD_PROCESS>."
685 msgstr "B<logout>()  関数は utmp ファイルから I<ut_line> 引き数にマッチするエントリーを探す。 レコードが見つかった場合、 I<ut_name> と I<ut_host> フィールドをクリアして、 I<ut_tv> タイムスタンプフィールドを更新し、 (もし存在するならば)  I<ut_type> フィールドを B<DEAD_PROCESS> に更新する。"
686
687 #. type: Plain text
688 #: build/C/man3/login.3:99
689 msgid "The B<logout>()  function returns 1 if the entry was successfully written to the database, or 0 if an error occurred."
690 msgstr "エントリーをデータベースに書き込むのに成功した場合、 B<logout>()  関数は 1 を返す。 またエラーが起こった場合、0 を返す。"
691
692 #. type: TP
693 #: build/C/man3/login.3:100
694 #, no-wrap
695 msgid "I</var/run/utmp>"
696 msgstr "I</var/run/utmp>"
697
698 #. type: Plain text
699 #: build/C/man3/login.3:106
700 msgid "user accounting database, configured through B<_PATH_UTMP> in I<E<lt>paths.hE<gt>>"
701 msgstr "ユーザーアカウントデータベース。 I<E<lt>paths.hE<gt>> における B<_PATH_UTMP> で設定されている。"
702
703 #. type: TP
704 #: build/C/man3/login.3:106 build/C/man3/updwtmp.3:59
705 #, no-wrap
706 msgid "I</var/log/wtmp>"
707 msgstr "I</var/log/wtmp>"
708
709 #. type: Plain text
710 #: build/C/man3/login.3:112
711 msgid "user accounting log file, configured through B<_PATH_WTMP> in I<E<lt>paths.hE<gt>>"
712 msgstr "ユーザーアカウントログファイル。 I<E<lt>paths.hE<gt>> における B<_PATH_WTMP> で設定されている。"
713
714 #. type: Plain text
715 #: build/C/man3/login.3:115
716 msgid "Not in POSIX.1-2001.  Present on the BSDs."
717 msgstr "POSIX.1-2001 にはない。 BSD 系に存在する。"
718
719 #. type: Plain text
720 #: build/C/man3/login.3:130
721 msgid "Note that the member I<ut_user> of I<struct utmp> is called I<ut_name> in BSD.  Therefore, I<ut_name> is defined as an alias for I<ut_user> in I<E<lt>utmp.hE<gt>>."
722 msgstr "I<struct utmp> のメンバ I<ut_user> は、BSD では I<ut_name> という名前である点に注意すること。 そのため I<ut_name> は I<E<lt>utmp.hE<gt>> において I<ut_user> のエイリアスとして定義されている。"
723
724 #. type: Plain text
725 #: build/C/man3/login.3:133
726 msgid "B<getutent>(3), B<utmp>(5)"
727 msgstr "B<getutent>(3), B<utmp>(5)"
728
729 #. type: TH
730 #: build/C/man3/updwtmp.3:29
731 #, no-wrap
732 msgid "UPDWTMP"
733 msgstr "UPDWTMP"
734
735 #. type: Plain text
736 #: build/C/man3/updwtmp.3:32
737 msgid "updwtmp, logwtmp - append an entry to the wtmp file"
738 msgstr "updwtmp, logwtmp - wtmp ファイルにエントリーを追加する"
739
740 #. type: Plain text
741 #: build/C/man3/updwtmp.3:35
742 #, no-wrap
743 msgid "B<#include E<lt>utmp.hE<gt>>\n"
744 msgstr "B<#include E<lt>utmp.hE<gt>>\n"
745
746 #. type: Plain text
747 #: build/C/man3/updwtmp.3:37
748 #, no-wrap
749 msgid "B<void updwtmp(const char *>I<wtmp_file>B<, const struct utmp *>I<ut>B<);>\n"
750 msgstr "B<void updwtmp(const char *>I<wtmp_file>B<, const struct utmp *>I<ut>B<);>\n"
751
752 #. type: Plain text
753 #: build/C/man3/updwtmp.3:40
754 #, no-wrap
755 msgid "B<void logwtmp(const char *>I<line>B<, const char *>I<name>B<, const char *>I<host>B<);>\n"
756 msgstr "B<void logwtmp(const char *>I<line>B<, const char *>I<name>B<, const char *>I<host>B<);>\n"
757
758 #. type: Plain text
759 #: build/C/man3/updwtmp.3:45
760 msgid "For B<logwtmp>(), link with I<-lutil>."
761 msgstr "B<logwtmp>() は I<-lutil> でリンクする。"
762
763 #. type: Plain text
764 #: build/C/man3/updwtmp.3:50
765 msgid "B<updwtmp>()  appends the utmp structure I<ut> to the wtmp file."
766 msgstr "B<updwtmp>()  は、utmp 構造体 I<ut> を wtmp ファイルに追加する。"
767
768 #. type: Plain text
769 #: build/C/man3/updwtmp.3:58
770 msgid "B<logwtmp>()  constructs a utmp structure using I<line>, I<name>, I<host>, current time and current process ID.  Then it calls B<updwtmp>()  to append the structure to the wtmp file."
771 msgstr "B<logwtmp>()  は、 I<line>, I<name>, I<host>, 現在時刻、現プロセスID から utmp 構造体を作り、 B<updwtmp>()  を呼び出してその構造体を wtmp ファイルに追加する。"
772
773 #. type: Plain text
774 #: build/C/man3/updwtmp.3:62
775 msgid "database of past user logins"
776 msgstr "ユーザーログインの履歴データベース"
777
778 #. type: Plain text
779 #: build/C/man3/updwtmp.3:65
780 msgid "Not in POSIX.1-2001.  Present on Solaris, NetBSD, and perhaps other systems."
781 msgstr "POSIX.1-2001 にはない。 Solaris, NetBSD に存在し、おそらく他のシステムにもあるだろう。"
782
783 #. type: Plain text
784 #: build/C/man3/updwtmp.3:69
785 msgid "For consistency with the other \"utmpx\" functions (see B<getutxent>(3)), glibc provides (since version 2.1):"
786 msgstr "他の \"utmpx\" 関数群 (B<getutxent>(3)  参照) との一貫性のために、glibc (バージョン 2.1 以降) は以下の関数を 提供している:"
787
788 #. type: Plain text
789 #: build/C/man3/updwtmp.3:72
790 #, no-wrap
791 msgid "B<#include E<lt>utmpx.hE<gt>>\n"
792 msgstr "B<#include E<lt>utmpx.hE<gt>>\n"
793
794 #. type: Plain text
795 #: build/C/man3/updwtmp.3:74
796 #, no-wrap
797 msgid "B<void updwtmpx (const char *>I<wtmpx_file>B<, const struct utmpx *>I<utx>B<);>\n"
798 msgstr "B<void updwtmpx (const char *>I<wtmpx_file>B<, const struct utmpx *>I<utx>B<);>\n"
799
800 #. type: Plain text
801 #: build/C/man3/updwtmp.3:81
802 msgid "This function performs the same task as B<updwtmp>(), but differs in that it takes a I<utmpx> structure as its last argument."
803 msgstr "この関数は B<updwtmp>()  と同じ作業を行うが、最後の引き数として I<utmpx> 構造体を取るところが異なる。"
804
805 #. type: Plain text
806 #: build/C/man3/updwtmp.3:84
807 msgid "B<getutxent>(3), B<wtmp>(5)"
808 msgstr "B<getutxent>(3), B<wtmp>(5)"
809
810 #. type: TH
811 #: build/C/man5/utmp.5:30
812 #, no-wrap
813 msgid "UTMP"
814 msgstr "UTMP"
815
816 #. type: Plain text
817 #: build/C/man5/utmp.5:33
818 msgid "utmp, wtmp - login records"
819 msgstr "utmp, wtmp - ログイン記録"
820
821 #. type: Plain text
822 #: build/C/man5/utmp.5:42
823 msgid "The I<utmp> file allows one to discover information about who is currently using the system.  There may be more users currently using the system, because not all programs use utmp logging."
824 msgstr "I<utmp> ファイルを見ることで、現在誰がシステムを使っているかという情報 が得られる。ただすべてのプログラムが utmp ファイルを 更新しているわけではないので、実際にはそれ以上のユーザーが システムを使っている可能性がある。"
825
826 #. type: Plain text
827 #: build/C/man5/utmp.5:52
828 msgid "B<Warning:> I<utmp> must not be writable by the user class \"other\", because many system programs (foolishly)  depend on its integrity.  You risk faked system logfiles and modifications of system files if you leave I<utmp> writable to any user other than the owner and group owner of the file."
829 msgstr "B<警告:> (愚かにも) 多くのシステムプログラムがその整合性に依存しているので、 I<utmp> ファイルは \"other\" に分類されるユーザーに対して 書き込み可能にしてはならない。 ファイルの所有者とグループオーナー以外のユーザーに対して I<utmp> ファイルを書き込み可能な状態にしておくと、 システムのログファイルを偽造されたり、システムファイルの 改ざんを受けるといったリスクを犯すことになる。"
830
831 #. type: Plain text
832 #: build/C/man5/utmp.5:60
833 msgid "The file is a sequence of I<utmp> structures, declared as follows in I<E<lt>utmp.hE<gt>> (note that this is only one of several definitions around; details depend on the version of libc):"
834 msgstr "このファイルは I<utmp> 構造体の繰り返しで構成される。 この構造体は I<E<lt>utmp.hE<gt>> で以下のように定義されている (ここに記述してあるのは幾つかの大まかな定義のみで、 詳細は libc のバージョンにより変わることに注意が必要である)。"
835
836 #. type: Plain text
837 #: build/C/man5/utmp.5:64
838 #, no-wrap
839 msgid "/* Values for ut_type field, below */\n"
840 msgstr "/* Values for ut_type field, below */\n"
841
842 #. type: Plain text
843 #: build/C/man5/utmp.5:79
844 #, no-wrap
845 msgid ""
846 "#define EMPTY         0 /* Record does not contain valid info\n"
847 "                           (formerly known as UT_UNKNOWN on Linux) */\n"
848 "#define RUN_LVL       1 /* Change in system run-level (see\n"
849 "                           B<init>(8)) */\n"
850 "#define BOOT_TIME     2 /* Time of system boot (in I<ut_tv>) */\n"
851 "#define NEW_TIME      3 /* Time after system clock change\n"
852 "                           (in I<ut_tv>) */\n"
853 "#define OLD_TIME      4 /* Time before system clock change\n"
854 "                           (in I<ut_tv>) */\n"
855 "#define INIT_PROCESS  5 /* Process spawned by B<init>(8) */\n"
856 "#define LOGIN_PROCESS 6 /* Session leader process for user login */\n"
857 "#define USER_PROCESS  7 /* Normal process */\n"
858 "#define DEAD_PROCESS  8 /* Terminated process */\n"
859 "#define ACCOUNTING    9 /* Not implemented */\n"
860 msgstr ""
861 "#define EMPTY         0 /* Record does not contain valid info\n"
862 "                           (formerly known as UT_UNKNOWN on Linux) */\n"
863 "#define RUN_LVL       1 /* Change in system run-level (see\n"
864 "                           B<init>(8)) */\n"
865 "#define BOOT_TIME     2 /* Time of system boot (in I<ut_tv>) */\n"
866 "#define NEW_TIME      3 /* Time after system clock change\n"
867 "                           (in I<ut_tv>) */\n"
868 "#define OLD_TIME      4 /* Time before system clock change\n"
869 "                           (in I<ut_tv>) */\n"
870 "#define INIT_PROCESS  5 /* Process spawned by B<init>(8) */\n"
871 "#define LOGIN_PROCESS 6 /* Session leader process for user login */\n"
872 "#define USER_PROCESS  7 /* Normal process */\n"
873 "#define DEAD_PROCESS  8 /* Terminated process */\n"
874 "#define ACCOUNTING    9 /* Not implemented */\n"
875
876 #. type: Plain text
877 #: build/C/man5/utmp.5:83
878 #, no-wrap
879 msgid ""
880 "#define UT_LINESIZE      32\n"
881 "#define UT_NAMESIZE      32\n"
882 "#define UT_HOSTSIZE     256\n"
883 msgstr ""
884 "#define UT_LINESIZE      32\n"
885 "#define UT_NAMESIZE      32\n"
886 "#define UT_HOSTSIZE     256\n"
887
888 #. type: Plain text
889 #: build/C/man5/utmp.5:88
890 #, no-wrap
891 msgid ""
892 "struct exit_status {              /* Type for ut_exit, below */\n"
893 "    short int e_termination;      /* Process termination status */\n"
894 "    short int e_exit;             /* Process exit status */\n"
895 "};\n"
896 msgstr ""
897 "struct exit_status {              /* Type for ut_exit, below */\n"
898 "    short int e_termination;      /* Process termination status */\n"
899 "    short int e_exit;             /* Process exit status */\n"
900 "};\n"
901
902 #. type: Plain text
903 #: build/C/man5/utmp.5:116
904 #, no-wrap
905 msgid ""
906 "struct utmp {\n"
907 "    short   ut_type;              /* Type of record */\n"
908 "    pid_t   ut_pid;               /* PID of login process */\n"
909 "    char    ut_line[UT_LINESIZE]; /* Device name of tty - \"/dev/\" */\n"
910 "    char    ut_id[4];             /* Terminal name suffix,\n"
911 "                                     or inittab(5) ID */\n"
912 "    char    ut_user[UT_NAMESIZE]; /* Username */\n"
913 "    char    ut_host[UT_HOSTSIZE]; /* Hostname for remote login, or\n"
914 "                                     kernel version for run-level\n"
915 "                                     messages */\n"
916 "    struct  exit_status ut_exit;  /* Exit status of a process\n"
917 "                                     marked as DEAD_PROCESS; not\n"
918 "                                     used by Linux init (1 */\n"
919 "    /* The ut_session and ut_tv fields must be the same size when\n"
920 "       compiled 32- and 64-bit.  This allows data files and shared\n"
921 "       memory to be shared between 32- and 64-bit applications. */\n"
922 "#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32\n"
923 "    int32_t ut_session;           /* Session ID (B<getsid>(2)),\n"
924 "                                     used for windowing */\n"
925 "    struct {\n"
926 "        int32_t tv_sec;           /* Seconds */\n"
927 "        int32_t tv_usec;          /* Microseconds */\n"
928 "    } ut_tv;                      /* Time entry was made */\n"
929 "#else\n"
930 "     long   ut_session;           /* Session ID */\n"
931 "     struct timeval ut_tv;        /* Time entry was made */\n"
932 "#endif\n"
933 msgstr ""
934 "struct utmp {\n"
935 "    short   ut_type;              /* Type of record */\n"
936 "    pid_t   ut_pid;               /* PID of login process */\n"
937 "    char    ut_line[UT_LINESIZE]; /* Device name of tty - \"/dev/\" */\n"
938 "    char    ut_id[4];             /* Terminal name suffix,\n"
939 "                                     or inittab(5) ID */\n"
940 "    char    ut_user[UT_NAMESIZE]; /* Username */\n"
941 "    char    ut_host[UT_HOSTSIZE]; /* Hostname for remote login, or\n"
942 "                                     kernel version for run-level\n"
943 "                                     messages */\n"
944 "    struct  exit_status ut_exit;  /* Exit status of a process\n"
945 "                                     marked as DEAD_PROCESS; not\n"
946 "                                     used by Linux init(1) */\n"
947 "    /* ut_session と ut_tv フィールドは、32ビットでコンパイルされた場合と\n"
948 "       64ビットでコンパイルされた場合で同じサイズでなければならない。\n"
949 "       こうすることで、32ビットと64ビットのアプリケーションで、\n"
950 "       データファイルと共有メモリーを共有することができるようになる。 */\n"
951 "#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32\n"
952 "    int32_t ut_session;           /* Session ID (B<getsid>(2)),\n"
953 "                                     used for windowing */\n"
954 "    struct {\n"
955 "        int32_t tv_sec;           /* Seconds */\n"
956 "        int32_t tv_usec;          /* Microseconds */\n"
957 "    } ut_tv;                      /* Time entry was made */\n"
958 "#else\n"
959 "     long   ut_session;           /* Session ID */\n"
960 "     struct timeval ut_tv;        /* Time entry was made */\n"
961 "#endif\n"
962
963 #. type: Plain text
964 #: build/C/man5/utmp.5:122
965 #, no-wrap
966 msgid ""
967 "    int32_t ut_addr_v6[4];        /* Internet address of remote\n"
968 "                                     host; IPv4 address uses\n"
969 "                                     just ut_addr_v6[0] */\n"
970 "    char __unused[20];            /* Reserved for future use */\n"
971 "};\n"
972 msgstr ""
973 "    int32_t ut_addr_v6[4];        /* Internet address of remote\n"
974 "                                     host; IPv4 address uses\n"
975 "                                     just ut_addr_v6[0] */\n"
976 "    char __unused[20];            /* Reserved for future use */\n"
977 "};\n"
978
979 #. type: Plain text
980 #: build/C/man5/utmp.5:130
981 #, no-wrap
982 msgid ""
983 "/* Backward compatibility hacks */\n"
984 "#define ut_name ut_user\n"
985 "#ifndef _NO_UT_TIME\n"
986 "#define ut_time ut_tv.tv_sec\n"
987 "#endif\n"
988 "#define ut_xtime ut_tv.tv_sec\n"
989 "#define ut_addr ut_addr_v6[0]\n"
990 msgstr ""
991 "/* Backward compatibility hacks */\n"
992 "#define ut_name ut_user\n"
993 "#ifndef _NO_UT_TIME\n"
994 "#define ut_time ut_tv.tv_sec\n"
995 "#endif\n"
996 "#define ut_xtime ut_tv.tv_sec\n"
997 "#define ut_addr ut_addr_v6[0]\n"
998
999 #. type: Plain text
1000 #: build/C/man5/utmp.5:140
1001 msgid "This structure gives the name of the special file associated with the user's terminal, the user's login name, and the time of login in the form of B<time>(2).  String fields are terminated by a null byte (\\(aq\\e0\\(aq)  if they are shorter than the size of the field."
1002 msgstr "この構造体からユーザーの使っている端末のスペシャルファイル名、 ユーザーのログイン名、 (B<time>(2)  形式での)ログイン時刻がわかる。文字列フィールドは、 フィールドの長さより文字列が短い場合には、ヌルバイト (\\(aq\\e0\\(aq) によって終端される。"
1003
1004 #. type: Plain text
1005 #: build/C/man5/utmp.5:157
1006 msgid "The first entries ever created result from B<init>(1)  processing B<inittab>(5).  Before an entry is processed, though, B<init>(1)  cleans up utmp by setting I<ut_type> to B<DEAD_PROCESS>, clearing I<ut_user>, I<ut_host>, and I<ut_time> with null bytes for each record which I<ut_type> is not B<DEAD_PROCESS> or B<RUN_LVL> and where no process with PID I<ut_pid> exists.  If no empty record with the needed I<ut_id> can be found, B<init>(1)  creates a new one.  It sets I<ut_id> from the inittab, I<ut_pid> and I<ut_time> to the current values, and I<ut_type> to B<INIT_PROCESS>."
1007 msgstr "最初のエントリーは B<init>(1)  コマンドが B<inittab>(5)  を処理することで作られる。 あるエントリーを処理する前に、 B<init>(1)  は I<ut_type> を B<DEAD_PROCESS> に初期化する。 レコードの I<ut_type> が B<DEAD_PROCESS> と B<RUN_LVL> のいずれでもなく、 かつ PID が I<ut_pid> であるプロセスがいない場合は、I<ut_user>, I<ut_host>, I<ut_time> をヌルバイトでクリアして初期化を行う。 必要な I<ut_id> を持つ空のレコードを見つけられなかった場合、 B<init>(1)  は新しいレコードを作る。inittab から I<ut_id> を設定し、 I<ut_pid> および I<ut_time> を現在値に、 I<ut_type> を B<INIT_PROCESS> に設定する。"
1008
1009 #. type: Plain text
1010 #: build/C/man5/utmp.5:176
1011 msgid "B<mingetty>(8)  (or B<agetty>(8))  locates the entry by the PID, changes I<ut_type> to B<LOGIN_PROCESS>, changes I<ut_time>, sets I<ut_line>, and waits for connection to be established.  B<login>(1), after a user has been authenticated, changes I<ut_type> to B<USER_PROCESS>, changes I<ut_time>, and sets I<ut_host> and I<ut_addr>.  Depending on B<mingetty>(8)  (or B<agetty>(8))  and B<login>(1), records may be located by I<ut_line> instead of the preferable I<ut_pid>."
1012 msgstr "B<mingetty>(8)  (または B<agetty>(8))  は pid でエントリーを特定し、 I<ut_type> を B<LOGIN_PROCESS> に変更し、 I<ut_time> を更新し、I<ut_line>を設定した後、接続が確立されるのを待つ。 B<login>(1)  はユーザー認証が終了すると、 I<ut_type> を B<USER_PROCESS> に変更し、 I<ut_time> を更新し、I<ut_host> と I<ut_addr>を設定する。 B<mingetty>(8)  (または B<agetty>(8))  と B<login>(1)  により異なるが、 I<ut_pid> の代わりに I<ut_line> を使ってレコードの特定が行われることもある (I<ut_pid> を使う方が望ましい) 。"
1013
1014 #. type: Plain text
1015 #: build/C/man5/utmp.5:182
1016 msgid "When B<init>(1)  finds that a process has exited, it locates its utmp entry by I<ut_pid>, sets I<ut_type> to B<DEAD_PROCESS>, and clears I<ut_user>, I<ut_host> and I<ut_time> with null bytes."
1017 msgstr "B<init>(1)  はプロセスの終了を検出した場合、 I<ut_pid> をキーとして utmp のエントリーを特定し、 I<ut_type> を B<DEAD_PROCESS> に設定し、 I<ut_user>, I<ut_host>, I<ut_time> をヌルバイトでクリアする。"
1018
1019 #. type: Plain text
1020 #: build/C/man5/utmp.5:194
1021 msgid "B<xterm>(1)  and other terminal emulators directly create a B<USER_PROCESS> record and generate the I<ut_id> by using the string that suffix part of the terminal name (the characters following I</dev/[pt]ty>).  If they find a B<DEAD_PROCESS> for this ID, they recycle it, otherwise they create a new entry.  If they can, they will mark it as B<DEAD_PROCESS> on exiting and it is advised that they null I<ut_line>, I<ut_time>, I<ut_user>, and I<ut_host> as well."
1022 msgstr "B<xterm>(1)  コマンドや他の端末エミュレータは 直接 B<USER_PROCESS> のレコードを作り、 端末名のサフィックス文字列 (I</dev/[pt]ty> に続く文字列)  を使って I<ut_id> の値を生成する。 この id を持つエントリーが B<DEAD_PROCESS> であった場合には再利用し、 それ以外の場合には新しいエントリーが作られる。 可能な場合にはプロセス終了時に B<DEAD_PROCESS> と設定し、 さらに I<ut_line>, I<ut_time>, I<ut_user>, I<ut_host> をヌルバイトでクリアすることが奨励されている。"
1023
1024 #. type: Plain text
1025 #: build/C/man5/utmp.5:202
1026 msgid "B<telnetd>(8)  sets up a B<LOGIN_PROCESS> entry and leaves the rest to B<login>(1)  as usual.  After the telnet session ends, B<telnetd>(8)  cleans up utmp in the described way."
1027 msgstr "B<telnetd>(8)  は B<LOGIN_PROCESS> を設定するだけでよく、 残りの処理は通常通り B<login>(1)  に任せればよい。 telnet のセッションが終了した後、前述のように B<telnetd>(8)  が utmp のエントリーを初期化する。"
1028
1029 #. type: Plain text
1030 #: build/C/man5/utmp.5:224
1031 msgid "The I<wtmp> file records all logins and logouts.  Its format is exactly like I<utmp> except that a null username indicates a logout on the associated terminal.  Furthermore, the terminal name B<~> with username B<shutdown> or B<reboot> indicates a system shutdown or reboot and the pair of terminal names B<|>/B<}> logs the old/new system time when B<date>(1)  changes it.  I<wtmp> is maintained by B<login>(1), B<init>(1), and some versions of B<getty>(8)  (e.g., B<mingetty>(8)  or B<agetty>(8)).  None of these programs creates the file, so if it is removed, record-keeping is turned off."
1032 msgstr "I<wtmp> ファイルには、すべてのログインとログアウトが記録される。 そのフォーマットは、ログアウト済の端末でユーザー名がヌルとなること以外は I<utmp> とまったく同じである。 ユーザー名が B<shutdown> もしくは B<reboot> である 端末名 B<~> はシステムの停止 (shutdown) または再起動 (reboot)  を意味する。またその端末名が B<|> と B<}> の対は B<date>(1)  コマンドで変更した新/旧のシステム時刻を記録している。 I<wtmp> ファイルは B<login>(1), B<init>(1)  やいくつかのバージョンの B<getty>(8)  (B<mingetty>(8)  または B<agetty>(8))  により管理されている。 これらのプログラムはどれもファイルを新たに作成しないので、 ファイルを削除することで情報の記録 (record-keeping) を止めることができる。"
1033
1034 #. type: Plain text
1035 #: build/C/man5/utmp.5:226
1036 msgid "/var/run/utmp"
1037 msgstr "/var/run/utmp"
1038
1039 #. type: Plain text
1040 #: build/C/man5/utmp.5:228
1041 msgid "/var/log/wtmp"
1042 msgstr "/var/log/wtmp"
1043
1044 #. type: Plain text
1045 #: build/C/man5/utmp.5:247
1046 msgid "POSIX.1 does not specify a I<utmp> structure, but rather one named I<utmpx>, with specifications for the fields I<ut_type>, I<ut_pid>, I<ut_line>, I<ut_id>, I<ut_user>, and I<ut_tv>.  POSIX.1 does not specify the lengths of the I<ut_line> and I<ut_user> fields."
1047 msgstr "POSIX.1 では、 I<utmp> 構造体ではなく、 I<utmpx> 構造体を規定している。 I<utmpx> 構造体で規定されているのは、フィールド I<ut_type>, I<ut_pid>, I<ut_line>, I<ut_id>, I<ut_user>, I<ut_tv> である。 POSIX.1 では、フィールド I<ut_line> と I<ut_user> の長さは規定されていない。"
1048
1049 #. type: Plain text
1050 #: build/C/man5/utmp.5:253
1051 msgid "Linux defines the I<utmpx> structure to be the same as the I<utmp> structure."
1052 msgstr "Linux では、 I<utmpx> 構造体の定義は I<utmp> 構造体と同じである。"
1053
1054 #. type: SS
1055 #: build/C/man5/utmp.5:253
1056 #, no-wrap
1057 msgid "Comparison with historical systems"
1058 msgstr "過去のシステムとの比較"
1059
1060 #. type: Plain text
1061 #: build/C/man5/utmp.5:256
1062 msgid "Linux utmp entries conform neither to v7/BSD nor to System V; they are a mix of the two."
1063 msgstr "Linux での utmp のエントリーは v7/BSD や System V のいずれにも準拠しておらず、 その両方が混在したものである。"
1064
1065 #. type: Plain text
1066 #: build/C/man5/utmp.5:263
1067 msgid "v7/BSD has fewer fields; most importantly it lacks I<ut_type>, which causes native v7/BSD-like programs to display (for example) dead or login entries.  Further, there is no configuration file which allocates slots to sessions.  BSD does so because it lacks I<ut_id> fields."
1068 msgstr "v7/BSD ではより少しの項目しかない; もっとも重要なことは、I<ut_type> が無いことである。 そのため v7/BSD 系のプログラムでは (たとえば) 死んだ状態のエントリーや ログイン状態のエントリーまで表示されてしまうことになった。 さらにセッション用のスロットを割り当てるための設定ファイルがない。 BSD に設定ファイルがあるのは I<ut_id> がないからである。"
1069
1070 #. type: Plain text
1071 #: build/C/man5/utmp.5:275
1072 msgid "In Linux (as in System V), the I<ut_id> field of a record will never change once it has been set, which reserves that slot without needing a configuration file.  Clearing I<ut_id> may result in race conditions leading to corrupted utmp entries and potential security holes.  Clearing the abovementioned fields by filling them with null bytes is not required by System V semantics, but makes it possible to run many programs which assume BSD semantics and which do not modify utmp.  Linux uses the BSD conventions for line contents, as documented above."
1073 msgstr "Linux (System V 系)では、設定ファイルを必要とせず セッション用のスロットを割り当てるので、一旦設定 されてしまうとレコードの I<ut_id> は決して変更されない。 I<ut_id> をクリアすると競合状態におちいり、 utmp のエントリーを壊したり、潜在的なセキュリティホールになる可能性がある。 上述のフィールドをヌルバイトで埋めてクリアしておくのは、 System V での取り決めでは必要とはされていないが、 BSD での取り決めを前提としていて、かつ utmp を更新しない多くのプログラムが 動作するようにするためである。 Linux ではここまで記述してきたように、行内容の表示は BSD の慣例に従っている。"
1074
1075 #.  mtk: What is the referrent of "them" in the following sentence?
1076 #.  System V only uses the type field to mark them and logs
1077 #.  informative messages such as \fB"new time"\fP in the line field.
1078 #. type: Plain text
1079 #: build/C/man5/utmp.5:280
1080 msgid "System V has no I<ut_host> or I<ut_addr_v6> fields."
1081 msgstr "B<UT_UNKNOWN> は Linux で作られたもののようである。 System V には I<ut_host> も I<ut_addr_v6> も存在しない。"
1082
1083 #. type: Plain text
1084 #: build/C/man5/utmp.5:288
1085 msgid "Unlike various other systems, where utmp logging can be disabled by removing the file, utmp must always exist on Linux.  If you want to disable B<who>(1), then do not make utmp world readable."
1086 msgstr "ファイルを削除することで utmp への記録を止められる 他の様々なシステムとは違い、Linux では utmp ファイルを必ずおいて おく必要がある。 B<who>(1)  コマンドが機能しないようにしたい場合には、 utmp ファイルの全ユーザーに対する読み取り許可を設定しないようにする。"
1087
1088 #. type: Plain text
1089 #: build/C/man5/utmp.5:291
1090 msgid "The file format is machine-dependent, so it is recommended that it be processed only on the machine architecture where it was created."
1091 msgstr "ファイルのフォーマットはマシンに依存するので、ファイルが作られた マシンもしくは同一アーキテクチャーのマシン上でのみ処理することを推奨する。"
1092
1093 #. type: Plain text
1094 #: build/C/man5/utmp.5:312
1095 msgid "Note that on I<biarch> platforms, that is, systems which can run both 32-bit and 64-bit applications (x86-64, ppc64, s390x, etc.), I<ut_tv> is the same size in 32-bit mode as in 64-bit mode.  The same goes for I<ut_session> and I<ut_time> if they are present.  This allows data files and shared memory to be shared between 32-bit and 64-bit applications.  This is achieved by changing the type of I<ut_session> to I<int32_t>, and that of I<ut_tv> to a struct with two I<int32_t> fields I<tv_sec> and I<tv_usec>.  Since I<ut_tv> may not be the same as I<struct timeval>, then instead of the call:"
1096 msgstr "注意すべき点としては、 I<biarch> なプラットフォーム、つまり 32ビットと 64ビットの両方の アプリケーションを実行できるシステム (x86-64, ppc64, s390x など) では、 I<ut_tv> のサイズは 32ビットモードと 64ビットモードで同じである。 I<ut_session> と I<ut_time> も、存在する場合には同様に同じサイズ である。これにより、32ビットアプリケーションと 64ビットアプリケーション の間でデータファイルと共有メモリーを共有することが可能になる。 そのためには、 I<ut_session> を I<int32_t> 型に、 I<ut_tv> を 2つの I<int32_t> 型のフィールド I<tv_sec>, I<tv_usec> を持つ構造体に変更すればよい I<ut_tv> は I<struct timeval> と同じサイズとは限らないので、"
1097
1098 #. type: Plain text
1099 #: build/C/man5/utmp.5:316
1100 #, no-wrap
1101 msgid "gettimeofday((struct timeval *) &ut.ut_tv, NULL);\n"
1102 msgstr "gettimeofday((struct timeval *) &ut.ut_tv, NULL);\n"
1103
1104 #. type: Plain text
1105 #: build/C/man5/utmp.5:320
1106 msgid "the following method of setting this field is recommended:"
1107 msgstr "のような呼び出しをするのではなく、 以下のように各フィールドを設定する方法が推奨される:"
1108
1109 #. type: Plain text
1110 #: build/C/man5/utmp.5:325
1111 #, no-wrap
1112 msgid ""
1113 "struct utmp ut;\n"
1114 "struct timeval tv;\n"
1115 msgstr ""
1116 "struct utmp ut;\n"
1117 "struct timeval tv;\n"
1118
1119 #. type: Plain text
1120 #: build/C/man5/utmp.5:329
1121 #, no-wrap
1122 msgid ""
1123 "gettimeofday(&tv, NULL);\n"
1124 "ut.ut_tv.tv_sec = tv.tv_sec;\n"
1125 "ut.ut_tv.tv_usec = tv.tv_usec;\n"
1126 msgstr ""
1127 "gettimeofday(&tv, NULL);\n"
1128 "ut.ut_tv.tv_sec = tv.tv_sec;\n"
1129 "ut.ut_tv.tv_usec = tv.tv_usec;\n"
1130
1131 #. type: Plain text
1132 #: build/C/man5/utmp.5:352
1133 msgid "B<ac>(1), B<date>(1), B<last>(1), B<login>(1), B<utmpdump>(1), B<who>(1), B<getutent>(3), B<getutmp>(3), B<login>(3), B<logout>(3), B<logwtmp>(3), B<updwtmp>(3), B<init>(1)"
1134 msgstr "B<ac>(1), B<date>(1), B<last>(1), B<login>(1), B<utmpdump>(1), B<who>(1), B<getutent>(3), B<getutmp>(3), B<login>(3), B<logout>(3), B<logwtmp>(3), B<updwtmp>(3), B<init>(1)"