1.\" 2.\" This file and its contents are supplied under the terms of the 3.\" Common Development and Distribution License ("CDDL"), version 1.0. 4.\" You may only use this file in accordance with the terms of version 5.\" 1.0 of the CDDL. 6.\" 7.\" A full copy of the text of the CDDL should have accompanied this 8.\" source. A copy of the CDDL is also available via the Internet at 9.\" http://www.illumos.org/license/CDDL. 10.\" 11.\" 12.\" Copyright 2015 Joyent, Inc. 13.\" 14.Dd May 11, 2016 15.Dt PR_GETPROJID 3PROC 16.Os 17.Sh NAME 18.Nm pr_getprojid 19.Nd inject getprojid system call into victim process 20.Sh SYNOPSIS 21.Lb libproc 22.In libproc.h 23.Ft projid_t 24.Fo pr_getprojid 25.Fa "struct ps_prochandle *P" 26.Fc 27.Sh DESCRIPTION 28The 29.Fn pr_getprojid 30function injects the 31.Xr getprojid 2 32system call into the target process 33.Fa P 34by means of the agent LWP. 35If the process handle 36.Fa P 37is 38.Dv NULL 39then this is equivalent to calling 40.Xr getprojid 2 41on the currently running process. 42.Pp 43The 44.Fn pr_getprojid 45function only works on active processes. Process handles that correspond 46to core files, zombie processes, or ELF objects do not support system 47call injection. 48.Sh RETURN VALUES 49Upon successful completion, the 50.Fn pr_getprojid 51function's return value is that described in 52.Xr getprojid 2 . 53Otherwise, 54.Sy -1 55is returned and 56.Sy errno 57is set to 58.Er ENOSYS 59to indicate that the system call could not be injected. 60.Sh ERRORS 61For the full list of errors see the 62.Sy ERRORS 63section in 64.Xr getprojid 2 . 65.Pp 66The 67.Fn pr_getprojid 68function will fail if: 69.Bl -tag -width Er 70.It Er ENOSYS 71An error occurred while trying to invoke the agent LWP and inject a 72system call in the process handle 73.Fa P 74or the process handle 75.Fa P 76does not support system call injection. 77.El 78.Sh INTERFACE STABILITY 79.Sy Uncommitted 80.Sh MT-LEVEL 81See 82.Sy LOCKING 83in 84.Xr libproc 3LIB . 85.Sh SEE ALSO 86.Xr getprojid 2 , 87.Xr libproc 3LIB , 88.Xr proc 4 89