devfs.rules revision 181905
1219820Sjeff#
2219820Sjeff# The following are some default rules for devfs(5) mounts.
3219820Sjeff# The format is very simple. Empty lines and lines beginning
4219820Sjeff# with a hash '#' are ignored. If the hash mark occurs anywhere
5219820Sjeff# other than the beginning of a line, it and any subsequent
6219820Sjeff# characters will be ignored.  A line in between brackets '[]'
7219820Sjeff# denotes the beginning of a ruleset. In the brackets should
8219820Sjeff# be a name for the rule and its ruleset number. Any other lines
9219820Sjeff# will be considered to be the 'action' part of a rule
10219820Sjeff# passed to the devfs(8) command. These will be passed
11219820Sjeff# "as-is" to the devfs(8) command with the exception that
12219820Sjeff# any references to other rulesets will be expanded first. These
13219820Sjeff# references must include a dollar sign '$' in front of the
14219820Sjeff# name to be expanded properly.
15219820Sjeff#
16219820Sjeff# $FreeBSD: head/etc/defaults/devfs.rules 181905 2008-08-20 08:31:58Z ed $
17219820Sjeff#
18219820Sjeff
19219820Sjeff# Very basic and secure ruleset: Hide everything.
20219820Sjeff# Used as a basis for other rules.
21219820Sjeff#
22219820Sjeff[devfsrules_hide_all=1]
23219820Sjeffadd hide
24219820Sjeff
25219820Sjeff# Basic devices typically necessary.
26219820Sjeff# Requires: devfsrules_hide_all
27219820Sjeff#
28219820Sjeff[devfsrules_unhide_basic=2]
29219820Sjeffadd path null unhide
30219820Sjeffadd path zero unhide
31219820Sjeffadd path crypto unhide
32219820Sjeffadd path random unhide
33219820Sjeffadd path urandom unhide
34219820Sjeff
35219820Sjeff# Devices typically needed to support logged-in users.
36219820Sjeff# Requires: devfsrules_hide_all
37219820Sjeff#
38219820Sjeff[devfsrules_unhide_login=3]
39219820Sjeffadd path 'ptyp*' unhide
40219820Sjeffadd path 'ptyq*' unhide
41219820Sjeffadd path 'ptyr*' unhide
42219820Sjeffadd path 'ptys*' unhide
43219820Sjeffadd path 'ptyP*' unhide
44219820Sjeffadd path 'ptyQ*' unhide
45219820Sjeffadd path 'ptyR*' unhide
46219820Sjeffadd path 'ptyS*' unhide
47219820Sjeffadd path 'ttyp*' unhide
48219820Sjeffadd path 'ttyq*' unhide
49219820Sjeffadd path 'ttyr*' unhide
50219820Sjeffadd path 'ttys*' unhide
51219820Sjeffadd path 'ttyP*' unhide
52219820Sjeffadd path 'ttyQ*' unhide
53219820Sjeffadd path 'ttyR*' unhide
54219820Sjeffadd path 'ttyS*' unhide
55219820Sjeffadd path ptmx unhide
56219820Sjeffadd path pts unhide
57219820Sjeffadd path 'pts/*' unhide
58219820Sjeffadd path fd unhide
59219820Sjeffadd path 'fd/*' unhide
60219820Sjeffadd path stdin unhide
61219820Sjeffadd path stdout unhide
62219820Sjeffadd path stderr unhide
63219820Sjeff
64219820Sjeff# Devices usually found in a jail.
65219820Sjeff#
66219820Sjeff[devfsrules_jail=4]
67219820Sjeffadd include $devfsrules_hide_all
68219820Sjeffadd include $devfsrules_unhide_basic
69219820Sjeffadd include $devfsrules_unhide_login
70219820Sjeff