| 1 |
.\" Hey, EMACS: -*- nroff -*- |
| 2 |
.TH CAPTREE 8 "2022-03-19" |
| 3 |
.\" Please adjust this date whenever revising the manpage. |
| 4 |
.SH NAME |
| 5 |
captree \- display tree of process capabilities |
| 6 |
.SH SYNOPSIS |
| 7 |
.BR captree " [OPTIONS] " |
| 8 |
.RI [( pid | glob-name ") ...]" |
| 9 |
.SH DESCRIPTION |
| 10 |
.B captree |
| 11 |
displays the capabilities on the mentioned processes indicated by |
| 12 |
.IR pid " or " glob-name |
| 13 |
value(s) given on the command line. If no |
| 14 |
.I pid |
| 15 |
etc values are supplied, |
| 16 |
.IR pid =1 |
| 17 |
is implied. A |
| 18 |
.I pid |
| 19 |
value of 0 displays all the processes known to the kernel. |
| 20 |
.PP |
| 21 |
The POSIX.1e capabilities are displayed in double quotes in the |
| 22 |
.BR cap_from_text (3) |
| 23 |
format. The IAB tuple of capabilities is displayed between square |
| 24 |
brackets in the text format described in |
| 25 |
.BR cap_iab (3). |
| 26 |
Both of these text formats are described in |
| 27 |
.BR cap_text_formats (7). |
| 28 |
Note, the IAB tuple text is omitted if it contains empty A and B |
| 29 |
components. This is because the regular POSIX.1e text contains |
| 30 |
information about the Inheritable flag already. This behavior can be |
| 31 |
overridden with the |
| 32 |
.B --verbose |
| 33 |
command line argument. |
| 34 |
.PP |
| 35 |
Optional arguments (which must precede the list of pid|glob-name |
| 36 |
values): |
| 37 |
.TP |
| 38 |
.B \-\-help |
| 39 |
Displays usage information and exits. Note, modern Go runtimes exit |
| 40 |
with status 0 in this case, but older runtimes exit with status 2. |
| 41 |
.TP |
| 42 |
.BR \-\-verbose |
| 43 |
Displays capability sets and IAB tuples even when they are empty, or |
| 44 |
redundant. |
| 45 |
.TP |
| 46 |
.BI \-\-depth =n |
| 47 |
Displays the process tree to a depth of |
| 48 |
.IR n . |
| 49 |
Note, the default value for this parameter is 0, which implies |
| 50 |
infinite depth. |
| 51 |
.TP |
| 52 |
.BI \-\-colo[u]r =false |
| 53 |
Colo[u]rs the targeted PIDs, if stdout is a TTY, in red. This option |
| 54 |
defaults to true when running via a TTY. The \fB--color\fI=false\fR |
| 55 |
argument will suppress this color. Piping the output into some other |
| 56 |
program will also suppress the use of colo[u]r. |
| 57 |
.SH EXIT STATUS |
| 58 |
If the supplied target cannot be found the exit status is 1. Should an |
| 59 |
unrecognized option be provided, the exit status is 2. Otherwise, |
| 60 |
.B captree |
| 61 |
exits with status 0. |
| 62 |
.SH REPORTING BUGS |
| 63 |
Please report bugs via: |
| 64 |
.TP |
| 65 |
https://bugzilla.kernel.org/buglist.cgi?component=libcap&list_id=1090757 |
| 66 |
.SH SEE ALSO |
| 67 |
.BR cap_from_text (3), |
| 68 |
.BR cap_text_formats (7), |
| 69 |
.BR capabilities (7), |
| 70 |
and |
| 71 |
.BR cap_iab (3). |
| 72 |
|
| 73 |
There is a longer article about \fBcaptree\fP, which includes some |
| 74 |
examples, here: |
| 75 |
|
| 76 |
https://sites.google.com/site/fullycapable/captree |
| 77 |
.SH AUTHOR |
| 78 |
Andrew G. Morgan <[email protected]> |