doc/ja_JP.eucJP/man/man3/cuserid.3
Kazuo Horikawa cb5d1a9147 Replace jpman project specific RCS keyword with $FreeBSD.
jpman project specific RCS keyword (jpman %Id) is obsolete,
after manual entries are stored in freefall CVS repository.
This old Id is useless and more worse it confuses users and bug reporters.
So, this old Id is removed.

Submitted by:jpman project <man-jp@jp.FreeBSD.org>
2001-05-14 01:10:24 +00:00

89 lines
2.7 KiB
Groff

.\"
.\" Copyright (c) 1995 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.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by Joerg Wunsch
.\" 4. The name of the developer may not be used to endorse or promote
.\" products derived from this software without specific prior written
.\" permission.
.\"
.\" 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.
.\"
.\" %Id: cuserid.3,v 1.5 1997/02/22 15:06:05 peter Exp %
.\"
.\" $FreeBSD$
.Dd April 10, 1995
.Os
.Dt CUSERID 3
.Sh 名称
.Nm cuserid
.Nd 有効な UID に対応するユーザ名を得る
.Sh 書式
.Fd #include <stdio.h>
.Ft char *
.Fn cuserid "char *s"
.Sh 解説
.Bf -symbolic
.Nm cuserid
関数は
getpwuid
によって旧式なものになりました。
.br
これは互換性ライブラリ
libcompat
で利用できます。
.Ef
.Pp
関数
.Nm cuserid
は、現在のプロセスの有効な
UID
に対応するユーザ名を取得します。引数
.Fa s
がゼロでない場合、名前は、それが指しているバッファに
コピーされ、そのアドレスが返されます。このバッファは少なくとも
.Em L_cuserid
キャラクタ用の空間を準備する必要があります。この定数は
.Pa Aq stdio.h
内に
定義されます。
.Pp
.Fa s
がゼロの場合、内部配列が使用され、そのアドレスが返されます。
.Pp
.Sh 戻り値
.Nm cuserid
は、名前が保存された配列のアドレスを返します。
.Pp
現在のプロセスの有効な
UID
に対応する名前が見つからない場合は、NULL ポインタが返されるか、または
.Po
s がゼロでない場合
.Pc
バッファ
.Fa s
が NULL ストリングで埋められるかのどちらかです。
.Sh 関連項目
.Xr geteuid 2 ,
.Xr getpwuid 3