Page MenuHomeFreeBSD

Enable copy_file_range(2) in capability mode.
ClosedPublic

Authored by markj on Jul 30 2019, 3:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 26, 12:15 AM
Unknown Object (File)
Wed, Jun 18, 11:52 AM
Unknown Object (File)
Mon, Jun 16, 6:20 AM
Unknown Object (File)
Jun 5 2025, 2:46 PM
Unknown Object (File)
May 29 2025, 6:15 PM
Unknown Object (File)
May 25 2025, 9:18 PM
Unknown Object (File)
May 18 2025, 9:38 AM
Unknown Object (File)
May 18 2025, 1:07 AM
Subscribers

Details

Summary

The system call takes two fds, and copies a range from one to the other.
We currently require CAP_READ for the source descriptor and CAP_WRITE
for the destination descriptor.

Test Plan

I wrote a small program which creates two files, writes some data to one,
and uses copy_file_range() to copy the data to the other. Verified that it
works if the program enter capability mode; verified that we get an error
if the source fd is missing CAP_READ or if the dst fd is missing CAP_WRITE.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25594
Build 24194: arc lint + arc unit