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.man.txt
+++ new/usr/src/man/man3proc/Pcred.3proc.man.txt
1 1 PCRED(3PROC) Process Control Library Functions PCRED(3PROC)
2 2
3 3 NAME
4 4 Pcred - obtain process credentials
5 5
6 -SYNOPSIS
6 +LIBRARY
7 7 Process Control Library (libproc, -lproc)
8 +
9 +SYNOPSIS
8 10 #include <libproc.h>
9 11
10 12 int
11 13 Pcred(struct ps_prochandle *P, prcred_t *pcrp, int ngroups);
12 14
13 15 DESCRIPTION
14 16 The Pcred() function obtains the credentials of the process from the
15 17 handle P.
16 18
17 19 The credentials are read into the buffer pointed to by pcrp. The
18 20 prcred_t type is defined in proc(4). It contains information about the
19 21 current effective, saved, and real user and group IDs. It also allows
20 22 for supplemental groups to be obtained. The Pcred() function will read a
21 23 number of supplemental groups based on the value of ngroups. The
22 24 prcred_t structure only contains the space for one supplemental group by
23 25 default. Callers should ensure that the buffer pointed to by pcrp
24 26 contains enough space to include all of the required supplemental groups
25 27 that are desired.
26 28
27 29 Not all process handles have credential information available to them.
28 30 For example, the handles that come from Pgrab_file(3PROC) have no
29 31 processes associated with them and thus have no credentials associated
30 32 with them.
31 33
32 34 RETURN VALUES
33 35 Upon successful completion, the Pcred() function returns 0 and updates
34 36 the memory at pcrp with the credentials. Otherwise, -1 is returned to
35 37 indicate an error.
36 38
37 39 INTERFACE STABILITY
38 40 Uncommitted
39 41
40 42 MT-LEVEL
41 43 See LOCKING in libproc(3LIB).
42 44
43 45 SEE ALSO
44 46 libproc(3LIB), Psetcred(3PROC), proc(4)
45 47
46 48 illumos May 11, 2016 illumos
↓ open down ↓ |
29 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX