i.minorperm_sparc revision 614f161203d313b00e559d24c1d439b11e022fd5
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# CDDL HEADER START
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# The contents of this file are subject to the terms of the
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# Common Development and Distribution License (the "License").
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# You may not use this file except in compliance with the License.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# See the License for the specific language governing permissions
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# and limitations under the License.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# When distributing Covered Code, include this CDDL HEADER in each
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# If applicable, add the following below this CDDL HEADER, with the
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# fields enclosed by brackets "[]" replaced with your own identifying
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# information: Portions Copyright [yyyy] [name of copyright owner]
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# CDDL HEADER END
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# Use is subject to license terms.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# NOTE: When a change is made to the source file for
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# /etc/minor_perm, a corresponding change must be made to
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# this class-action script.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# - If an existing entry in minor_perm is having its
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# attributes e.g. permissions, ownership changed,
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# add it to the list produced by make_chattr_list below.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# - If an existing entry must be deleted, add it to
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# the list produced by make_delete_list below.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# - If a new entry must be added to the file, add it to the
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# list produced by make_add_list.
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# - If a new entry is being added to minor_perm, but there
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# may already be devices of that name on the system (e.g.
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# we used the system default permissions in a previous release),
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# and those old devices now need to have their attributes changed,
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# add it to the make_chattr_list AND the make_add_list lists
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# If an entry in /etc/minor_perm needs to have its attributes
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# changed, identify the entry in the list copied to /etc/chattr.$$
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# by this function. The fields are:
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# <device>:<minor> <old_attrs> <new_attrs> <optional list of logical
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# devices whose attributes
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# will need to be changed>
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# where an <attribute list> := <perm> <user> <group>
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraaudio:* 0666 root sys 0600 root sys /dev/sound/*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitravol:volctl 0600 root sys 0666 root sys /dev/volctl
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrasad:user 0600 root sys 0666 root sys /dev/sad/user
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrase:* 0666 root sys 0600 uucp uucp /dev/cua/*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrazs:* 0666 root sys 0600 uucp uucp /dev/cua/*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrasu:* 0666 root sys 0600 uucp uucp /dev/cua/*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrassd:* 0666 root sys 0640 root sys /dev/dsk/* /dev/rdsk/*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitradad:* 0600 root sys 0640 root sys /dev/dsk/* /dev/rdsk/*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitracpc:* 0600 root sys 0666 root sys /devices/pseudo/cpc*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitralog:conslog 0622 root sys 0666 root sys /dev/conslog
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrasy:tty 0666 root sys 0666 root tty /dev/tty
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitracvc:* 0666 root sys 0600 root sys
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitracvcredir:* 0666 root sys 0600 root sys
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrassm:* 0600 root sys 0640 root sys /devices/ssm*:*
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitraicmp:icmp 0600 root sys 0666 root sys /dev/rawip
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraicmp6:icmp6 0600 root sys 0666 root sys /dev/rawip6
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitraip:ip 0660 root sys 0666 root sys /dev/ip
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitraip6:ip6 0660 root sys 0666 root sys /dev/ip6
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrarts:rts 0660 root sys 0666 root sys /dev/rts
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrakeysock:keysock 0600 root sys 0666 root sys /dev/keysock
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraipsecah:ipsecah 0600 root sys 0666 root sys /dev/ipsecah
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraipsecesp:ipsecesp 0600 root sys 0666 root sys /dev/ipsecesp
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraspdsock:spdsock 0600 root sys 0666 root sys /dev/spdsock
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrasad:admin 0600 root sys 0666 root sys /dev/sad/admin
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrafssnap:ctl 0600 root sys 0666 root sys /dev/fssnapctl
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrafssnap:* 0600 root sys 0640 root sys /dev/fssnap/*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:ce 0600 root sys 0666 root sys /dev/ce
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:eri 0600 root sys 0666 root sys /dev/eri
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:ge 0600 root sys 0666 root sys /dev/ge
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:hme 0600 root sys 0666 root sys /dev/hme
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:qfe 0600 root sys 0666 root sys /dev/qfe
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:bge 0600 root sys 0666 root sys /dev/bge
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:igb 0600 root sys 0666 root sys /dev/igb
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:ixgbe 0600 root sys 0666 root sys /dev/ixgbe
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:rge 0600 root sys 0666 root sys /dev/rge
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:xge 0600 root sys 0666 root sys /dev/xge
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:nge 0600 root sys 0666 root sys /dev/nge
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:e1000g 0666 root root 0666 root sys /dev/e1000g
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:chxge 0600 root sys 0666 root sys /dev/chxge
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:vsw 0600 root sys 0666 root sys /dev/vsw
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:vnet 0600 root sys 0666 root sys /dev/vnet
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:pcwl 0600 root sys 0666 root sys /dev/pcwl
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:pcan 0600 root sys 0666 root sys /dev/pcan
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitraclone:afe 0600 root sys 0666 root sys /dev/afe
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:mxfe 0600 root sys 0666 root sys /dev/mxfe
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitraclone:rtls 0600 root sys 0666 root sys /dev/rtls
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrabge:* 0600 root sys 0666 root sys /dev/bge*
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitraigb:* 0600 root sys 0666 root sys /dev/igb*
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitraixgbe:* 0600 root sys 0666 root sys /dev/ixgbe*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrarge:* 0600 root sys 0666 root sys /dev/rge*
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitraxge:* 0600 root sys 0666 root sys /dev/xge*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrange:* 0600 root sys 0666 root sys /dev/nge*
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrae1000g:* 0666 root root 0666 root sys /dev/e1000g*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrachxge:* 0600 root sys 0666 root sys /dev/chxge*
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitravsw:* 0600 root sys 0666 root sys /dev/vsw*
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitravnet:* 0600 root sys 0666 root sys /dev/vnet*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrapcwl:* 0600 root sys 0666 root sys /dev/pcwl*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrapcan:* 0600 root sys 0666 root sys /dev/pcan*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:dmfe 0600 root sys 0666 root sys /dev/dmfe
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitradmfe:* 0600 root sys 0666 root sys /dev/dmfe*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraclone:pcelx 0600 root sys 0666 root sys /dev/pcelx
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrapcelx:* 0600 root sys 0666 root sys /dev/pcelx*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraafe:* 0600 root sys 0666 root sys /dev/afe*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitramxfe:* 0600 root sys 0666 root sys /dev/mxfe*
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrartls:* 0600 root sys 0666 root sys /dev/rtls*
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraipf:* 0600 root sys 0666 root sys /dev/ipf
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrapfil:* 0600 root sys 0666 root sys /dev/pfil
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrascsi_vhci:devctl 0600 root sys 0666 root sys /devices/scsi_vhci:devctl
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrafbt:fbt 0600 root sys 0644 root sys /dev/dtrace/provider/fbt
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitralockstat:* 0600 root sys 0644 root sys /dev/dtrace/provider/lockstat
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraprofile:profile 0600 root sys 0644 root sys /dev/dtrace/provider/profile
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrasdt:sdt 0600 root sys 0644 root sys /dev/dtrace/provider/sdt
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrasystrace:systrace 0600 root sys 0644 root sys /dev/dtrace/provider/systrace
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# If an entry in /etc/minor_perm needs to be deleted, identify
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# the entry in the list copied to /etc/delete.$$ by this function.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# The fields are:
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# <device>:<minor> <optional list of logical devices to be deleted>
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitramm:mbio /dev/mbio /devices/pseudo/mm:mbio
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitramm:mbmem /dev/mbmem /devices/pseudo/mm:mbmem
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitraclone:amd,0,aux,audio
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitraconsfb:consfb
# If an entry needs to be added to /etc/minor_perm, add the first
# remainder of the entry will be extracted from the /etc/minor_perm
export PATH
# Internal routine to convert an entry in a /tmp/chwhatever.$$ file to
if [ ! -f $dest ] ; then
# currently-installed /etc/minor_perm file. Also,
# entry for /dev/volctl in the /etc/minor_perm file
# /etc/minor_perm file. Also, add an entry to the
# currently-installed /etc/minor_perm file.
rm -f $i
# the permission/ownership of devices that