__ goes away
[unix-history] / usr / src / lib / libc / gen / pwcache.3
CommitLineData
ae59e04c 1.\" Copyright (c) 1989, 1991 The Regents of the University of California.
aac98ecd
KB
2.\" All rights reserved.
3.\"
91cff1e1 4.\" %sccs.include.redist.man%
aac98ecd 5.\"
ad4e97f3 6.\" @(#)pwcache.3 5.5 (Berkeley) %G%
aac98ecd 7.\"
ae59e04c
CL
8.Dd
9.Dt PWCACHE 3
10.Os
11.Sh NAME
12.Nm pwcache
13.Nd cache password and group entries
14.Sh SYNOPSIS
15.Fn user_from_uid "uid_t uid" "int nouser"
16.Fn group_from_gid "gid_t gid" "int nogroup"
17.Sh DESCRIPTION
ae59e04c 18.Pp
aac98ecd 19The
ae59e04c
CL
20.Fn user_from_uid
21function returns the user name associated with the argument
22.Fa uid .
23The user name is cached so that multiple calls with the same
24.Fa uid
aac98ecd 25do not require additional calls to
ae59e04c
CL
26.Xr getpwuid 3 .
27If there is no user associated with the
28.Fa uid ,
29a pointer is returned
ad4e97f3 30to a string representation of the
ae59e04c
CL
31.Fa uid ,
32unless the argument
33.Fa nouser
34is non-zero, in which case a
35.Dv NULL
36pointer is returned.
37.Pp
aac98ecd 38The
ae59e04c
CL
39.Fn group_from_gid
40function returns the group name associated with the argument
41.Fa gid .
42The group name is cached so that multiple calls with the same
43.Fa gid
aac98ecd 44do not require additional calls to
ae59e04c
CL
45.Xr getgrgid 3 .
46If there is no group associated with the
47.Fa gid ,
48a pointer is returned
ad4e97f3 49to a string representation of the
ae59e04c
CL
50.Fa gid ,
51unless the argument
52.Fa nogroup
53is non-zero, in which case a
54.Dv NULL
55pointer is returned.
56.Sh SEE ALSO
57.Xr getgrgid 3 ,
58.Xr getpwuid 3
59.Sh HISTORY
60The
61.Fn user_from_id
62and
63.Fn group_from_id
64functions are
65.Ud .