Commit | Line | Data |
---|---|---|
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 | |
11 | pwcache \- cache password and group entries | |
12 | .SH SYNOPSIS | |
13 | .ft B | |
14 | .nf | |
de714f9f | 15 | user_from_uid(uid, nouser) |
aac98ecd | 16 | uid_t uid; |
de714f9f | 17 | int nouser; |
aac98ecd | 18 | |
de714f9f | 19 | group_from_gid(gid, nogroup) |
aac98ecd | 20 | gid_t gid; |
de714f9f | 21 | int nogroup; |
aac98ecd KB |
22 | .fi |
23 | .ft R | |
24 | .SH DESCRIPTION | |
25 | .ft B | |
26 | This interface is not part of the C library. | |
27 | It has been placed in the Berkeley utility library, libutil, as it is | |
28 | used by several standard utilities. | |
29 | .ft R | |
30 | .PP | |
31 | The | |
32 | .I user_from_uid | |
33 | function returns the user name associated with the argument uid. | |
34 | The user name is cached so that multiple calls with the same uid | |
35 | do not require additional calls to | |
36 | .IR getpwuid (3). | |
de714f9f KB |
37 | If there is no user associated with the uid, a pointer is returned |
38 | to an ASCII representation of the uid, unless the argument | |
39 | .I nouser | |
40 | is non-zero, in which case a NULL pointer is returned. | |
aac98ecd KB |
41 | .PP |
42 | The | |
43 | .I group_from_gid | |
44 | function returns the group name associated with the argument gid. | |
45 | The group name is cached so that multiple calls with the same gid | |
46 | do not require additional calls to | |
47 | .IR getgrgid (3). | |
de714f9f KB |
48 | If there is no group associated with the gid, a pointer is returned |
49 | to an ASCII representation of the gid, unless the argument | |
50 | .I nogroup | |
51 | is non-zero, in which case a NULL pointer is returned. | |
aac98ecd KB |
52 | .SH SEE ALSO |
53 | getgrgid(3), getpwuid(3) |