xref: /illumos-gate/usr/src/cmd/login/logindevperm.sh (revision 734b6a94890be549309b21156f8ed6d4561cac51)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27#
28# This is the script that generates the logindevperm file. It is
29# architecture-aware, and dumps different stuff for x86 and sparc.
30# There is a lot of common entries, which are dumped first.
31#
32# the SID of this script, and the SID of the dumped script are
33# always the same.
34#
35
36cat <<EOM
37#
38# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
39# Use is subject to license terms.
40#
41#pragma ident	"%Z%logindevperm	%I%	%E% SMI"
42#
43# /etc/logindevperm - login-based device permissions
44#
45# If the user is logging in on a device specified in the "console" field
46# of any entry in this file, the owner/group of the devices listed in the
47# "devices" field will be set to that of the user.  Similarly, the mode
48# will be set to the mode specified in the "mode" field.
49#
50# "devices" is a colon-separated list of device names.  A device name
51# ending in "/*", such as "/dev/fbs/*", specifies all entries (except "."
52# and "..") in a directory.  A '#' begins a comment and may appear
53# anywhere in an entry.
54# In addition, regular expressions may be used. Refer to logindevperm(4)
55# man page.
56# Note that any changes in this file should be made when logged in as
57# root as devfs provides persistence on minor node attributes.
58#
59# console	mode	devices
60#
61/dev/console	0600	/dev/mouse:/dev/kbd
62/dev/console	0600	/dev/sound/*		# audio devices
63/dev/console	0600	/dev/fbs/*		# frame buffers
64EOM
65
66case "$MACH" in
67    "i386" )
68	#
69	# These are the x86 specific entries
70	# It depends on the build machine being an x86
71	#
72	cat <<-EOM
73	EOM
74	;;
75    "sparc" )
76	#
77	# These are the sparc specific entries
78	# It depends on the build machine being a sparc
79	#
80	cat <<-EOM
81	EOM
82	;;
83    "ppc" )
84	#
85	# These are the ppc specific entries
86	# It depends on the build machine being a ppc
87	#
88	cat <<-EOM
89	EOM
90	;;
91    * )
92	echo "Unknown Architecture"
93		exit 1
94	;;
95esac
96