koverstreet / bcachefs

Other
675 stars 69 forks source link

Initial support for security callbacks. #664

Open xbjfk opened 6 months ago

xbjfk commented 6 months ago

I decided to take a stab at SELinux support - which should fix #642. Note that this must be accompanied with a change in distro SELinux policies to add bcachefs as a supported filesystem, otherwise setting attributes will still fail. This patch simply ensures that the security callbacks will be run when a new inode is created.

I am relatively knew to kernel and filesystem code as a whole, so there may be glaring (or subtle) issues, but ephemeral testing has shown that this works on my machine™.

Sangeetajain09 commented 6 months ago

sir this is a issue has been verified and running the process in two to three days

benstonezhang commented 4 weeks ago

I decided to take a stab at SELinux support - which should fix #642. Note that this must be accompanied with a change in distro SELinux policies to add bcachefs as a supported filesystem, otherwise setting attributes will still fail. This patch simply ensures that the security callbacks will be run when a new inode is created.

I am relatively knew to kernel and filesystem code as a whole, so there may be glaring (or subtle) issues, but ephemeral testing has shown that this works on my machine™.

Only patch filesystem.te is not enough, Makefile and devices.fc also need be patched. I made a patch here