Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!security!genrad!mit-eddie!mit-vax!eagle!harpo!seismo!hao!hplabs!sri-unix!lepreau@utah-cs From: lepreau%utah-cs@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: 4.2 programs which need to read kmem Message-ID: <13795@sri-arpa.UUCP> Date: Fri, 25-Nov-83 00:12:26 EST Article-I.D.: sri-arpa.13795 Posted: Fri Nov 25 00:12:26 1983 Date-Received: Mon, 21-Nov-83 01:15:57 EST Lines: 58 From: Jay Lepreau 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