doc/documentation/manual-pages/ja/man3/cuserid.3
Sergio Carlavilla Delgado 989d921f5d Migrate doc to Hugo/AsciiDoctor
I'm very pleased to announce the release of
our new website and documentation using
the new toolchain with Hugo and AsciiDoctor.

To get more information about the new toolchain
please read the FreeBSD Documentation Project Primer[1],
Hugo docs[2] and AsciiDoctor docs[3].

Acknowledgment:
Benedict Reuschling <bcr@>
Glen Barber <gjb@>
Hiroki Sato <hrs@>
Li-Wen Hsu <lwhsu@>
Sean Chittenden <seanc@>
The FreeBSD Foundation

[1] https://docs.FreeBSD.org/en/books/fdp-primer/
[2] https://gohugo.io/documentation/
[3] https://docs.asciidoctor.org/home/

Approved by:    doceng, core
2021-01-26 00:31:29 +01:00

84 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.
.\"
.\" %FreeBSD: src/lib/libcompat/4.4/cuserid.3,v 1.8.2.6 2001/12/17 10:08:29 ru Exp %
.\"
.\" $FreeBSD$
.Dd April 10, 1995
.Os
.Dt CUSERID 3
.Sh 名称
.Nm cuserid
.Nd 有効な UID に対応するユーザ名を得る
.Sh ライブラリ
.Lb libcompat
.Sh 書式
.In stdio.h
.Ft char *
.Fn cuserid "char *s"
.Sh 解説
.Bf -symbolic
.Fn cuserid
関数は
.Xr getpwuid 3
によって旧式なものになりました。
.Ef
.Pp
関数
.Fn cuserid
は、現在のプロセスの有効な
UID
に対応するユーザ名を取得します。引数
.Fa s
が NULL でない場合、名前は、それが指しているバッファに
コピーされ、そのアドレスが返されます。このバッファは少なくとも
.Em L_cuserid
キャラクタ用の空間を準備する必要があります。
L_cuuserid 定数は
.Aq Pa stdio.h
内に定義されます。
.Pp
.Fa s
が NULL の場合、内部配列が使用され、そのアドレスが返されます。
.Sh 戻り値
.Fn cuserid
は、名前が保存された配列のアドレスを返します。
.Pp
現在のプロセスの有効な
UID
に対応する名前が見つからない場合は、NULL ポインタが返されるか、または
(s が NULL でない場合)
バッファ
.Fa s
がヌルストリングで埋められるかのどちらかです。
.Sh 関連項目
.Xr geteuid 2 ,
.Xr getpwuid 3