i.minorperm_i386 revision 9acbbeaf2a1ffe5c14b244867d427714fab43c5c
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews# CDDL HEADER START
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# The contents of this file are subject to the terms of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Common Development and Distribution License (the "License").
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You may not use this file except in compliance with the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# When distributing Covered Code, include this CDDL HEADER in each
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If applicable, add the following below this CDDL HEADER, with the
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# information: Portions Copyright [yyyy] [name of copyright owner]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER END
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Use is subject to license terms.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#ident "%Z%%M% %I% %E% SMI"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# NOTE: When a change is made to the source file for
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews# /etc/minor_perm, a corresponding change must be made to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# this class-action script.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# - If an existing entry in minor_perm is having its
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# attributes e.g. permissions, ownership changed,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# add it to the list produced by make_chattr_list below.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# - If an existing entry must be deleted, add it to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# the list produced by make_delete_list below.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# - If a new entry must be added to the file, add it to the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# list produced by make_add_list.
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews# - If a new entry is being added to minor_perm, but there
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# may already be devices of that name on the system (e.g.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# we used the system default permissions in a previous release),
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and those old devices now need to have their attributes changed,
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox User# add it to the make_chattr_list AND the make_add_list lists
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox User# If an entry in /etc/minor_perm needs to have its attributes
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# changed, identify the entry in the list copied to /etc/chattr.$$
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# by this function. The fields are:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# <device>:<minor> <old_attrs> <new_attrs> <optional list of logical
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox User# devices whose attributes
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# will need to be changed>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# where an <attribute list> := <perm> <user> <group>
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews# NOTE: this list should also contain entries for nodes that previously
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# were not in /etc/minor_perm (which means the default mode of 600,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# owner/group == root/sys), but now have an entry
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinvol:volctl 0600 root sys 0666 root sys /dev/volctl
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclone:llc1 0600 root sys 0666 root sys /dev/llc1
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclone:sound,sbpro 0666 root sys 0600 root sys /dev/sound/*
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinsbpro:* 0666 root sys 0600 root sys /dev/sound/*
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinlog:conslog 0620 root sys 0666 root sys /dev/conslog
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinsy:tty 0666 root sys 0666 root tty /dev/tty
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox Usericmp:icmp 0600 root sys 0666 root sys /dev/rawip
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinicmp6:icmp6 0600 root sys 0666 root sys /dev/rawip6
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrewsip:ip 0660 root sys 0666 root sys /dev/ip
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinip6:ip6 0660 root sys 0666 root sys /dev/ip6
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinrts:rts 0660 root sys 0666 root sys /dev/rts
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinkeysock:keysock 0600 root sys 0666 root sys /dev/keysock
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinipsecah:ipsecah 0600 root sys 0666 root sys /dev/ipsecah
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinipsecesp:ipsecesp 0600 root sys 0666 root sys /dev/ipsecesp
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinspdsock:spdsock 0600 root sys 0666 root sys /dev/spdsock
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinsad:admin 0600 root sys 0666 root sys /dev/sad/admin
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinfssnap:ctl 0600 root sys 0666 root sys /dev/fssnapctl
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox Userfssnap:* 0600 root sys 0640 root sys /dev/fssnap/*
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclone:dnet 0600 root sys 0666 root sys /dev/dnet
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeindnet:* 0600 root sys 0666 root sys /dev/dnet*
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclone:elxl 0600 root sys 0666 root sys /dev/elxl
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinelxl:* 0600 root sys 0666 root sys /dev/elxl*
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrewsclone:iprb 0600 root sys 0666 root sys /dev/iprb
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeiniprb:* 0600 root sys 0666 root sys /dev/iprb*
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclone:pcelx 0600 root sys 0666 root sys /dev/pcelx
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinpcelx:* 0600 root sys 0666 root sys /dev/pcelx*
12351e0500dff39f56844401fd191a36bcc4a7adMark Andrewsclone:spwr 0600 root sys 0666 root sys /dev/spwr
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinspwr:* 0600 root sys 0666 root sys /dev/spwr*
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeincpc:* 0600 root sys 0666 root sys /devices/pseudo/cpc*
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinipf:* 0600 root sys 0666 root sys /dev/ipf
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinpfil:* 0600 root sys 0666 root sys /dev/pfil
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinscsi_vhci:devctl 0600 root sys 0666 root sys /devices/scsi_vhci:devctl
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinfbt:fbt 0600 root sys 0644 root sys /dev/dtrace/provider/fbt
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinlockstat:* 0600 root sys 0644 root sys /dev/dtrace/provider/lockstat
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinprofile:profile 0600 root sys 0644 root sys /dev/dtrace/provider/profile
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinsdt:sdt 0600 root sys 0644 root sys /dev/dtrace/provider/sdt
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinsystrace:systrace 0600 root sys 0644 root sys /dev/dtrace/provider/systrace
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If an entry in /etc/minor_perm needs to be deleted, identify
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# the entry in the list copied to /etc/delete.$$ by this function.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The fields are:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# <device>:<minor> <optional list of logical devices to be deleted>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinconsfb:consfb
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclone:ipsecah
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclone:ipsecesp
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclone:keysock
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinprofile:profile
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If an entry needs to be added to /etc/minor_perm, add the first
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# field of the entry to the list created by this function. The
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# remainder of the entry will be extracted from the /etc/minor_perm
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# in the package being installed, so it is not necessary to supply
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeincat > /tmp/add.$$ << EOF
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