devfs.rules revision 120463
1119166Smtm#
2119166Smtm# The following are some default rules for devfs(5) mounts.
3119166Smtm# The format is very simple. Empty lines and lines begining
4119166Smtm# with a hash '#' are ignored. If the hash mark occurs anywhere
5119166Smtm# other than the beginning of a line, it and any subsequent
6119166Smtm# characters will be ignored.  A line in between brackets '[]'
7119166Smtm# denotes the beginning of a ruleset. In the brackets should
8119166Smtm# be a name for the rule and its ruleset number. Any other lines
9119166Smtm# will be considered to be the 'action' part of a rule
10119166Smtm# passed to the devfs(8) command. These will be passed
11119166Smtm# "as-is" to the devfs(8) command with the exception that
12119166Smtm# any references to other rulesets will be expanded first. These
13119166Smtm# references must include a dollar sign '$' in-front of the
14119166Smtm# name to be expanded properly.
15119166Smtm#
16119166Smtm# $FreeBSD: head/etc/defaults/devfs.rules 120463 2003-09-26 10:32:21Z phk $
17119166Smtm#
18119166Smtm
19119166Smtm# Very basic and secure ruleset: Hide everything.
20119166Smtm# Used as a basis for other rules.
21119166Smtm#
22119166Smtm[devfsrules_hide_all=1]
23119166Smtmadd hide
24119166Smtm
25119166Smtm# Basic devices typically necessary.
26119166Smtm# Requires: devfsrules_hide_all
27119166Smtm#
28119166Smtm[devfsrules_unhide_basic=2]
29119166Smtmadd path null unhide
30119166Smtmadd path zero unhide
31120463Sphkadd path crypto unhide
32119166Smtmadd path random unhide
33119166Smtmadd path urandom unhide
34119166Smtm
35119166Smtm# Devices typically needed to support logged-in users.
36119166Smtm# Requires: devfsrules_hide_all
37119166Smtm#
38119166Smtm[devfsrules_unhide_login=3]
39119166Smtmadd path 'ptyp*' unhide
40119166Smtmadd path 'ptyq*' unhide
41119166Smtmadd path 'ptyr*' unhide
42119166Smtmadd path 'ptys*' unhide
43119166Smtmadd path 'ptyP*' unhide
44119166Smtmadd path 'ptyQ*' unhide
45119166Smtmadd path 'ptyR*' unhide
46119166Smtmadd path 'ptyS*' unhide
47119166Smtmadd path 'ttyp*' unhide
48119166Smtmadd path 'ttyq*' unhide
49119166Smtmadd path 'ttyr*' unhide
50119166Smtmadd path 'ttys*' unhide
51119166Smtmadd path 'ttyP*' unhide
52119166Smtmadd path 'ttyQ*' unhide
53119166Smtmadd path 'ttyR*' unhide
54119166Smtmadd path 'ttyS*' unhide
55119166Smtmadd path 'fd/*' unhide
56119166Smtmadd path stdin unhide
57119166Smtmadd path stdout unhide
58119166Smtmadd path stderr unhide
59119166Smtm
60119166Smtm# Devices usually found in a jail.
61119166Smtm#
62119166Smtm[devfsrules_jail=4]
63119166Smtmadd include $devfsrules_hide_all
64119166Smtmadd include $devfsrules_unhide_basic
65119166Smtmadd include $devfsrules_unhide_login
66