flag fields are u_int's
[unix-history] / usr / src / lib / libc / gen / pwcache.3
CommitLineData
aac98ecd
KB
1.\" Copyright (c) 1989 The Regents of the University of California.
2.\" All rights reserved.
3.\"
91cff1e1 4.\" %sccs.include.redist.man%
aac98ecd 5.\"
91cff1e1 6.\" @(#)pwcache.3 5.3 (Berkeley) %G%
aac98ecd
KB
7.\"
8.TH PWCACHE 3 ""
9.UC 7
10.SH NAME
11pwcache \- cache password and group entries
12.SH SYNOPSIS
13.ft B
14.nf
de714f9f 15user_from_uid(uid, nouser)
aac98ecd 16uid_t uid;
de714f9f 17int nouser;
aac98ecd 18
de714f9f 19group_from_gid(gid, nogroup)
aac98ecd 20gid_t gid;
de714f9f 21int nogroup;
aac98ecd
KB
22.fi
23.ft R
24.SH DESCRIPTION
25.ft B
26This interface is not part of the C library.
27It has been placed in the Berkeley utility library, libutil, as it is
28used by several standard utilities.
29.ft R
30.PP
31The
32.I user_from_uid
33function returns the user name associated with the argument uid.
34The user name is cached so that multiple calls with the same uid
35do not require additional calls to
36.IR getpwuid (3).
de714f9f
KB
37If there is no user associated with the uid, a pointer is returned
38to an ASCII representation of the uid, unless the argument
39.I nouser
40is non-zero, in which case a NULL pointer is returned.
aac98ecd
KB
41.PP
42The
43.I group_from_gid
44function returns the group name associated with the argument gid.
45The group name is cached so that multiple calls with the same gid
46do not require additional calls to
47.IR getgrgid (3).
de714f9f
KB
48If there is no group associated with the gid, a pointer is returned
49to an ASCII representation of the gid, unless the argument
50.I nogroup
51is non-zero, in which case a NULL pointer is returned.
aac98ecd
KB
52.SH SEE ALSO
53getgrgid(3), getpwuid(3)