Psetcred
—
set process credentials
Process Control Library (libproc, -lproc)
#include
<libproc.h>
int
Psetcred
(
struct
ps_prochandle *P,
const prcred_t
*credp);
The
Psetcred
() function updates the
credentials of the process handle
P to the
values set in
credp.
credp must be fully initialized. The
definition of the
prcred_t structure may be found
in
proc(4).
Note, the credentials may only be updated for an active process. If the process
handle refers to a zombie process, core file, or a file, then
Psetcred
() will fail.
Upon successful completion, the
Psetcred
()
function returns
0 and updates the credentials of
the process
P. Otherwise,
-1 is returned.
Uncommitted
See
LOCKING in
libproc(3LIB).
libproc(3LIB),
Pcred(3PROC),
proc(4)