Commit 29cf5f5
committed
feat(redirfs-lite): hide_from_root policy (default on)
Default behavior is now: redirect for everyone EXCEPT root (EUID=0).
Aligns with the SUSFS/ZeroMount model where the privileged 'inside'
view is the real fs and the 'outside' view (apps, system, shell) sees
the rule-table.
Implementation:
- static bool rfl_hide_from_root = true (module_param 0644)
- rfl_rule_lookup() bails early if hide_from_root && uid_eq(uid, ROOT)
- rfl_rule_lookup_by_dst() same symmetric guard
- Toggleable at runtime:
echo 0 > /sys/module/redirfs_lite/parameters/hide_from_root
Per-rule UID/GID filter still works on top — useful to scope a rule
to a single non-root UID (e.g. one banking app) while leaving other
apps unaffected.
Webui: 'Toggle hide_from_root' button in the Module state section,
flips the sysfs parameter and refreshes the diag pane.
Docs: rules.conf.example explains the new default.1 parent 27fef7d commit 29cf5f5
3 files changed
Lines changed: 466 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
| |||
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
12 | | - | |
13 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | | - | |
| 21 | + | |
16 | 22 | | |
17 | | - | |
18 | | - | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | | - | |
21 | | - | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | | - | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | | - | |
| 32 | + | |
27 | 33 | | |
0 commit comments