Debian Codegraph @

doc/getcap.8

raw
1 .\" originally written by Andrew Main <[email protected]>
2 .TH GETCAP 8 "2021-08-29"
3 .SH NAME
4 getcap \- examine file capabilities
5 .SH SYNOPSIS
6 \fBgetcap\fP [\-v] [\-n] [\-r] [\-h] \fIfilename\fP [ ... ]
7 .SH DESCRIPTION
8 .B getcap
9 displays the name and capabilities of each specified file.
10 .SH OPTIONS
11 .TP 4
12 .B \-h
13 prints quick usage.
14 .TP 4
15 .B \-n
16 prints any non-zero user namespace root user ID value
17 found to be associated with
18 a file's capabilities.
19 .TP 4
20 .B \-r
21 enables recursive search.
22 .TP 4
23 .B \-v
24 display all searched entries, even if the have no file-capabilities.
25 .PP
26 NOTE: an
27 .I empty
28 value of
29 .B '='
30 is
31 .B not
32 equivalent to an omitted (or removed) capability on a
33 file. This is most significant with respect to the Ambient capability
34 vector, since a process with Ambient capabilities will lose them when
35 executing a file having
36 .B '='
37 capabilities, but will retain the Ambient inheritance of privilege
38 when executing a file with an omitted file capability. This special
39 .I empty
40 setting can be used to prevent a binary from executing with
41 privilege. For some time, the kernel honored this suppression for root
42 executing the file, but the kernel developers decided after a number
43 of years that this behavior was unexpected for the superuser and
44 reverted it just for that user identity. Suppression of root
45 privilege, for a process tree, is possible, using the
46 .BR capsh (1)
47 .B \-\-mode
48 option.
49 .TP 4
50 .IR filename
51 One file per line.
52 .SH "REPORTING BUGS"
53 Please report bugs via:
54 .TP
55 https://bugzilla.kernel.org/buglist.cgi?component=libcap&list_id=1090757
56 .SH "SEE ALSO"
57 .BR capsh (1),
58 .BR cap_get_file (3),
59 .BR cap_to_text (3),
60 .BR capabilities (7),
61 .BR user_namespaces (7),
62 .BR captree (8),
63 .BR getpcaps (8)
64 and
65 .BR setcap (8).