Module Name: src Committed By: martin Date: Sun Sep 13 12:00:46 UTC 2020
Modified Files: src/usr.bin/sockstat [netbsd-9]: Makefile sockstat.c Log Message: Pull up following revision(s) (requested by kim in ticket #1079): usr.bin/sockstat/sockstat.c: revision 1.22 usr.bin/sockstat/Makefile: revision 1.5 usr.bin/sockstat/Makefile: revision 1.6 RR/54971: scole_mail: sockstat command output incorrect for normal user As the PR hints, it is not enough to have kern.expose_address=1 to see kernel addresses, we also need to have the PK_KMEM bit set which we achieve by installing sockstat setgid kmem and opening and closing /dev/mem. (/usr/src/sys/kern/kern_proc.c:311). It is unfortunate that we need to give the program more privilege, to prove to the kernel that we have the privilege to see the data. turn on fortify since it is setgid (from scole_mail) To generate a diff of this commit: cvs rdiff -u -r1.3.46.1 -r1.3.46.2 src/usr.bin/sockstat/Makefile cvs rdiff -u -r1.20.2.1 -r1.20.2.2 src/usr.bin/sockstat/sockstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.