File tree Expand file tree Collapse file tree 2 files changed +22
-11
lines changed Expand file tree Collapse file tree 2 files changed +22
-11
lines changed Original file line number Diff line number Diff line change 30
30
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
31
.\" SUCH DAMAGE.
32
32
.\"
33
- .Dd March 9, 2023
33
+ .Dd April 27, 2024
34
34
.Dt CAP_RIGHTS_LIMIT 2
35
35
.Os
36
36
.Sh NAME
44
44
.Fn cap_rights_limit " int fd" " const cap_rights_t *rights"
45
45
.Sh DESCRIPTION
46
46
When a file descriptor is created by a function such as
47
- .Xr accept 2 ,
48
- .Xr accept4 2 ,
49
47
.Xr fhopen 2 ,
50
48
.Xr kqueue 2 ,
51
49
.Xr mq_open 2 ,
52
50
.Xr open 2 ,
53
- .Xr openat 2 ,
54
51
.Xr pdfork 2 ,
55
52
.Xr pipe 2 ,
56
53
.Xr shm_open 2 ,
57
54
.Xr socket 2
58
55
or
59
56
.Xr socketpair 2 ,
60
- it is assigned all capability rights.
57
+ it is assigned all capability rights; for
58
+ .Xr accept 2 ,
59
+ .Xr accept4 2
60
+ or
61
+ .Xr openat 2 ,
62
+ it inherits capability rights from the "parent" file descriptor.
61
63
Those rights can be reduced (but never expanded) by using the
62
64
.Fn cap_rights_limit
63
65
system call.
Original file line number Diff line number Diff line change 30
30
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
31
.\" SUCH DAMAGE.
32
32
.\"
33
- .Dd March 22 , 2024
33
+ .Dd April 27 , 2024
34
34
.Dt RIGHTS 4
35
35
.Os
36
36
.Sh NAME
37
37
.Nm Capability rights
38
38
.Nd Capsicum capability rights for file descriptors
39
39
.Sh DESCRIPTION
40
40
When a file descriptor is created by a function such as
41
- .Xr accept 2 ,
42
- .Xr accept4 2 ,
43
41
.Xr fhopen 2 ,
44
42
.Xr kqueue 2 ,
45
43
.Xr mq_open 2 ,
46
44
.Xr open 2 ,
47
- .Xr openat 2 ,
48
45
.Xr pdfork 2 ,
49
46
.Xr pipe 2 ,
50
47
.Xr shm_open 2 ,
51
48
.Xr socket 2
52
49
or
53
50
.Xr socketpair 2 ,
54
- it is assigned all capability rights.
51
+ it is assigned all capability rights; for
52
+ .Xr accept 2 ,
53
+ .Xr accept4 2
54
+ or
55
+ .Xr openat 2 ,
56
+ it inherits capability rights from the "parent" file descriptor.
55
57
Those rights can be reduced (but never expanded) by using the
56
58
.Xr cap_rights_limit 2 ,
57
59
.Xr cap_fcntls_limit 2 and
@@ -501,7 +503,10 @@ with the
501
503
is also required),
502
504
.Xr preadv 2
503
505
.Dv ( CAP_SEEK
504
- is also required) and related system calls.
506
+ is also required),
507
+ .Xr getdents 2 ,
508
+ .Xr getdirentries 2 ,
509
+ and related system calls.
505
510
.It Dv CAP_RECV
506
511
An alias to
507
512
.Dv CAP_READ .
@@ -611,6 +616,8 @@ with the
611
616
.Dv O_WRONLY
612
617
flag, but without the
613
618
.Dv O_APPEND
619
+ or
620
+ .Dv O_TRUNC
614
621
flag,
615
622
.Dv CAP_SEEK
616
623
is also required.
@@ -657,6 +664,8 @@ is also required.
657
664
.Xr fsync 2 ,
658
665
.Xr ftruncate 2 ,
659
666
.Xr futimes 2 ,
667
+ .Xr getdents 2 ,
668
+ .Xr getdirentries 2 ,
660
669
.Xr getpeername 2 ,
661
670
.Xr getsockname 2 ,
662
671
.Xr getsockopt 2 ,
You can’t perform that action at this time.
0 commit comments