Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
   1 PCRED(3PROC)           Process Control Library Functions          PCRED(3PROC)
   2 
   3 NAME
   4      Pcred - obtain process credentials
   5 
   6 SYNOPSIS
   7      Process Control Library (libproc, -lproc)


   8      #include <libproc.h>
   9 
  10      int
  11      Pcred(struct ps_prochandle *P, prcred_t *pcrp, int ngroups);
  12 
  13 DESCRIPTION
  14      The Pcred() function obtains the credentials of the process from the
  15      handle P.
  16 
  17      The credentials are read into the buffer pointed to by pcrp.  The
  18      prcred_t type is defined in proc(4).  It contains information about the
  19      current effective, saved, and real user and group IDs.  It also allows
  20      for supplemental groups to be obtained.  The Pcred() function will read a
  21      number of supplemental groups based on the value of ngroups.  The
  22      prcred_t structure only contains the space for one supplemental group by
  23      default.  Callers should ensure that the buffer pointed to by pcrp
  24      contains enough space to include all of the required supplemental groups
  25      that are desired.
  26 
  27      Not all process handles have credential information available to them.
   1 PCRED(3PROC)           Process Control Library Functions          PCRED(3PROC)
   2 
   3 NAME
   4      Pcred - obtain process credentials
   5 
   6 LIBRARY
   7      Process Control Library (libproc, -lproc)
   8 
   9 SYNOPSIS
  10      #include <libproc.h>
  11 
  12      int
  13      Pcred(struct ps_prochandle *P, prcred_t *pcrp, int ngroups);
  14 
  15 DESCRIPTION
  16      The Pcred() function obtains the credentials of the process from the
  17      handle P.
  18 
  19      The credentials are read into the buffer pointed to by pcrp.  The
  20      prcred_t type is defined in proc(4).  It contains information about the
  21      current effective, saved, and real user and group IDs.  It also allows
  22      for supplemental groups to be obtained.  The Pcred() function will read a
  23      number of supplemental groups based on the value of ngroups.  The
  24      prcred_t structure only contains the space for one supplemental group by
  25      default.  Callers should ensure that the buffer pointed to by pcrp
  26      contains enough space to include all of the required supplemental groups
  27      that are desired.
  28 
  29      Not all process handles have credential information available to them.