diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/dhclient.c | 6 | ||||
-rw-r--r-- | sbin/dhcpleased/dhcpleased.c | 4 | ||||
-rw-r--r-- | sbin/dhcpleased/engine.c | 6 | ||||
-rw-r--r-- | sbin/dhcpleased/frontend.c | 6 | ||||
-rw-r--r-- | sbin/fsck/fsck.c | 8 | ||||
-rw-r--r-- | sbin/fsck_ffs/setup.c | 4 | ||||
-rw-r--r-- | sbin/fsck_msdos/check.c | 4 | ||||
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 10 | ||||
-rw-r--r-- | sbin/nologin/nologin.c | 4 | ||||
-rw-r--r-- | sbin/pflogd/privsep.c | 12 | ||||
-rw-r--r-- | sbin/ping/ping.c | 4 | ||||
-rw-r--r-- | sbin/shutdown/shutdown.c | 18 | ||||
-rw-r--r-- | sbin/slaacd/engine.c | 6 | ||||
-rw-r--r-- | sbin/slaacd/frontend.c | 6 | ||||
-rw-r--r-- | sbin/sysctl/sysctl.c | 6 | ||||
-rw-r--r-- | sbin/unwind/resolver.c | 4 |
16 files changed, 54 insertions, 54 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 993c829f2d2..8cda5c69753 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.722 2021/05/02 19:16:48 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.723 2021/07/12 15:09:18 beck Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -2334,9 +2334,9 @@ fork_privchld(struct interface_info *ifi, int fd, int fd2) fatal("socket(AF_ROUTE, SOCK_RAW)"); if (unveil(_PATH_RESCONF, "wc") == -1) - fatal("unveil"); + fatal("unveil %s", _PATH_RESCONF); if (unveil("/etc/resolv.conf.tail", "r") == -1) - fatal("unveil"); + fatal("unveil /etc/resolve.conf.tail"); if (unveil(NULL, NULL) == -1) fatal("unveil"); diff --git a/sbin/dhcpleased/dhcpleased.c b/sbin/dhcpleased/dhcpleased.c index d5aca108549..2157406e71a 100644 --- a/sbin/dhcpleased/dhcpleased.c +++ b/sbin/dhcpleased/dhcpleased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpleased.c,v 1.13 2021/06/20 08:31:45 florian Exp $ */ +/* $OpenBSD: dhcpleased.c,v 1.14 2021/07/12 15:09:18 beck Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org> @@ -274,7 +274,7 @@ main(int argc, char *argv[]) } if (unveil(NULL, NULL) == -1) - fatal("locking unveil"); + fatal("unveil"); #if notyet if (pledge("stdio inet rpath wpath sendfd wroute bpf", NULL) == -1) fatal("pledge"); diff --git a/sbin/dhcpleased/engine.c b/sbin/dhcpleased/engine.c index dfe2a1b15e8..ad8202c9a33 100644 --- a/sbin/dhcpleased/engine.c +++ b/sbin/dhcpleased/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.17 2021/06/20 08:31:45 florian Exp $ */ +/* $OpenBSD: engine.c,v 1.18 2021/07/12 15:09:18 beck Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org> @@ -182,9 +182,9 @@ engine(int debug, int verbose) fatal("chdir(\"/\")"); if (unveil("/", "") == -1) - fatal("unveil(\"/\", \"\")"); + fatal("unveil /"); if (unveil(NULL, NULL) == -1) - fatal("unveil(NULL, NULL)"); + fatal("unveil"); setproctitle("%s", "engine"); log_procinit("engine"); diff --git a/sbin/dhcpleased/frontend.c b/sbin/dhcpleased/frontend.c index 456c0ec5226..1e5284eaf13 100644 --- a/sbin/dhcpleased/frontend.c +++ b/sbin/dhcpleased/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.12 2021/06/16 14:08:38 florian Exp $ */ +/* $OpenBSD: frontend.c,v 1.13 2021/07/12 15:09:18 beck Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org> @@ -138,9 +138,9 @@ frontend(int debug, int verbose) fatal("chdir(\"/\")"); if (unveil("/", "") == -1) - fatal("unveil(\"/\", \"\")"); + fatal("unveil /"); if (unveil(NULL, NULL) == -1) - fatal("unveil(NULL, NULL)"); + fatal("unveil"); setproctitle("%s", "frontend"); log_procinit("frontend"); diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c index 09475f346d3..19e730a484f 100644 --- a/sbin/fsck/fsck.c +++ b/sbin/fsck/fsck.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsck.c,v 1.40 2019/06/28 13:32:43 deraadt Exp $ */ +/* $OpenBSD: fsck.c,v 1.41 2021/07/12 15:09:18 beck Exp $ */ /* $NetBSD: fsck.c,v 1.7 1996/10/03 20:06:30 christos Exp $ */ /* @@ -110,11 +110,11 @@ main(int argc, char *argv[]) checkroot(); if (unveil("/dev", "rw") == -1) - err(1, "unveil"); + err(1, "unveil /dev"); if (unveil(_PATH_FSTAB, "r") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_FSTAB); if (unveil("/sbin", "x") == -1) - err(1, "unveil"); + err(1, "unveil /sbin"); if (pledge("stdio rpath wpath disklabel proc exec", NULL) == -1) err(1, "pledge"); diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c index e9c922d7c37..42c27f4fdbc 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: setup.c,v 1.67 2020/06/20 07:49:04 otto Exp $ */ +/* $OpenBSD: setup.c,v 1.68 2021/07/12 15:09:18 beck Exp $ */ /* $NetBSD: setup.c,v 1.27 1996/09/27 22:45:19 christos Exp $ */ /* @@ -105,7 +105,7 @@ setup(char *dev, int isfsdb) if (isfsdb || !hotroot()) { if (unveil("/dev", "rw") == -1) - err(1, "unveil"); + err(1, "unveil /dev"); if (pledge("stdio rpath wpath getpw tty disklabel", NULL) == -1) err(1, "pledge"); diff --git a/sbin/fsck_msdos/check.c b/sbin/fsck_msdos/check.c index 4a2f07f1131..173458cc097 100644 --- a/sbin/fsck_msdos/check.c +++ b/sbin/fsck_msdos/check.c @@ -1,4 +1,4 @@ -/* $OpenBSD: check.c,v 1.20 2019/06/28 13:32:43 deraadt Exp $ */ +/* $OpenBSD: check.c,v 1.21 2021/07/12 15:09:18 beck Exp $ */ /* $NetBSD: check.c,v 1.8 1997/10/17 11:19:29 ws Exp $ */ /* @@ -55,7 +55,7 @@ checkfilesys(const char *fname) int mod = 0; if (unveil("/dev", "rw") == -1) - err(1, "unveil"); + err(1, "unveil /dev"); rdonly = alwaysno; diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 20b68c1f95d..7d86e887561 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.443 2021/07/04 19:22:32 sthen Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.444 2021/07/12 15:09:18 beck Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -773,7 +773,7 @@ main(int argc, char *argv[]) if (argc < 2) { /* no filesystem visibility */ if (unveil("/", "") == -1) - err(1, "unveil"); + err(1, "unveil /"); if (unveil(NULL, NULL) == -1) err(1, "unveil"); aflag = 1; @@ -827,11 +827,11 @@ main(int argc, char *argv[]) if (!found_rulefile) { if (unveil(_PATH_RESCONF, "r") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_RESCONF); if (unveil(_PATH_HOSTS, "r") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_HOSTS); if (unveil(_PATH_SERVICES, "r") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_SERVICES); if (unveil(NULL, NULL) == -1) err(1, "unveil"); } diff --git a/sbin/nologin/nologin.c b/sbin/nologin/nologin.c index 88bdd5f6fd7..81973926888 100644 --- a/sbin/nologin/nologin.c +++ b/sbin/nologin/nologin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nologin.c,v 1.8 2019/06/28 13:32:45 deraadt Exp $ */ +/* $OpenBSD: nologin.c,v 1.9 2021/07/12 15:09:19 beck Exp $ */ /* * Copyright (c) 1997, Jason Downs. All rights reserved. @@ -47,7 +47,7 @@ main(int argc, char *argv[]) char nbuf[BUFSIZ]; if (unveil(_PATH_NOLOGIN_TXT, "r") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_NOLOGIN_TXT); if (pledge("stdio rpath", NULL) == -1) err(1, "pledge"); diff --git a/sbin/pflogd/privsep.c b/sbin/pflogd/privsep.c index a1c109005cf..c89064d3e53 100644 --- a/sbin/pflogd/privsep.c +++ b/sbin/pflogd/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.34 2019/11/27 17:49:09 deraadt Exp $ */ +/* $OpenBSD: privsep.c,v 1.35 2021/07/12 15:09:19 beck Exp $ */ /* * Copyright (c) 2003 Can Erkin Acar @@ -134,15 +134,15 @@ priv_init(int Pflag, int argc, char *argv[]) setproctitle("[priv]"); if (unveil(_PATH_RESCONF, "r") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_RESCONF); if (unveil(_PATH_HOSTS, "r") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_HOSTS); if (unveil(_PATH_SERVICES, "r") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_SERVICES); if (unveil("/dev/bpf", "r") == -1) - err(1, "unveil"); + err(1, "unveil /dev/bpf"); if (unveil(filename, "rwc") == -1) - err(1, "unveil"); + err(1, "unveil %s", filename); if (unveil(NULL, NULL) == -1) err(1, "unveil"); diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index f7c3c101b25..6fa634bca3e 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.244 2021/02/21 10:38:42 sthen Exp $ */ +/* $OpenBSD: ping.c,v 1.245 2021/07/12 15:09:19 beck Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -266,7 +266,7 @@ main(int argc, char *argv[]) /* Cannot pledge due to special setsockopt()s below */ if (unveil("/", "r") == -1) - err(1, "unveil"); + err(1, "unveil /"); if (unveil(NULL, NULL) == -1) err(1, "unveil"); diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c index d28eb676172..38b10bb56df 100644 --- a/sbin/shutdown/shutdown.c +++ b/sbin/shutdown/shutdown.c @@ -1,4 +1,4 @@ -/* $OpenBSD: shutdown.c,v 1.52 2018/08/03 17:09:22 deraadt Exp $ */ +/* $OpenBSD: shutdown.c,v 1.53 2021/07/12 15:09:19 beck Exp $ */ /* $NetBSD: shutdown.c,v 1.9 1995/03/18 15:01:09 cgd Exp $ */ /* @@ -166,24 +166,24 @@ main(int argc, char *argv[]) } if (unveil(_PATH_CONSOLE, "rw") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_CONSOLE); if (unveil(_PATH_RC, "r") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_RC); if (unveil(_PATH_WALL, "x") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_WALL); if (unveil(_PATH_FASTBOOT, "wc") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_FASTBOOT); if (unveil(_PATH_NOLOGIN, "wc") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_NOLOGIN); if (dohalt || dopower) { if (unveil(_PATH_HALT, "x") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_HALT); } else if (doreboot) { if (unveil(_PATH_REBOOT, "x") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_REBOOT); } else { if (unveil(_PATH_BSHELL, "x") == -1) - err(1, "unveil"); + err(1, "unveil %s", _PATH_BSHELL); } if (pledge("stdio rpath wpath cpath getpw tty id proc exec", NULL) == -1) err(1, "pledge"); diff --git a/sbin/slaacd/engine.c b/sbin/slaacd/engine.c index c39f50b33b7..c1824ac16a3 100644 --- a/sbin/slaacd/engine.c +++ b/sbin/slaacd/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.72 2021/05/01 11:53:06 florian Exp $ */ +/* $OpenBSD: engine.c,v 1.73 2021/07/12 15:09:19 beck Exp $ */ /* * Copyright (c) 2017 Florian Obser <florian@openbsd.org> @@ -368,9 +368,9 @@ engine(int debug, int verbose) fatal("chdir(\"/\")"); if (unveil("/", "") == -1) - fatal("unveil(\"/\", \"\")"); + fatal("unveil /"); if (unveil(NULL, NULL) == -1) - fatal("unveil(NULL, NULL)"); + fatal("unveil"); setproctitle("%s", "engine"); log_procinit("engine"); diff --git a/sbin/slaacd/frontend.c b/sbin/slaacd/frontend.c index 3553595db4c..d3cb23a2925 100644 --- a/sbin/slaacd/frontend.c +++ b/sbin/slaacd/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.56 2021/05/01 11:53:06 florian Exp $ */ +/* $OpenBSD: frontend.c,v 1.57 2021/07/12 15:09:19 beck Exp $ */ /* * Copyright (c) 2017 Florian Obser <florian@openbsd.org> @@ -149,9 +149,9 @@ frontend(int debug, int verbose) fatal("chdir(\"/\")"); if (unveil("/", "") == -1) - fatal("unveil(\"/\", \"\")"); + fatal("unveil /"); if (unveil(NULL, NULL) == -1) - fatal("unveil(NULL, NULL)"); + fatal("unveil"); setproctitle("%s", "frontend"); log_procinit("frontend"); diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index cb831014d32..e7ce921994a 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.c,v 1.257 2021/05/18 05:25:40 claudio Exp $ */ +/* $OpenBSD: sysctl.c,v 1.258 2021/07/12 15:09:19 beck Exp $ */ /* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */ /* @@ -265,9 +265,9 @@ main(int argc, char *argv[]) ctime(&boottime); /* satisfy potential $TZ expansion before unveil() */ if (unveil(_PATH_DEVDB, "r") == -1 && errno != ENOENT) - err(1,"unveil"); + err(1,"unveil %s", _PATH_DEVDB); if (unveil("/dev", "r") == -1 && errno != ENOENT) - err(1, "unveil"); + err(1, "unveil /dev"); if (unveil(NULL, NULL) == -1) err(1, "unveil"); diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c index 2db2e7274ab..81610f68b3e 100644 --- a/sbin/unwind/resolver.c +++ b/sbin/unwind/resolver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolver.c,v 1.143 2021/02/07 13:35:41 florian Exp $ */ +/* $OpenBSD: resolver.c,v 1.144 2021/07/12 15:09:19 beck Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -377,7 +377,7 @@ resolver(int debug, int verbose) fatal("can't drop privileges"); if (unveil(TLS_DEFAULT_CA_CERT_FILE, "r") == -1) - fatal("unveil"); + fatal("unveil %s", TLS_DEFAULT_CA_CERT_FILE); if (pledge("stdio inet dns rpath recvfd", NULL) == -1) fatal("pledge"); |