Date: Fri, 16 Feb 2001 21:18:00 +0100 From: Thomas Moestl <tmoestl@gmx.net> To: freebsd-audit@freebsd.org Subject: Another set of setgid kmem removing patches Message-ID: <20010216211800.A3084@crow.dom2ip.de>
next in thread | raw e-mail | index | archive | help
Hi, here are some more patches to remove setgid kmem, this time from vmstat and iostat. Both vmstat and iostat use now sysctls by default to get all needed information, but will also fully work on crash dumps once again. Both use libdevstat, so this also has been patched to allow fetching all needed data via kvm calls. To accomplish this, two new functions, devstat_setkd and devstat_setfiles, have been added to the interface to set a kvm descriptor or core and/or symbol files respectively. If the handle is non-NULL/the file name pointers are non-NULL, all data will be fetched via kvm in subsequent calls. The default is the old behaviour (using sysctls only). Because any program that links to libdevstat now also needs to link to libkvm the libdevstat major version needed to be bumped (it is 3 now). I'll send this diff to Ken (who is listed as the maintainer) soon (Ken, if you are reading this, please comment on the patch). There is also another kernel diff, this one adds the vm.malloc.buckets, vm.malloc.stats, kern.tk_nin (tty input stats), kern.tk_nout (tty output stats) and vm.zonestats sysctls. It also moves some structure declarations out of #ifdef KERNEL to make them useable for the new kvm stuff. There is also a one-line diff for vinum (the only program in the src/ that linked to libdevstat, but not to libkvm) that adds a simple -lkvm to the Makefile. The new diffs are at: vmstat: http://www.tu-bs.de/~y0015675/vmstat.diff iostat: http://www.tu-bs.de/~y0015675/iostat.diff vinum: http://www.tu-bs.de/~y0015675/vinum.diff libdevstat: http://www.tu-bs.de/~y0015675/libdevstat.diff kernel: http://www.tu-bs.de/~y0015675/sysctl5.diff The previously posted patches are at: http://www.tu-bs.de/~y0015675/sysctl4.diff http://www.tu-bs.de/~y0015675/dmesg.diff http://www.tu-bs.de/~y0015675/sysctl3.diff http://www.tu-bs.de/~y0015675/systat.diff http://www.tu-bs.de/~y0015675/sysctl2.diff http://www.tu-bs.de/~y0015675/top.diff http://www.tu-bs.de/~y0015675/libkvm.diff http://www.tu-bs.de/~y0015675/sysctl.diff Please review and comment. Thanks, - thomas To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010216211800.A3084>