summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartijn <martijn@openbsd.org>2018-07-11 07:03:03 +0000
committermartijn <martijn@openbsd.org>2018-07-11 07:03:03 +0000
commit62da5ec11c60c42383da04ad5c73a9166046873e (patch)
tree6bba00d693f00b1203ae7067862ef4583e162a5d
parentMake the output of the list command more sensible for the output device. (diff)
downloadwireguard-openbsd-62da5ec11c60c42383da04ad5c73a9166046873e.tar.xz
wireguard-openbsd-62da5ec11c60c42383da04ad5c73a9166046873e.zip
Using resolved after realpath(3) has failed is dangerous. Don't do it!
Minor tweak and OK jca@ OK beck@ deraadt@
-rw-r--r--sbin/mount_tmpfs/mount_tmpfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/mount_tmpfs/mount_tmpfs.c b/sbin/mount_tmpfs/mount_tmpfs.c
index 4f61a397be0..98d84f38fe4 100644
--- a/sbin/mount_tmpfs/mount_tmpfs.c
+++ b/sbin/mount_tmpfs/mount_tmpfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_tmpfs.c,v 1.6 2016/06/06 17:09:03 espie Exp $ */
+/* $OpenBSD: mount_tmpfs.c,v 1.7 2018/07/11 07:03:03 martijn Exp $ */
/* $NetBSD: mount_tmpfs.c,v 1.24 2008/08/05 20:57:45 pooka Exp $ */
/*
@@ -241,9 +241,9 @@ pathadj(const char *input, char *adjusted)
{
if (realpath(input, adjusted) == NULL)
- warn("Warning: realpath %s", input);
+ err(1, "realpath %s", input);
if (strncmp(input, adjusted, PATH_MAX)) {
- warnx("\"%s\" is a non-resolved or relative path.", input);
+ warnx("\"%s\" is a relative path.", input);
warnx("using \"%s\" instead.", adjusted);
}
}