Page MenuHomeFreeBSD

Capsicumize fsck_ffs
Needs ReviewPublic

Authored by shubh on Aug 18 2020, 12:43 AM.
Referenced Files
Unknown Object (File)
Thu, Nov 6, 8:58 PM
Unknown Object (File)
Thu, Oct 16, 1:14 AM
Unknown Object (File)
Oct 9 2025, 8:53 AM
Unknown Object (File)
Aug 24 2025, 2:11 PM
Unknown Object (File)
Jul 22 2025, 3:20 PM
Unknown Object (File)
Jun 24 2025, 6:23 PM
Unknown Object (File)
Jun 24 2025, 10:43 AM
Unknown Object (File)
Jun 23 2025, 11:23 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.