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
F136138190: D21113.id60291.diff
Sun, Nov 16, 2:31 AM
F136116504: D21113.id.diff
Sat, Nov 15, 10:10 PM
F136106937: D21113.id60286.diff
Sat, Nov 15, 8:36 PM
F136100063: D21113.id60285.diff
Sat, Nov 15, 7:23 PM
F136087450: D21113.id60285.diff
Sat, Nov 15, 5:05 PM
Unknown Object (File)
Sun, Nov 2, 7:10 PM
Unknown Object (File)
Sat, Nov 1, 1:00 AM
Unknown Object (File)
Sun, Oct 26, 4:25 PM
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable