diff options
author | ru <ru@FreeBSD.org> | 2001-08-31 16:26:37 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-08-31 16:26:37 +0000 |
commit | d7e70183dd68ef56c2783038a68fdb3298b7f647 (patch) | |
tree | ab53d2e577c98daad47ff99c85bf950d53a8ed69 /usr.sbin/pstat | |
parent | 336fa381382db82c39a914894286106270b68110 (diff) | |
download | FreeBSD-src-d7e70183dd68ef56c2783038a68fdb3298b7f647.zip FreeBSD-src-d7e70183dd68ef56c2783038a68fdb3298b7f647.tar.gz |
SECURITY: Drop `setgid kmem' bit as early as possible.
Diffstat (limited to 'usr.sbin/pstat')
-rw-r--r-- | usr.sbin/pstat/pstat.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index 595f48a..a635842 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -291,6 +291,7 @@ main(argc, argv) if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, buf)) == 0) errx(1, "kvm_openfiles: %s", buf); + (void)setgid(getgid()); if ((ret = kvm_nlist(kd, nl)) != 0) { if (ret == -1) errx(1, "kvm_nlist: %s", kvm_geterr(kd)); |