HomeFreeBSD

copy_file_range: require CAP_SEEK capability

Description

copy_file_range: require CAP_SEEK capability

When using copy_file_range(2) with an offset parameter,
the CAP_SEEK capability should be required.
This requirement is similar to the behavior observed with
pread(2)/pwrite(2).

Reported by: theraven
Reviewed by: emaste, theraven, kib, markj
Approved by: secteam
Differential Revision: https://reviews.freebsd.org/D41967

(cherry picked from commit 15a51d3abaef27ddea66320cac7caa549738a1a6)
(cherry picked from commit 87d68b131ef65a0a5fb897280359e46067064a53)

Approved by: re (gjb)

Details

Provenance
oshogboAuthored on Sep 28 2023, 1:24 PM
Reviewer
emaste
Differential Revision
D41967: copy_file_range: fix capabilities premissions
Parents
rG4719202d8cff: freebsd-update: handle file -> directory on upgrade
Branches
Unknown
Tags
Unknown