diff options
author | deraadt <deraadt@openbsd.org> | 2019-11-27 17:49:09 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2019-11-27 17:49:09 +0000 |
commit | 7302e9712b89c9c53b91000bf9a5f8eefd59f909 (patch) | |
tree | aa01841cfc9d0e0d7d9bf2ac1c645449a073d5f2 /usr.sbin/tcpdrop | |
parent | OpenFlow 1.3 defines packet header patterns of interest using TLVs (OXMs) (diff) | |
download | wireguard-openbsd-7302e9712b89c9c53b91000bf9a5f8eefd59f909.tar.xz wireguard-openbsd-7302e9712b89c9c53b91000bf9a5f8eefd59f909.zip |
use _PATH_ names for unveil if possible
Diffstat (limited to 'usr.sbin/tcpdrop')
-rw-r--r-- | usr.sbin/tcpdrop/tcpdrop.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/tcpdrop/tcpdrop.c b/usr.sbin/tcpdrop/tcpdrop.c index 2156076d477..63d6ea1c1fa 100644 --- a/usr.sbin/tcpdrop/tcpdrop.c +++ b/usr.sbin/tcpdrop/tcpdrop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcpdrop.c,v 1.18 2018/11/08 07:14:37 mestre Exp $ */ +/* $OpenBSD: tcpdrop.c,v 1.19 2019/11/27 17:49:09 deraadt Exp $ */ /* * Copyright (c) 2004 Markus Friedl <markus@openbsd.org> @@ -32,6 +32,7 @@ #include <string.h> #include <stdlib.h> #include <unistd.h> +#include <resolv.h> __dead void usage(void); @@ -63,9 +64,9 @@ main(int argc, char **argv) struct tcp_ident_mapping tir; int gaierr, rval = 0; - if (unveil("/etc/hosts", "r") == -1) + if (unveil(_PATH_HOSTS, "r") == -1) err(1, "unveil"); - if (unveil("/etc/resolv.conf", "r") == -1) + if (unveil(_PATH_RESCONF, "r") == -1) err(1, "unveil"); if (unveil(NULL, NULL) == -1) err(1, "unveil"); |