xref: /freebsd/sbin/devfs/devfs.rules (revision 848ee2a3a8b47c9905fc51fefcf60eb371edbb98)
1#
2# The following are some default rules for devfs(5) mounts.
3# The format is very simple. Empty lines and lines beginning
4# with a hash '#' are ignored. If the hash mark occurs anywhere
5# other than the beginning of a line, it and any subsequent
6# characters will be ignored.  A line in between brackets '[]'
7# denotes the beginning of a ruleset. In the brackets should
8# be a name for the rule and its ruleset number. Any other lines
9# will be considered to be the 'action' part of a rule
10# passed to the devfs(8) command. These will be passed
11# "as-is" to the devfs(8) command with the exception that
12# any references to other rulesets will be expanded first. These
13# references must include a dollar sign '$' in front of the
14# name to be expanded properly.
15#
16# $FreeBSD$
17#
18
19# Very basic and secure ruleset: Hide everything.
20# Used as a basis for other rules.
21#
22[devfsrules_hide_all=1]
23add hide
24
25# Basic devices typically necessary.
26# Requires: devfsrules_hide_all
27#
28[devfsrules_unhide_basic=2]
29add path log unhide
30add path null unhide
31add path zero unhide
32add path crypto unhide
33add path random unhide
34add path urandom unhide
35
36# Devices typically needed to support logged-in users.
37# Requires: devfsrules_hide_all
38#
39[devfsrules_unhide_login=3]
40add path 'ptyp*' unhide
41add path 'ptyq*' unhide
42add path 'ptyr*' unhide
43add path 'ptys*' unhide
44add path 'ptyP*' unhide
45add path 'ptyQ*' unhide
46add path 'ptyR*' unhide
47add path 'ptyS*' unhide
48add path 'ptyl*' unhide
49add path 'ptym*' unhide
50add path 'ptyn*' unhide
51add path 'ptyo*' unhide
52add path 'ptyL*' unhide
53add path 'ptyM*' unhide
54add path 'ptyN*' unhide
55add path 'ptyO*' unhide
56add path 'ttyp*' unhide
57add path 'ttyq*' unhide
58add path 'ttyr*' unhide
59add path 'ttys*' unhide
60add path 'ttyP*' unhide
61add path 'ttyQ*' unhide
62add path 'ttyR*' unhide
63add path 'ttyS*' unhide
64add path 'ttyl*' unhide
65add path 'ttym*' unhide
66add path 'ttyn*' unhide
67add path 'ttyo*' unhide
68add path 'ttyL*' unhide
69add path 'ttyM*' unhide
70add path 'ttyN*' unhide
71add path 'ttyO*' unhide
72add path ptmx unhide
73add path pts unhide
74add path 'pts/*' unhide
75add path fd unhide
76add path 'fd/*' unhide
77add path stdin unhide
78add path stdout unhide
79add path stderr unhide
80
81# Devices usually found in a jail.
82#
83[devfsrules_jail=4]
84add include $devfsrules_hide_all
85add include $devfsrules_unhide_basic
86add include $devfsrules_unhide_login
87add path fuse unhide
88add path zfs unhide
89
90[devfsrules_jail_vnet=5]
91add include $devfsrules_hide_all
92add include $devfsrules_unhide_basic
93add include $devfsrules_unhide_login
94add include $devfsrules_jail
95add path pf unhide
96