lepreau%utah-cs@sri-unix.UUCP (11/25/83)
From: Jay Lepreau <lepreau@utah-cs> I seem to remember doing this about a year ago too. Well, we run with 600 kmem/mem here, and here's the list of pgms which need to read it. We make them setgid. Note that if you have a 4.1 or below system setgid pgms are not safe, and they should be setuid something: try to avoid root. Note: rogue should be included (in order to get the load avg), but is not cause as distributed with 4.2 it doesn't work anyway, cause rogue resets the gid right after opening the score file, and never again. #! /bin/csh -f set d = /usr/ucb set pgms = (/etc/dmesg /etc/pstat /etc/trpt /bin/ps /usr/bin/iostat \ /usr/new/dbid /usr/local/filepos /usr/local/lib/emacs/loadst \ $d/gcore $d/gprof $d/netstat $d/sysline $d/w $d/vmstat) /etc/chown root $pgms chgrp MEM $pgms chmod 2755 $pgms chgrp MEM /dev/mem /dev/kmem chmod 640 /dev/mem /dev/kmem ls -lg /dev/mem /dev/kmem $pgms ================================ Here's the complete list. Those preceded by '-' we didn't make setgid cause only root needs to run them. kgmon is questionable. ==== /etc dmesg: -ethermap: -kgmon: pstat: -route: -routed: -rwhod: -savecore: trpt: ==== /bin ps: ==== /usr/bin iostat: ==== /usr/ucb gcore: gprof: netstat: sysline: uptime/w: vmstat: ==== /usr/local filepos: -setuid: ==== /usr/new dbid: ==== /usr/local/lib/emacs loadst: ==== /usr/games rogue
Lepreau@UTAH-20.ARPA (11/25/83)
From: Jay Lepreau <Lepreau@UTAH-20.ARPA> I meant mode 640, of course. -------