ktrace.out unless argument -f is used. We can just unveil(2) that file with read
permissions before the pledge(2) call.
OK deraadt@
-/* $OpenBSD: kdump.c,v 1.133 2017/11/28 15:35:02 guenther Exp $ */
+/* $OpenBSD: kdump.c,v 1.134 2018/08/11 11:01:37 mestre Exp $ */
/*-
* Copyright (c) 1988, 1993
if (argc > optind)
usage();
+ if (unveil(tracefile, "r") == -1)
+ err(1, "unveil");
if (pledge("stdio rpath getpw", NULL) == -1)
err(1, "pledge");