dr-xr-xr-x 2 root wheel 512 Aug 5 16:33 fd
crw-rw-rw- 1 root wheel 0x29 Aug 5 16:33 null
dr-xr-xr-x 2 root wheel 512 Aug 5 16:33 pts
crw-r--r-- 1 root wheel 0x8 Aug 5 15:43 random
lrwxr-xr-x 1 root wheel 4 Aug 5 16:33 stderr -> fd/2
lrwxr-xr-x 1 root wheel 4 Aug 5 16:33 stdin -> fd/0
lrwxr-xr-x 1 root wheel 4 Aug 5 16:33 stdout -> fd/1
lrwxr-xr-x 1 root wheel 6 Aug 5 16:33 urandom -> random
crw-rw-rw- 1 root wheel 0x2a Aug 5 15:43 zero
devfs_ruleset
to a custom value (except 4) I can see every device file there. Rulesets does not apply at all.Ruleset 4 includes the other rulesets. When I tried setting a ruleset that included others in the jail, it didn't work. When I wrote out every ruleset needed from 1 through 3, and 4 out, instead of including those rulesets, in a custom ruleset, it worked.If I set devfs_ruleset to a custom value (except 4) I can see every device file there.
Ruleset 4 includes the other rulesets. When I tried setting a ruleset that included others in the jail, it didn't work. When I wrote out every ruleset needed from 1 through 3, and 4 out, instead of including those rulesets, in a custom ruleset, it worked.
It's like includes don't work from there, but writing the included rulesets out from the custom ruleset worked. I don't understand this enough to go further, as I just write them all out manually, instead of including the other rulesets.
[devfsrules_custom=99]
add hide
add path null unhide
add path zero unhide
add path random unhide
add path urandom unhide
manpages didn't helped much.Try reading the devfs manual pages again, starting with devfs.rules(5).
j {
mount.devfs;
devfs_ruleset = 4;
persist;
path = "pathToJail";
}
... Is this looking correct?
Code:[devfsrules_custom=99] add hide add path null unhide add path zero unhide add path random unhide add path urandom unhide
devfsrules_hide_all
instead of add hide
:crw-rw-rw- 1 root wheel 0x29 Aug 18 02:26 null
crw-r--r-- 1 root wheel 0x8 Aug 18 02:11 random
lrwxr-xr-x 1 root wheel 6 Aug 18 02:27 urandom@ -> random
crw-rw-rw- 1 root wheel 0x2a Aug 18 02:11 zero