Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3proc/Pcred.3proc
+++ new/usr/src/man/man3proc/Pcred.3proc
1 1 .\"
2 2 .\" This file and its contents are supplied under the terms of the
3 3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 4 .\" You may only use this file in accordance with the terms of version
5 5 .\" 1.0 of the CDDL.
6 6 .\"
7 7 .\" A full copy of the text of the CDDL should have accompanied this
8 8 .\" source. A copy of the CDDL is also available via the Internet at
9 9 .\" http://www.illumos.org/license/CDDL.
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
10 10 .\"
11 11 .\"
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt PCRED 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Pcred
19 19 .Nd obtain process credentials
20 -.Sh SYNOPSIS
20 +.Sh LIBRARY
21 21 .Lb libproc
22 +.Sh SYNOPSIS
22 23 .In libproc.h
23 24 .Ft int
24 25 .Fo Pcred
25 26 .Fa "struct ps_prochandle *P"
26 27 .Fa "prcred_t *pcrp"
27 28 .Fa "int ngroups"
28 29 .Fc
29 30 .Sh DESCRIPTION
30 31 The
31 32 .Fn Pcred
32 33 function obtains the credentials of the process from the handle
33 34 .Fa P .
34 35 .Pp
35 36 The credentials are read into the buffer pointed to by
36 37 .Fa pcrp .
37 38 The
38 39 .Sy prcred_t
39 40 type is defined in
40 41 .Xr proc 4 .
41 42 It contains information about the current effective, saved, and real
42 43 user and group IDs.
43 44 It also allows for supplemental groups to be obtained.
44 45 The
45 46 .Fn Pcred
46 47 function will read a number of supplemental groups based on the value of
47 48 .Fa ngroups .
48 49 The
49 50 .Sy prcred_t
50 51 structure only contains the space for one supplemental group by default.
51 52 Callers should ensure that the buffer pointed to by
52 53 .Fa pcrp
53 54 contains enough space to include all of the required supplemental
54 55 groups that are desired.
55 56 .Pp
56 57 Not all process handles have credential information available to them.
57 58 For example, the handles that come from
58 59 .Xr Pgrab_file 3PROC
59 60 have no processes associated with them and thus have no credentials
60 61 associated with them.
61 62 .Sh RETURN VALUES
62 63 Upon successful completion, the
63 64 .Fn Pcred
64 65 function returns
65 66 .Sy 0
66 67 and updates the memory at
67 68 .Fa pcrp
68 69 with the credentials.
69 70 Otherwise,
70 71 .Sy -1
71 72 is returned to indicate an error.
72 73 .Sh INTERFACE STABILITY
73 74 .Sy Uncommitted
74 75 .Sh MT-LEVEL
75 76 See
76 77 .Sy LOCKING
77 78 in
78 79 .Xr libproc 3LIB .
79 80 .Sh SEE ALSO
80 81 .Xr libproc 3LIB ,
81 82 .Xr Psetcred 3PROC ,
82 83 .Xr proc 4
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX