6a00dc5ed2
Submitted by: Yuko Sasaki <yuko@veltec.co.jp>
71 lines
2.2 KiB
Groff
71 lines
2.2 KiB
Groff
.\"
|
|
.\" Copyright (c) 1996 Joerg Wunsch
|
|
.\"
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
.\"
|
|
.\" %FreeBSD: src/lib/libutil/logwtmp.3,v 1.7.2.4 2001/12/17 10:08:32 ru Exp %
|
|
.\" $FreeBSD$
|
|
.\" "
|
|
.Dd December 29, 1996
|
|
.Os
|
|
.Dt LOGWTMP 3
|
|
.Sh 名称
|
|
.Nm logwtmp
|
|
.Nd wtmp ファイルに新規レコードを追加
|
|
.Sh ライブラリ
|
|
.Lb libutil
|
|
.Sh 書式
|
|
.In sys/types.h
|
|
.In libutil.h
|
|
.Ft void
|
|
.Fn logwtmp "const char *line" "const char *name" "const char *host"
|
|
.Sh 解説
|
|
.Fn logwtmp
|
|
は、
|
|
.Xr wtmp 5
|
|
ファイルに新規レコードの追加します。
|
|
引数は、
|
|
.Ar line ,
|
|
.Ar name ,
|
|
.Ar host
|
|
及び現在時間を与えます。
|
|
.Pp
|
|
.Ar host
|
|
で指定するホスト名の長さが
|
|
.Xr wtmp 5
|
|
ファイルのホスト名フィールドと合わない場合、最初は、
|
|
.Xr gethostbyname 3
|
|
により数値の IP アドレスに変換しようとします。
|
|
これに失敗した場合、ホスト名は
|
|
.Qq invalid hostname
|
|
(不正ホスト名) として記録されます。
|
|
.Pp
|
|
呼び出しプロセスは、
|
|
.Xr wtmp 5
|
|
ファイルに対し、読み込み、書き込みの両方の権限を持っている必要があります。
|
|
.Sh 戻り値
|
|
なし。
|
|
.Sh 関連項目
|
|
.Xr gethostbyname 3 ,
|
|
.Xr login 3 ,
|
|
.Xr wtmp 5
|