Page MenuHomeFreeBSD

Capsicumize fsck_ffs
Needs ReviewPublic

Authored by shubh on Aug 18 2020, 12:43 AM.
Referenced Files
Unknown Object (File)
Dec 13 2024, 5:17 PM
Unknown Object (File)
Nov 13 2024, 12:05 AM
Unknown Object (File)
Nov 5 2024, 10:27 PM
Unknown Object (File)
Oct 23 2024, 11:10 AM
Unknown Object (File)
Oct 6 2024, 4:32 PM
Unknown Object (File)
Oct 5 2024, 11:30 AM
Unknown Object (File)
Oct 2 2024, 10:52 AM
Unknown Object (File)
Sep 29 2024, 9:56 PM
Subscribers

Details

Reviewers
markj
oshogbo
Summary
  • Entered the capability mode after the setup() call is finished, because the setup() call is used in fsck_msdosfs, and hence it could interfere
  • Leveraged cap_pwd and cap_sysctl
  • Testing sysctl calls was tough, hence used the casper equivalents for all of them
Test Plan
  • Tamper a filesystem using fsdb, then test fsck_ffs

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sbin/fsck_ffs/dir.c
54

Maybe include it in fsck.h with casper.

sbin/fsck_ffs/fsck.h
297

extra line.

sbin/fsck_ffs/main.c
762

Maybe casper_init?

778

This style look weired.

782

Hym does it works? You limit to one sysctl name and then used with multiple diffrent names like:
vfs.ffs.setcwd, vfs.ffs.setdotdot.