xref: /illumos-gate/usr/src/man/man3proc/pr_getzoneid.3proc (revision 56350fe51602d105c19353b8bf580ddd591726d5)
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_GETZONEID 3PROC
16.Os
17.Sh NAME
18.Nm pr_getzoneid
19.Nd inject getzoneid system call into victim process
20.Sh SYNOPSIS
21.Lb libproc
22.In libproc.h
23.Ft zoneid_t
24.Fo pr_getzoneid
25.Fa "struct ps_prochandle *P"
26.Fc
27.Sh DESCRIPTION
28The
29.Fn pr_getzoneid
30function injects the
31.Xr getzoneid 2
32system call into the target process
33.Fa P
34by means of the agent LWP.
35If the process handle
36.Fa P
37is the value
38.Dv NULL
39then this will be equivalent to calling
40.Xr getzoneid 2
41on the currently running process.
42.Pp
43The
44.Fn pr_getzoneid
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_getzoneid
51function's return value is that described in
52.Xr getzoneid 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 getzoneid 2 .
65.Pp
66The
67.Fn pr_getzoneid
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 getzoneid 2 ,
87.Xr libproc 3LIB ,
88.Xr proc 4
89