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(4). In addition, the definition of the prpriv_t structure is described in proc(4).
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(4).
The Psetpriv() function will fail if:
 
 
P doesn't refer to an active process, but a core file, zombie, or a file.

Uncommitted

See LOCKING in libproc(3LIB).

libproc(3LIB), Ppriv(3PROC), proc(4), privileges(5)
May 11, 2016 illumos