Page MenuHomeFreeBSD

Capsicumize fsck_ffs
Needs ReviewPublic

Authored by shubh on Aug 18 2020, 12:43 AM.

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
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.