PSETPRIV(3PROC) Process Control Library Functions PSETPRIV(3PROC)

NAME


Psetpriv - set process privileges

LIBRARY


Process Control Library (libproc, -lproc)

SYNOPSIS


#include <libproc.h>

int
Psetpriv(struct ps_prochandle *P, prpriv_t *pprv);

DESCRIPTION


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.

RETURN VALUES


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.

ERRORS


For a full list of possible errors see the DIAGNOSTICS section in
proc(5).

The Psetpriv() function will fail if:

EBADF P doesn't refer to an active process, but a core
file, zombie, or a file.

INTERFACE STABILITY


Uncommitted

MT-LEVEL
See LOCKING in libproc(3LIB).

SEE ALSO


libproc(3LIB), Ppriv(3PROC), proc(5), privileges(7)

illumos May 11, 2016 illumos

tribblix@gmail.com :: GitHub :: Privacy