PPRIV(3PROC) | Process Control Library Functions | PPRIV(3PROC) |
Ppriv
, Ppriv_free
— get and free process privilege sets
Process Control Library (libproc, -lproc)
#include
<libproc.h>
int
Ppriv
(struct ps_prochandle *P,
prpriv_t **pprv);
void
Ppriv_free
(struct ps_prochandle
*P, prpriv_t *prv);
The
Ppriv
()
function obtains the privilege set of the process handle
P. The privilege set, if it exists, will be
dynamically allocated and a pointer to it will be placed in
pprv. It must be released with a call to
Ppriv_free
(). The definition of the
prpriv_t
structure is documented in proc(5).
The
Ppriv_free
()
function releases the storage in prv that was
allocated as a result of calling Ppriv
().
Upon successful completion, the Ppriv
()
function returns
0 and
pprv is updated with a pointer to the allocated
privilege set. Otherwise,
-1 is returned
and pprv is not updated.
See LOCKING in libproc(3LIB).
May 11, 2016 | OmniOS |