i.minorperm_i386 revision 9da57d7b0ddd8d73b676ce12c040362132cdd538
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# CDDL HEADER START
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# The contents of this file are subject to the terms of the
09bd86d0db1114ee23eda0a6eb76ca055877a1cftrawick# Common Development and Distribution License (the "License").
09bd86d0db1114ee23eda0a6eb76ca055877a1cftrawick# You may not use this file except in compliance with the License.
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# See the License for the specific language governing permissions
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# and limitations under the License.
e3838a090d22197ee5f0d2c10b5a3d5e6f550f6erbb# When distributing Covered Code, include this CDDL HEADER in each
91a71946d0fb28c0866139edef3dd59f36ba5b9cstoddard# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
91a71946d0fb28c0866139edef3dd59f36ba5b9cstoddard# If applicable, add the following below this CDDL HEADER, with the
91a71946d0fb28c0866139edef3dd59f36ba5b9cstoddard# fields enclosed by brackets "[]" replaced with your own identifying
91a71946d0fb28c0866139edef3dd59f36ba5b9cstoddard# information: Portions Copyright [yyyy] [name of copyright owner]
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb# CDDL HEADER END
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
632b0b53511f3bb9c32aa2869fbc73ee35081b38rbb# Use is subject to license terms.
632b0b53511f3bb9c32aa2869fbc73ee35081b38rbb#ident "%Z%%M% %I% %E% SMI"
b7663b97a437dc089ac7a1a9ebd42e0c372a48b6gstein# NOTE: When a change is made to the source file for
b7663b97a437dc089ac7a1a9ebd42e0c372a48b6gstein# /etc/minor_perm, a corresponding change must be made to
b7663b97a437dc089ac7a1a9ebd42e0c372a48b6gstein# this class-action script.
369edcdd0a9c5516c61e736ec2a6fc8fb0d92fe2manoj# - If an existing entry in minor_perm is having its
369edcdd0a9c5516c61e736ec2a6fc8fb0d92fe2manoj# attributes e.g. permissions, ownership changed,
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# add it to the list produced by make_chattr_list below.
85cbdc16ac57fa68ce1358a308269abcd417f4d9stoddard# - If an existing entry must be deleted, add it to
85cbdc16ac57fa68ce1358a308269abcd417f4d9stoddard# the list produced by make_delete_list below.
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard# - If a new entry must be added to the file, add it to the
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard# list produced by make_add_list.
10b386767f6c87b45937244371cb751f0b454d16wrowe# - If a new entry is being added to minor_perm, but there
10b386767f6c87b45937244371cb751f0b454d16wrowe# may already be devices of that name on the system (e.g.
75960f20f88dad6bc67892c711c429946063d133stoddard# we used the system default permissions in a previous release),
75960f20f88dad6bc67892c711c429946063d133stoddard# and those old devices now need to have their attributes changed,
75960f20f88dad6bc67892c711c429946063d133stoddard# add it to the make_chattr_list AND the make_add_list lists
75960f20f88dad6bc67892c711c429946063d133stoddard# If an entry in /etc/minor_perm needs to have its attributes
10b386767f6c87b45937244371cb751f0b454d16wrowe# changed, identify the entry in the list copied to /etc/chattr.$$
10b386767f6c87b45937244371cb751f0b454d16wrowe# by this function. The fields are:
10b386767f6c87b45937244371cb751f0b454d16wrowe# <device>:<minor> <old_attrs> <new_attrs> <optional list of logical
10b386767f6c87b45937244371cb751f0b454d16wrowe# devices whose attributes
10b386767f6c87b45937244371cb751f0b454d16wrowe# will need to be changed>
10b386767f6c87b45937244371cb751f0b454d16wrowe# where an <attribute list> := <perm> <user> <group>
10b386767f6c87b45937244371cb751f0b454d16wrowe# NOTE: this list should also contain entries for nodes that previously
10b386767f6c87b45937244371cb751f0b454d16wrowe# were not in /etc/minor_perm (which means the default mode of 600,
2a6c49cfaef5979a5a06098f3ce987cd76769409manojcat > /tmp/chattr.$$ << EOF
8bed76428f56e5c643174a2d6807c3f18016af5cbjhvol:volctl 0600 root sys 0666 root sys /dev/volctl
8bed76428f56e5c643174a2d6807c3f18016af5cbjhclone:llc1 0600 root sys 0666 root sys /dev/llc1
8bed76428f56e5c643174a2d6807c3f18016af5cbjhclone:sound,sbpro 0666 root sys 0600 root sys /dev/sound/*
8bed76428f56e5c643174a2d6807c3f18016af5cbjhsbpro:* 0666 root sys 0600 root sys /dev/sound/*
8bed76428f56e5c643174a2d6807c3f18016af5cbjhlog:conslog 0620 root sys 0666 root sys /dev/conslog
cfc020d6d6fc9b31d8945915e65a8787a796eb73stoddardsy:tty 0666 root sys 0666 root tty /dev/tty
cfc020d6d6fc9b31d8945915e65a8787a796eb73stoddardicmp:icmp 0600 root sys 0666 root sys /dev/rawip
cfc020d6d6fc9b31d8945915e65a8787a796eb73stoddardicmp6:icmp6 0600 root sys 0666 root sys /dev/rawip6
f824925ac58ff729289c017235eeb3bdd21ec3a2stoddardip:ip 0660 root sys 0666 root sys /dev/ip
f824925ac58ff729289c017235eeb3bdd21ec3a2stoddardip6:ip6 0660 root sys 0666 root sys /dev/ip6
f824925ac58ff729289c017235eeb3bdd21ec3a2stoddardrts:rts 0660 root sys 0666 root sys /dev/rts
f824925ac58ff729289c017235eeb3bdd21ec3a2stoddardkeysock:keysock 0600 root sys 0666 root sys /dev/keysock
2aae6faee508221efbeaba5547ca79b7a20ef047stoddardipsecah:ipsecah 0600 root sys 0666 root sys /dev/ipsecah
2aae6faee508221efbeaba5547ca79b7a20ef047stoddardipsecesp:ipsecesp 0600 root sys 0666 root sys /dev/ipsecesp
10b386767f6c87b45937244371cb751f0b454d16wrowespdsock:spdsock 0600 root sys 0666 root sys /dev/spdsock
10b386767f6c87b45937244371cb751f0b454d16wrowesad:admin 0600 root sys 0666 root sys /dev/sad/admin
10b386767f6c87b45937244371cb751f0b454d16wrowefssnap:ctl 0600 root sys 0666 root sys /dev/fssnapctl
10b386767f6c87b45937244371cb751f0b454d16wrowefssnap:* 0600 root sys 0640 root sys /dev/fssnap/*
10b386767f6c87b45937244371cb751f0b454d16wroweclone:dnet 0600 root sys 0666 root sys /dev/dnet
10b386767f6c87b45937244371cb751f0b454d16wrowednet:* 0600 root sys 0666 root sys /dev/dnet*
10b386767f6c87b45937244371cb751f0b454d16wroweclone:elxl 0600 root sys 0666 root sys /dev/elxl
10b386767f6c87b45937244371cb751f0b454d16wroweelxl:* 0600 root sys 0666 root sys /dev/elxl*
75960f20f88dad6bc67892c711c429946063d133stoddardclone:iprb 0600 root sys 0666 root sys /dev/iprb
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddardiprb:* 0600 root sys 0666 root sys /dev/iprb*
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddardclone:pcelx 0600 root sys 0666 root sys /dev/pcelx
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddardpcelx:* 0600 root sys 0666 root sys /dev/pcelx*
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddardclone:spwr 0600 root sys 0666 root sys /dev/spwr
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddardspwr:* 0600 root sys 0666 root sys /dev/spwr*
56ca30c968906053ae61acb218420667bb58d996rbbcpc:* 0600 root sys 0666 root sys /devices/pseudo/cpc*
56ca30c968906053ae61acb218420667bb58d996rbbipf:* 0600 root sys 0666 root sys /dev/ipf
56ca30c968906053ae61acb218420667bb58d996rbbpfil:* 0600 root sys 0666 root sys /dev/pfil
56ca30c968906053ae61acb218420667bb58d996rbbscsi_vhci:devctl 0600 root sys 0666 root sys /devices/scsi_vhci:devctl
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanojfbt:fbt 0600 root sys 0644 root sys /dev/dtrace/provider/fbt
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanojlockstat:* 0600 root sys 0644 root sys /dev/dtrace/provider/lockstat
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanojprofile:profile 0600 root sys 0644 root sys /dev/dtrace/provider/profile
56ca30c968906053ae61acb218420667bb58d996rbbsdt:sdt 0600 root sys 0644 root sys /dev/dtrace/provider/sdt
0bff2f28ef945280c17099c142126178a78e1e54manojsystrace:systrace 0600 root sys 0644 root sys /dev/dtrace/provider/systrace
0bff2f28ef945280c17099c142126178a78e1e54manojclone:bge 0600 root sys 0666 root sys /dev/bge
0bff2f28ef945280c17099c142126178a78e1e54manojclone:ixgbe 0600 root sys 0666 root sys /dev/ixgbe
1e585ba09ea32272e63c4c39c35491e975d21d98stoddardclone:rge 0600 root sys 0666 root sys /dev/rge
1e585ba09ea32272e63c4c39c35491e975d21d98stoddardclone:xge 0600 root sys 0666 root sys /dev/xge
1e585ba09ea32272e63c4c39c35491e975d21d98stoddardclone:nge 0600 root sys 0666 root sys /dev/nge
1e585ba09ea32272e63c4c39c35491e975d21d98stoddardclone:chxge 0600 root sys 0666 root sys /dev/chxge
1e585ba09ea32272e63c4c39c35491e975d21d98stoddardclone:pcn 0600 root sys 0666 root sys /dev/pcn
1e585ba09ea32272e63c4c39c35491e975d21d98stoddardclone:rtls 0600 root sys 0666 root sys /dev/rtls
1e585ba09ea32272e63c4c39c35491e975d21d98stoddardclone:ath 0600 root sys 0666 root sys /dev/ath
9c09943bad734ebd5c7cc10bd6d63b75c4c6e056stoddardclone:ipw 0600 root sys 0666 root sys /dev/ipw
9c09943bad734ebd5c7cc10bd6d63b75c4c6e056stoddardclone:iwi 0600 root sys 0666 root sys /dev/iwi
9c09943bad734ebd5c7cc10bd6d63b75c4c6e056stoddardclone:iwk 0600 root sys 0666 root sys /dev/iwk
0bff2f28ef945280c17099c142126178a78e1e54manojclone:pcwl 0600 root sys 0666 root sys /dev/pcwl
0bff2f28ef945280c17099c142126178a78e1e54manojclone:pcan 0600 root sys 0666 root sys /dev/pcan
0bff2f28ef945280c17099c142126178a78e1e54manojclone:ral 0600 root sys 0666 root sys /dev/ral
9c09943bad734ebd5c7cc10bd6d63b75c4c6e056stoddardclone:rtw 0600 root sys 0666 root sys /dev/rtw
75960f20f88dad6bc67892c711c429946063d133stoddardclone:wpi 0600 root sys 0666 root sys /dev/wpi
1e585ba09ea32272e63c4c39c35491e975d21d98stoddardclone:afe 0600 root sys 0666 root sys /dev/afe
9c09943bad734ebd5c7cc10bd6d63b75c4c6e056stoddardclone:dmfe 0600 root sys 0666 root sys /dev/dmfe
aa1faea36e4ae357bc603a2337b6adc54f5daec1manojclone:mxfe 0600 root sys 0666 root sys /dev/mxfe
f03d292915be9977eaf74e9be7b0404aec226f84manojbge:* 0600 root sys 0666 root sys /dev/bge*
f03d292915be9977eaf74e9be7b0404aec226f84manojixgbe:* 0600 root sys 0666 root sys /dev/ixgbe*
f03d292915be9977eaf74e9be7b0404aec226f84manojrge:* 0600 root sys 0666 root sys /dev/rge*
aa1faea36e4ae357bc603a2337b6adc54f5daec1manojxge:* 0600 root sys 0666 root sys /dev/xge*
bd929c73ef04789b7183b840d8db6e01d03a4d86rbbnge:* 0600 root sys 0666 root sys /dev/nge*
2a6c49cfaef5979a5a06098f3ce987cd76769409manoje1000g:* 0666 root root 0666 root sys /dev/e1000g*
302dc1f7b3feee23a91ad8f3cf3cb2edd95a557bmanojchxge:* 0600 root sys 0666 root sys /dev/chxge*
302dc1f7b3feee23a91ad8f3cf3cb2edd95a557bmanojpcn:* 0600 root sys 0666 root sys /dev/pcn*
302dc1f7b3feee23a91ad8f3cf3cb2edd95a557bmanojrtls:* 0600 root sys 0666 root sys /dev/rtls*
302dc1f7b3feee23a91ad8f3cf3cb2edd95a557bmanojath:* 0600 root sys 0666 root sys /dev/ath*
ff849e4163ed879288f0df15f78b6c9d278ec804fanfipw:* 0600 root sys 0666 root sys /dev/ipw*
ff849e4163ed879288f0df15f78b6c9d278ec804fanfiwi:* 0600 root sys 0666 root sys /dev/iwi*
9805ac88e1befa6dea11d8513023f150d8f8e807fanfiwk:* 0600 root sys 0666 root sys /dev/iwk*
9805ac88e1befa6dea11d8513023f150d8f8e807fanfpcwl:* 0600 root sys 0666 root sys /dev/pcwl*
9805ac88e1befa6dea11d8513023f150d8f8e807fanfpcan:* 0600 root sys 0666 root sys /dev/pcan*
9805ac88e1befa6dea11d8513023f150d8f8e807fanfral:* 0600 root sys 0666 root sys /dev/ral*
df4a7c143b27b489dd2d865bb3f6668c8420b3a9fanfrtw:* 0600 root sys 0666 root sys /dev/rtw*
c03566fa0156d3a1500a42e4fe539e3e0fc8a11dgsteinwpi:* 0600 root sys 0666 root sys /dev/wpi*
c03566fa0156d3a1500a42e4fe539e3e0fc8a11dgsteinafe:* 0600 root sys 0666 root sys /dev/afe*
c03566fa0156d3a1500a42e4fe539e3e0fc8a11dgsteindmfe:* 0600 root sys 0666 root sys /dev/dmfe*
c03566fa0156d3a1500a42e4fe539e3e0fc8a11dgsteinmxfe:* 0600 root sys 0666 root sys /dev/mxfe*
db3ccce11afac4fc1d4f51a65424412f7480c46cgstein# If an entry in /etc/minor_perm needs to be deleted, identify
db3ccce11afac4fc1d4f51a65424412f7480c46cgstein# the entry in the list copied to /etc/delete.$$ by this function.
db3ccce11afac4fc1d4f51a65424412f7480c46cgstein# The fields are:
93c5cba06b623ebe8e4372e886eece12d9a80c3egstein# <device>:<minor> <optional list of logical devices to be deleted>
93c5cba06b623ebe8e4372e886eece12d9a80c3egsteincat > /tmp/delete.$$ << EOF
2a6c49cfaef5979a5a06098f3ce987cd76769409manojconsfb:consfb
0bff2f28ef945280c17099c142126178a78e1e54manojclone:ipsecah
0bff2f28ef945280c17099c142126178a78e1e54manojclone:ipsecesp
d6b3cb141f0667101c1bca883ad15b383402c93bfieldingclone:keysock
2a6c49cfaef5979a5a06098f3ce987cd76769409manojprofile:profile
2a6c49cfaef5979a5a06098f3ce987cd76769409manojasy:[a-z],cu
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb# If an entry needs to be added to /etc/minor_perm, add the first
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# field of the entry to the list created by this function. The
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# remainder of the entry will be extracted from the /etc/minor_perm
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# in the package being installed, so it is not necessary to supply
f6a6245816cd866361da8c576b1f47c7a54b6610fanfcat > /tmp/add.$$ << EOF
d6b3cb141f0667101c1bca883ad15b383402c93bfieldingdevinfo:devinfo
d6b3cb141f0667101c1bca883ad15b383402c93bfieldingopeneepr:openprom
670734c2ee137c587411795c6f82566c9d3729b7coaricmp6:icmp6
2a6c49cfaef5979a5a06098f3ce987cd76769409manojpool:poolctl
d6b3cb141f0667101c1bca883ad15b383402c93bfieldingsysmsg:msglog
d6b3cb141f0667101c1bca883ad15b383402c93bfieldingsysmsg:sysmsg
d6b3cb141f0667101c1bca883ad15b383402c93bfieldingipsecah:ipsecah
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,
# /etc/minor_perm file. Also, add an entry to the
# currently-installed /etc/minor_perm file.
# the permission/ownership of devices that