Page MenuHomeFreeBSD

Enable copy_file_range(2) in capability mode.

Authored by markj on Jul 30 2019, 3:08 PM.



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

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj created this revision.Jul 30 2019, 3:08 PM
markj edited the test plan for this revision. (Show Details)Jul 30 2019, 3:09 PM
markj added reviewers: capsicum, kevans.
markj updated this revision to Diff 60286.Jul 30 2019, 3:10 PM

Fix sorting.

oshogbo accepted this revision.Jul 30 2019, 3:11 PM
This revision is now accepted and ready to land.Jul 30 2019, 3:11 PM
kevans accepted this revision.Jul 30 2019, 3:12 PM
This revision was automatically updated to reflect the committed changes.