Commit | Line | Data |
---|---|---|
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 | 19 | The |
ae59e04c CL |
20 | .Fn user_from_uid |
21 | function returns the user name associated with the argument | |
22 | .Fa uid . | |
23 | The user name is cached so that multiple calls with the same | |
24 | .Fa uid | |
aac98ecd | 25 | do not require additional calls to |
ae59e04c CL |
26 | .Xr getpwuid 3 . |
27 | If there is no user associated with the | |
28 | .Fa uid , | |
29 | a pointer is returned | |
ad4e97f3 | 30 | to a string representation of the |
ae59e04c CL |
31 | .Fa uid , |
32 | unless the argument | |
33 | .Fa nouser | |
34 | is non-zero, in which case a | |
35 | .Dv NULL | |
36 | pointer is returned. | |
37 | .Pp | |
aac98ecd | 38 | The |
ae59e04c CL |
39 | .Fn group_from_gid |
40 | function returns the group name associated with the argument | |
41 | .Fa gid . | |
42 | The group name is cached so that multiple calls with the same | |
43 | .Fa gid | |
aac98ecd | 44 | do not require additional calls to |
ae59e04c CL |
45 | .Xr getgrgid 3 . |
46 | If there is no group associated with the | |
47 | .Fa gid , | |
48 | a pointer is returned | |
ad4e97f3 | 49 | to a string representation of the |
ae59e04c CL |
50 | .Fa gid , |
51 | unless the argument | |
52 | .Fa nogroup | |
53 | is non-zero, in which case a | |
54 | .Dv NULL | |
55 | pointer is returned. | |
56 | .Sh SEE ALSO | |
57 | .Xr getgrgid 3 , | |
58 | .Xr getpwuid 3 | |
59 | .Sh HISTORY | |
60 | The | |
61 | .Fn user_from_id | |
62 | and | |
63 | .Fn group_from_id | |
64 | functions are | |
65 | .Ud . |