summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/apmd/apmd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index f5206568959..ae8cef32be8 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmd.c,v 1.99 2020/09/28 21:35:14 jca Exp $ */
+/* $OpenBSD: apmd.c,v 1.100 2021/03/11 18:12:41 kn Exp $ */
/*
* Copyright (c) 1995, 1996 John T. Kohl
@@ -490,6 +490,11 @@ main(int argc, char *argv[])
if (statonly)
exit(0);
+ if (unveil(_PATH_APM_ETC_DIR, "rx") == -1)
+ err(1, "unveil");
+ if (unveil(NULL, NULL) == -1)
+ err(1, "unveil");
+
set_driver_messages(ctl_fd, APM_PRINT_OFF);
kq = kqueue();