summaryrefslogtreecommitdiff
path: root/sbin/pflogd/privsep.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-11-27 17:49:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-11-27 17:49:10 +0000
commit7da25acdf9eff8df0a91528dd6c6660833a654fa (patch)
tree2ee34533549125348129e68ef50bba314e5e031c /sbin/pflogd/privsep.c
parent009ad2bc01a6adf57f7d7db01a16a67babc5485a (diff)
use _PATH_ names for unveil if possible
Diffstat (limited to 'sbin/pflogd/privsep.c')
-rw-r--r--sbin/pflogd/privsep.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/pflogd/privsep.c b/sbin/pflogd/privsep.c
index 36cc0395f1d..a1c109005cf 100644
--- a/sbin/pflogd/privsep.c
+++ b/sbin/pflogd/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.33 2019/06/28 13:32:45 deraadt Exp $ */
+/* $OpenBSD: privsep.c,v 1.34 2019/11/27 17:49:09 deraadt Exp $ */
/*
* Copyright (c) 2003 Can Erkin Acar
@@ -37,6 +37,8 @@
#include <string.h>
#include <syslog.h>
#include <unistd.h>
+#include <netdb.h>
+#include <resolv.h>
#include "pflogd.h"
enum cmd_types {
@@ -131,11 +133,11 @@ priv_init(int Pflag, int argc, char *argv[])
setproctitle("[priv]");
- if (unveil("/etc/resolv.conf", "r") == -1)
+ if (unveil(_PATH_RESCONF, "r") == -1)
err(1, "unveil");
- if (unveil("/etc/hosts", "r") == -1)
+ if (unveil(_PATH_HOSTS, "r") == -1)
err(1, "unveil");
- if (unveil("/etc/services", "r") == -1)
+ if (unveil(_PATH_SERVICES, "r") == -1)
err(1, "unveil");
if (unveil("/dev/bpf", "r") == -1)
err(1, "unveil");