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(4).
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.
Uncommitted
See
LOCKING in
libproc(3LIB).
libproc(3LIB),
proc(4),
privileges(5)