[comp.sys.sun] /dev/audio permissions...

rhoward@msd.gatech.edu (Robert L. Howard) (02/02/91)

I am interested in finding out how you can restrict writing to /dev/audio
(and thus use of play, soundtool, etc.).  It would be nice if permissions
were restricted to the user that is logged on to the console (under X, OW,
SunView...) so that you couldn't be bothered by some
{ignorant,inconsiderate,malicious} person telnetted in running 'play' or
doing a 'cat > /dev/audio.

Is this some configuration kind of thing or would I need to do something
like hack 'login'?  If a hack is required I would need some help as I
don't have source (not to mention questionable skill).

| Robert L. Howard             |    Georgia Tech Research Institute     |
| rhoward@msd.gatech.edu       |    MATD Laboratory                     |
| (404) 528-7165               |    Atlanta, Georgia  30332             |

rhoward@msd.gatech.edu (Robert L. Howard) (02/19/91)

My original post:

--I am interested in finding out how you can restrict writing to /dev/audio
--(and thus use of play, soundtool, etc.).  It would be nice if permissions
--were restricted to the user that is logged on to the console .....
:
--Is this some configuration kind of thing or would I need to do something
--like hack 'login'?

I failed to mention that I was running SunOS 4.1.1.  Fortunately the
replies I got were appropriate....

The answer is (from a typical reply):

X-From: Ed Anselmo <anselmo-ed@CS.YALE.EDU>

Under SunOS 4.1 and 4.1.1 you could add an entry for /dev/audio into
/etc/fbtab, which controls the permissions on various devices
(framebuffers, /dev/kbd, /dev/mouse) based on which tty the user is logged
in on, e.g.

/dev/console	0600	/dev/kbd:/dev/mouse 

sets the perms on /dev/kbd and /dev/mouse to 600 (owned by the user)
whenever someone is logged in on the console.

Many thanks to all who responded (listed below):

	ang@theory.lcs.mit.edu (William Ang)
	tar@math.ksu.edu (Tim Ramsey)
	grw@Eng.Sun.COM (Gregory Whitehead)
	Claus Assmann <ca%idefix.informatik.uni-kiel.dbp.de@RELAY.CS.NET>
	Ed Anselmo <anselmo-ed@CS.YALE.EDU>
	Tad Guy <tadguy@abcfd01.larc.nasa.gov>
	Joe P. DeCello <jpd@tardis.cl.msu.edu>
	guy@auspex.com (Guy Harris)
	bk@analytikerna.se (Bengt KLEBERG)
	Ian Angles <ia@st-andrews.ac.uk>
	ssd@engr.ucf.edu (Steven S. Dick)
	"Mark D. Baushke" <mdb@ESD.3Com.COM>

Thanks again,

| Robert L. Howard             |    Georgia Tech Research Institute     |
| rhoward@msd.gatech.edu       |    MATD Laboratory                     |
| (404) 528-7165               |    Atlanta, Georgia  30332             |