[net.unix-wizards] Protecting kmem?

chris.umcp-cs@UDel-Relay (12/30/82)

From:     Chris Torek <chris.umcp-cs@UDel-Relay>
Date:     29 Dec 82 10:04:52 EST  (Wed)
What's so hard about making a new group (we have one called "bin" that
only "bin" is allowed to be in) and making /dev/{{,k}mem,drum} mode
0640, owner root, group bin, and making all the standard programs that
want to read it set-gid to bin?  As long as these programs don't need
to create files you haven't lost anything (the processes are still
killable, unlike what happens if you make 'vmstat' setuid to root, for
example).  Anyone who needs to do funny things can clear them with
those who know the root password.

If the program has to create files then you've got to munge the source;
make the program setuid to root, and have it

	setuid (getuid ());

after it's gotten those critical files opened.  (Or niced itself down
or whatever it is it needs to do.  We have a communications program that
runs in raw mode, doesn't use much CPU, but needs to be around -10 so
that it can come in quickly if it needs to.)
				- Chris