Synopsis: Fixed security problem in netstat
NetBSD versions: NetBSD-current from 19980603 to 19990208
Thanks to: Michael Graff, Charles Hannum.
Reported in NetBSD Security Advisory: SA1999-002
***************
*** 354,360 ****
* from kernel memory, otherwise switch back to kmem for the
* duration of the kvm_openfiles() call.
*/
! if (nlistf != NULL || memf != NULL)
(void)setgid(getgid());
else
(void)setegid(egid);
--- 354,360 ----
* from kernel memory, otherwise switch back to kmem for the
* duration of the kvm_openfiles() call.
*/
! if (nlistf != NULL || memf != NULL || Pflag)
(void)setgid(getgid());
else
(void)setegid(egid);