PSETPRIV(3PROC) | Process Control Library Functions | PSETPRIV(3PROC) |
Psetpriv
— set
process privileges
Process Control Library (libproc, -lproc)
#include
<libproc.h>
int
Psetpriv
(struct ps_prochandle
*P, prpriv_t *pprv);
The
Psetpriv
()
function updates the privileges of the process handle
P to the set described by pprv.
The updated privilege set has restrictions on what it may change for a
process which are documented in the
PCSPRIV
section of proc(5). In addition, the
definition of the
prpriv_t
structure is described in proc(5).
The current privilege set for the process may be obtained through a call to Ppriv(3PROC).
Note, the privilege set may only be updated for active processes. Process handles which correspond to core files, zombie processes, and files, may not have their privilege sets updated.
Upon successful completion, the Psetpriv
()
function returns
0 and updates
the privilege sets of the process. Otherwise,
-1 is returned
and
errno is
set to indicate the error.
For a full list of possible errors see the DIAGNOSTICS section in proc(5).
The Psetpriv
() function will fail if:
EBADF
See LOCKING in libproc(3LIB).
May 11, 2016 | OmniOS |