[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ownership of devices



>>>>> Pieter == Pieter Meiring <p.d.meiring [at] sheffield.ac.uk> writes:

>> My /dev directory seems to contain a lot of devices owned by my
>> non-root username. This can't be right can it? What could be
>> causing this to happen?

Pieter> This is a buglet.

Not necessarily. (If you _know_ better, please provide citation where
I can upgrade my background knowledge.) My suspicion is that it is a
truly wizardly hack.

The old way to handle the problem of devices was to have them owned by
root (or some suitable group), provide suid root (sgid suitable group)
binaries, and do file locking to avoid conflicts on multiuser systems.
sgid suitable group is a sys admin nightmare, and in some cases can
still allow DOS[1] attacks. suid root is like ringing the dinner bell
and calling crackers, Come and get it!

An alternative path is to provide _one_ carefully checked out suid
root binary whose _only_ function is to change the ownership of
certain devices to the id of users currently logged in on the console.
Note that this removes the need for file locking. I'm not sure if
this could be done safely via kmod/kerneld, but I don't really see why
not; in that case you would never know.... (Hmmm. If they're not
doing that, maybe I should patent the idea ;-)

Note the devices in question: major 14/35 (audio), major 29 (frame
buffer = graphical console), major 2 (floppy), major 15 (joystick, I
bet), major 4 (tty). I dunno about major 7 (virtual console?), and
major 22 (hdc) is probably the CD-ROM, so a removable device where
non-privy users need to mount.

What do you think, Dr. Watson?

Footnotes:
[1] I still crack up everytime I see that abbreviation, considering
that the core functionality of Windows 9x is still DOS. ;-)

--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
__________________________________________________________________________
What are those two straight lines for? Free software rules.

Start your own FREE mailing list at

&copy; 2000 Microsoft Corporation. All Rights Reserved