]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/proccontrol/proccontrol.1
proccontrol(1) man page.
[FreeBSD/FreeBSD.git] / usr.bin / proccontrol / proccontrol.1
1 .\" Copyright (c) 2019 The FreeBSD Foundation, Inc.
2 .\" All rights reserved.
3 .\"
4 .\" This documentation was written by
5 .\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship
6 .\" from the FreeBSD Foundation.
7 .\"
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
10 .\" are met:
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\"    notice, this list of conditions and the following disclaimer in the
15 .\"    documentation and/or other materials provided with the distribution.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
18 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
21 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" SUCH DAMAGE.
28 .\"
29 .\" $FreeBSD$
30 .\"
31 .Dd February 22, 2019
32 .Dt PROCCONTROL 1
33 .Os
34 .Sh NAME
35 .Nm proccontrol
36 .Nd Control some process execution aspects
37 .Sh SYNOPSIS
38 .Nm
39 .Fl m Ar mode
40 .Op Fl s Ar control
41 .Op Fl q
42 .Fl p Ar pid | command
43 .Sh DESCRIPTION
44 The
45 .Nm
46 command modifies the execution parameter of existing process
47 specified by the
48 .Ar pid
49 argument, or starts execution of the new program
50 .Ar command
51 with the execution parameter set for it.
52 .Pp
53 Which execution parameter is changed, selected by the mandatory
54 parameter
55 .Ar mode .
56 Possible values for
57 .Ar mode
58 are:
59 .Bl -tag -width trapcap
60 .It Ar aslr
61 Control the Address Space Layout Randomization.
62 Only applicable to the new process spawned.
63 .It Ar trace
64 Control the permission for debuggers to attach.
65 .It Ar trapcap
66 Controls the signalling of capability mode access violations.
67 .El
68 .Pp
69 The
70 Ar control
71 specifies if the selected
72 .Ar mode
73 should be enabled or disabled.
74 Possible values are
75 .Ar enable
76 and
77 .Ar disable ,
78 with the default value being
79 .Ar enable
80 if not specified.
81 See
82 .Xr procctl 2
83 for detailed description of each mode effects and interaction with other
84 process control facilities.
85 .Pp
86 The
87 .Op Fl q
88 switch makes the utility query and print the current setting for
89 the selected mode.
90 .Sh EXIT STATUS
91 .Ex -std
92 .Sh EXAMPLES
93 .Bl -bullet
94 .It
95 To disable debuggers attachment to the process 1020, execute
96 .Dl "proccontrol -m trace -s disable -p 1020"
97 .It
98 To execute the
99 .Xr uniq 1
100 program in a mode where capability access violations cause
101 .Dv SIGTRAP
102 delivery, do
103 .Dl "proccontrol -m trapcap uniq"
104 .It
105 To query the current ASLR enablement mode for the running
106 process 1020, do
107 .Dl "proccontrol -m aslr -q -p 1020"
108 .El
109 .Sh SEE ALSO
110 .Xr kill 2 ,
111 .Xr procctl 2 ,
112 .Xr ptrace 2
113 .Sh HISTORY
114 The
115 .Nm
116 command appeared in
117 .Fx 10.0 .
118 .Sh AUTHORS
119 The
120 .Nm
121 command and this manual page were written by
122 .An Konstantin Belousov Aq Mt kib@freebsd.org
123 under sponsorship from The FreeBSD Foundation.