diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-06 03:27:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-06 03:27:26 +0000 |
commit | 0720ed4f287e472de81216adacebdb32089beac5 (patch) | |
tree | f27c6ed5794577c1857d8377359185f6802dcd14 /usr.bin/kdump | |
parent | c2dac04b51824dc65ca73d0c0446cd407d0507e2 (diff) |
tame "stdio getpw"
discussed with guenther
Diffstat (limited to 'usr.bin/kdump')
-rw-r--r-- | usr.bin/kdump/kdump.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 809cecd80e9..a74ca70d587 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kdump.c,v 1.111 2015/10/03 23:52:30 guenther Exp $ */ +/* $OpenBSD: kdump.c,v 1.112 2015/10/06 03:27:25 deraadt Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -249,6 +249,10 @@ main(int argc, char *argv[]) err(1, NULL); if (!freopen(tracefile, "r", stdin)) err(1, "%s", tracefile); + + if (tame("stdio getpw", NULL) == -1) + err(1, "tame"); + if (fread_tail(&ktr_header, sizeof(struct ktr_header), 1) == 0 || ktr_header.ktr_type != htobe32(KTR_START)) errx(1, "%s: not a dump", tracefile); |