Page MenuHomeFreeBSD

libc: allow posix_fallocate in capability mode
ClosedPublic

Authored by emaste on Oct 11 2017, 7:46 PM.
Tags
None
Referenced Files
F103258508: D12640.id.diff
Fri, Nov 22, 5:52 PM
Unknown Object (File)
Sat, Nov 16, 5:23 PM
Unknown Object (File)
Fri, Nov 1, 4:49 AM
Unknown Object (File)
Wed, Oct 30, 11:51 PM
Unknown Object (File)
Fri, Oct 25, 11:57 PM
Unknown Object (File)
Thu, Oct 24, 12:25 PM
Unknown Object (File)
Thu, Oct 24, 11:34 AM
Unknown Object (File)
Oct 21 2024, 6:14 AM
Subscribers
None

Details

Summary

posix_fallocate is logically equivalent to writing zero blocks to the desired file size and there is no reason to prevent calling it in capability mode. posix_fallocate already checked for the CAP_WRITE right, so we merely need to list it in capabilities.conf.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Per discussion on the recent capsicum call, posix_fallocate could require CAP_PWRITE (aka CAP_WRITE | CAP_SEEK) instead of just CAP_WRITE.

Require CAP_PWRITE (CAP_WRITE | CAP_SEEK) for posix_fallocate.

This revision is now accepted and ready to land.Oct 12 2017, 2:04 AM
This revision was automatically updated to reflect the committed changes.