Subject: Re: Xserver and Unsupported keyboard type: Solved!
To: Gordon W. Ross <gwr@mc.com>
From: David Brownlee <D.K.Brownlee@city.ac.uk>
List: port-sun3
Date: 08/11/1995 17:19:30
On Wed, 9 Aug 1995, Gordon W. Ross wrote:

> > Reply-To: jtc@cygnus.com
> > Date: Wed, 09 Aug 1995 10:34:27 -0700
> > 
> > I solved my Unsupported keyboard type problem last night.  The
> > permissions on /dev/kbd were too restrictive for the Xserver to open
> > read/write.  The -current MAKEDEV script changes the mode of /dev/kbd
> > to 0666, which allowed the X server to start.
> 
> Ah!  Interesting.
> 
> > But I wonder if wide open permissions are wise.  Can't the proverbial
> > "bad guy" open up /dev/kbd and intercept keystrokes?
> 
> I guess we could make /dev/kbd and /dev/mouse (0600 root) and
> make the X server SUID root.  The only problem is, I'm not sure
> the X server is designed for SUID root use, so one could end up
> opening an even larger security hole...
> 
> Is there any way to make the kbd/ms drivers insist on the opening
> process having the same UID as the process group in the kd driver?
> The device nodes for kbd and ms could stay at 0666 then...
> 
	You could have a 'console' group and chgrp the X server & /dev/kbd
	and /dev/mouse to console and make the server setgid... means then
	there is no other security given away (setuid root would stop me
	sleeping at night :)	(file perms would be 660 as well).

	To take it to the logical extreme - chgrp & chmod the framebuffers
	as well...

	Or maybe chown /dev/{kbd,mouse,cg?,bw?} to whoever logs into 
	/dev/console in a similar way to how ttys are chowned...

	How does sunos or the other versions of NetBSD handle this?

		abs

 D.K.Brownlee@city.ac.uk (MIME) +44 171 477 8186  {post,host}master  (abs)
Network Analyst, UCS, City University, Northampton Square, London EC1V 0HB.
   <<< Monochrome - Largest UK Internet BBS - telnet mono.city.ac.uk >>>