OSDN Git Service

8319c6d9814465d0e071e4d75975abbf4d2d8c46
[linuxjm/LDP_man-pages.git] / release / man3 / updwtmp.3
1 .\" Copyright 1997 Nicolás Lichtmaier <nick@debian.org>
2 .\" Created Wed Jul  2 23:27:34 ART 1997
3 .\"
4 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, see
22 .\" <http://www.gnu.org/licenses/>.
23 .\" %%%LICENSE_END
24 .\"
25 .\" Added info on availability, aeb, 971207
26 .\" Added -lutil remark, 030718
27 .\" 2008-07-02, mtk, document updwtmpx()
28 .\"
29 .\"*******************************************************************
30 .\"
31 .\" This file was generated with po4a. Translate the source file.
32 .\"
33 .\"*******************************************************************
34 .TH UPDWTMP 3 2008\-07\-02 GNU "Linux Programmer's Manual"
35 .SH 名前
36 updwtmp, logwtmp \- wtmp ファイルにエントリを追加する
37 .SH 書式
38 .nf
39 \fB#include <utmp.h>\fP
40 .sp
41 \fBvoid updwtmp(const char *\fP\fIwtmp_file\fP\fB, const struct utmp *\fP\fIut\fP\fB);\fP
42 .br
43 \fBvoid logwtmp(const char *\fP\fIline\fP\fB, const char *\fP\fIname\fP\fB, const char *\fP\fIhost\fP\fB);\fP
44 .fi
45 .SH 説明
46 \fBupdwtmp\fP()  は、utmp 構造体 \fIut\fP を wtmp ファイルに追加する。
47 .PP
48 \fBlogwtmp\fP()  は、 \fIline\fP, \fIname\fP, \fIhost\fP, 現在時刻、現プロセスID から utmp 構造体を作り、
49 \fBupdwtmp\fP()  を呼び出してその構造体を wtmp ファイルに追加する。
50 .SH ファイル
51 .TP 
52 \fI/var/log/wtmp\fP
53 ユーザログインの履歴データベース
54 .SH 準拠
55 POSIX.1\-2001 にはない。 Solaris, NetBSD に存在し、おそらく他のシステムにもあるだろう。
56 .SH 利用可能な環境
57 glibc2 の下ではどちらの関数も利用可能である。 libc5 の下ではどちらも使えないが、 \fBlogwtmp\fP()  は古い libbsd
58 にあった。 最近では、 \fBlogwtmp\fP()  関数は libutil に含まれている
59 (したがって、この関数を使うためにはコンパイラのコマンドラインに \fI\-lutil\fP を追加する必要がある)。
60 .SH 注意
61 他の "utmpx" 関数群 (\fBgetutxent\fP(3)  参照) との一貫性のために、glibc (バージョン 2.1 以降) は以下の関数を
62 提供している:
63 .nf
64 .sp
65 \fB#include <utmpx.h>\fP
66 .sp
67 \fBvoid updwtmpx (const char *\fP\fIwtmpx_file\fP\fB, const struct utmpx *\fP\fIutx\fP\fB);\fP
68 .fi
69 .PP
70 この関数は \fBupdwtmp\fP()  と同じ作業を行うが、最後の引き数として \fIutmpx\fP 構造体を取るところが異なる。
71 .SH 関連項目
72 \fBgetutxent\fP(3), \fBwtmp\fP(5)
73 .SH この文書について
74 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
75 である。プロジェクトの説明とバグ報告に関する情報は
76 http://www.kernel.org/doc/man\-pages/ に書かれている。