1 PSETPRIV(3PROC)        Process Control Library Functions       PSETPRIV(3PROC)
   2 
   3 NAME
   4      Psetpriv - set process privileges
   5 
   6 LIBRARY
   7      Process Control Library (libproc, -lproc)
   8 
   9 SYNOPSIS
  10      #include <libproc.h>
  11 
  12      int
  13      Psetpriv(struct ps_prochandle *P, prpriv_t *pprv);
  14 
  15 DESCRIPTION
  16      The Psetpriv() function updates the privileges of the process handle P to
  17      the set described by pprv.  The updated privilege set has restrictions on
  18      what it may change for a process which are documented in the PCSPRIV
  19      section of proc(4).  In addition, the definition of the prpriv_t
  20      structure is described in proc(4).
  21 
  22      The current privilege set for the process may be obtained through a call
  23      to Ppriv(3PROC).
  24 
  25      Note, the privilege set may only be updated for active processes.
  26      Process handles which correspond to core files, zombie processes, and
  27      files, may not have their privilege sets updated.
  28 
  29 RETURN VALUES
  30      Upon successful completion, the Psetpriv() function returns 0 and updates
  31      the privilege sets of the process.  Otherwise, -1 is returned and errno
  32      is set to indicate the error.
  33 
  34 ERRORS
  35      For a full list of possible errors see the DIAGNOSTICS section in
  36      proc(4).
  37 
  38      The Psetpriv() function will fail if:
  39 
  40      EBADF              P doesn't refer to an active process, but a core file,
  41                         zombie, or a file.
  42 
  43 INTERFACE STABILITY
  44      Uncommitted
  45 
  46 MT-LEVEL
  47      See LOCKING in libproc(3LIB).
  48 
  49 SEE ALSO
  50      libproc(3LIB), Ppriv(3PROC), proc(4), privileges(5)
  51 
  52 illumos                          May 11, 2016                          illumos