1 PSETCRED(3PROC)        Process Control Library Functions       PSETCRED(3PROC)
   2 
   3 NAME
   4      Psetcred - set process credentials
   5 
   6 LIBRARY
   7      Process Control Library (libproc, -lproc)
   8 
   9 SYNOPSIS
  10      #include <libproc.h>
  11 
  12      int
  13      Psetcred(struct ps_prochandle *P, const prcred_t *credp);
  14 
  15 DESCRIPTION
  16      The Psetcred() function updates the credentials of the process handle P
  17      to the values set in credp.  credp must be fully initialized.  The
  18      definition of the prcred_t structure may be found in proc(4).
  19 
  20      Note, the credentials may only be updated for an active process.  If the
  21      process handle refers to a zombie process, core file, or a file, then
  22      Psetcred() will fail.
  23 
  24 RETURN VALUES
  25      Upon successful completion, the Psetcred() function returns 0 and updates
  26      the credentials of the process P.  Otherwise, -1 is returned.
  27 
  28 INTERFACE STABILITY
  29      Uncommitted
  30 
  31 MT-LEVEL
  32      See LOCKING in libproc(3LIB).
  33 
  34 SEE ALSO
  35      libproc(3LIB), Pcred(3PROC), proc(4)
  36 
  37 illumos                          May 11, 2016                          illumos