PCRED(3PROC) Process Control Library Functions PCRED(3PROC) NNAAMMEE PPccrreedd - obtain process credentials LLIIBBRRAARRYY Process Control Library (libproc, -lproc) SSYYNNOOPPSSIISS ##iinncclluuddee <> _i_n_t PPccrreedd(_s_t_r_u_c_t _p_s___p_r_o_c_h_a_n_d_l_e _*_P, _p_r_c_r_e_d___t _*_p_c_r_p, _i_n_t _n_g_r_o_u_p_s); DDEESSCCRRIIPPTTIIOONN The PPccrreedd() function obtains the credentials of the process from the handle _P. The credentials are read into the buffer pointed to by _p_c_r_p. The pprrccrreedd__tt type is defined in proc(4). It contains information about the current effective, saved, and real user and group IDs. It also allows for supplemental groups to be obtained. The PPccrreedd() function will read a number of supplemental groups based on the value of _n_g_r_o_u_p_s. The pprrccrreedd__tt structure only contains the space for one supplemental group by default. Callers should ensure that the buffer pointed to by _p_c_r_p contains enough space to include all of the required supplemental groups that are desired. Not all process handles have credential information available to them. For example, the handles that come from Pgrab_file(3PROC) have no processes associated with them and thus have no credentials associated with them. RREETTUURRNN VVAALLUUEESS Upon successful completion, the PPccrreedd() function returns 00 and updates the memory at _p_c_r_p with the credentials. Otherwise, --11 is returned to indicate an error. IINNTTEERRFFAACCEE SSTTAABBIILLIITTYY UUnnccoommmmiitttteedd MMTT--LLEEVVEELL See LLOOCCKKIINNGG in libproc(3LIB). SSEEEE AALLSSOO libproc(3LIB), Psetcred(3PROC), proc(4) illumos May 11, 2016 illumos