xref: /csrg-svn/lib/libc/gen/pwcache.3 (revision 62879)
1*62879Sbostic.\" Copyright (c) 1989, 1991, 1993
2*62879Sbostic.\"	The Regents of the University of California.  All rights reserved.
340264Sbostic.\"
443566Strent.\" %sccs.include.redist.man%
540264Sbostic.\"
6*62879Sbostic.\"     @(#)pwcache.3	8.1 (Berkeley) 06/09/93
740264Sbostic.\"
848349Scael.Dd
948349Scael.Dt PWCACHE 3
1048349Scael.Os
1148349Scael.Sh NAME
1248349Scael.Nm pwcache
1348349Scael.Nd cache password and group entries
1448349Scael.Sh SYNOPSIS
1548349Scael.Fn user_from_uid "uid_t uid" "int nouser"
1648349Scael.Fn group_from_gid "gid_t gid" "int nogroup"
1748349Scael.Sh DESCRIPTION
1848349Scael.Pp
1940264SbosticThe
2048349Scael.Fn user_from_uid
2148349Scaelfunction returns the user name associated with the argument
2248349Scael.Fa uid .
2348349ScaelThe user name is cached so that multiple calls with the same
2448349Scael.Fa uid
2540264Sbosticdo not require additional calls to
2648349Scael.Xr getpwuid 3 .
2748349ScaelIf there is no user associated with the
2848349Scael.Fa uid ,
2948349Scaela pointer is returned
3059427Sbosticto a string representation of the
3148349Scael.Fa uid ,
3248349Scaelunless the argument
3348349Scael.Fa nouser
3448349Scaelis non-zero, in which case a
3548349Scael.Dv NULL
3648349Scaelpointer is returned.
3748349Scael.Pp
3840264SbosticThe
3948349Scael.Fn group_from_gid
4048349Scaelfunction returns the group name associated with the argument
4148349Scael.Fa gid .
4248349ScaelThe group name is cached so that multiple calls with the same
4348349Scael.Fa gid
4440264Sbosticdo not require additional calls to
4548349Scael.Xr getgrgid 3 .
4648349ScaelIf there is no group associated with the
4748349Scael.Fa gid ,
4848349Scaela pointer is returned
4959427Sbosticto a string representation of the
5048349Scael.Fa gid ,
5148349Scaelunless the argument
5248349Scael.Fa nogroup
5348349Scaelis non-zero, in which case a
5448349Scael.Dv NULL
5548349Scaelpointer is returned.
5648349Scael.Sh SEE ALSO
5748349Scael.Xr getgrgid 3 ,
5848349Scael.Xr getpwuid 3
5948349Scael.Sh HISTORY
6048349ScaelThe
6148349Scael.Fn user_from_id
6248349Scaeland
6348349Scael.Fn group_from_id
6462878Sbosticfunctions first appeared in 4.4BSD.
65