diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2021-07-12 15:09:23 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2021-07-12 15:09:23 +0000 |
commit | 73e82762d46ada77045a4c76185bdd75e2e712c3 (patch) | |
tree | 1e6fb3124598f66f9f86720c24b0174176b345c2 /sbin/sysctl/sysctl.c | |
parent | e8f12d212e4dfa88699628d0df2a4e442a348350 (diff) |
Change the error reporting pattern throughout the tree when unveil
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.
Work done and verified by Ashton Fagg <ashton@fagg.id.au>
ok deraadt@ semarie@ claudio@
Diffstat (limited to 'sbin/sysctl/sysctl.c')
-rw-r--r-- | sbin/sysctl/sysctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
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"); |