diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2018-08-03 14:39:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2018-08-03 14:39:56 +0000 |
commit | 9b79cb630445838d843193620c6e76885c843754 (patch) | |
tree | 25478e994faf2f35b79ff7170231e966e3d528ac | |
parent | 202b87ba2a9bb781f4a11fe851901dd683264c26 (diff) |
unveil _PATH_DEVDB for devname(). All other filenames are opened
before unveil/pledge.
-rw-r--r-- | usr.sbin/pstat/pstat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index e0e3f33d61e..79499d848e9 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pstat.c,v 1.117 2018/06/18 09:15:05 mpi Exp $ */ +/* $OpenBSD: pstat.c,v 1.118 2018/08/03 14:39:55 deraadt Exp $ */ /* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */ /*- @@ -229,6 +229,8 @@ main(int argc, char *argv[]) ttymodeprep(); } + if (unveil(_PATH_DEVDB, "r") == -1) + err(1, "unveil"); if (pledge("stdio rpath vminfo", NULL) == -1) err(1, "pledge"); |