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/trpt/trpt.c | |
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/trpt/trpt.c')
-rw-r--r-- | usr.sbin/trpt/trpt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/trpt/trpt.c b/usr.sbin/trpt/trpt.c index aacd75d..98fd673 100644 --- a/usr.sbin/trpt/trpt.c +++ b/usr.sbin/trpt/trpt.c @@ -164,6 +164,7 @@ main(argc, argv) errx(1, "%s: no namelist", system); if ((memf = open(core, O_RDONLY)) < 0) err(2, "%s", core); + setgid(getgid()); if (kflag) errx(1, "can't do core files yet"); (void)klseek(memf, (off_t)nl[N_TCP_DEBX].n_value, L_SET); |