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)
Sun, Feb 2, 6:09 PM
Unknown Object (File)
Thu, Jan 16, 9:08 PM
Unknown Object (File)
Jan 10 2025, 1:08 PM
Unknown Object (File)
Jan 3 2025, 2:55 PM
Unknown Object (File)
Dec 30 2024, 10:01 PM
Unknown Object (File)
Dec 30 2024, 9:55 PM
Unknown Object (File)
Dec 29 2024, 4:20 AM
Unknown Object (File)
Dec 27 2024, 2:41 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