diff options
author | 2014-07-15 09:51:06 +0000 | |
---|---|---|
committer | 2014-07-15 09:51:06 +0000 | |
commit | 4ed8bfa1ace535152d828bfce6cce980d1d983f7 (patch) | |
tree | 8bc725d6e2c978e83fa6a9cd68d3d89b8ff72ee9 | |
parent | /var/db/sysmerge -> /usr/share/sysmerge (diff) | |
download | wireguard-openbsd-4ed8bfa1ace535152d828bfce6cce980d1d983f7.tar.xz wireguard-openbsd-4ed8bfa1ace535152d828bfce6cce980d1d983f7.zip |
don't diplay the full path in error messages
-rw-r--r-- | usr.sbin/httpd/server_file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/httpd/server_file.c b/usr.sbin/httpd/server_file.c index e8db8a7c08d..1942be13beb 100644 --- a/usr.sbin/httpd/server_file.c +++ b/usr.sbin/httpd/server_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_file.c,v 1.4 2014/07/14 00:19:48 reyk Exp $ */ +/* $OpenBSD: server_file.c,v 1.5 2014/07/15 09:51:06 reyk Exp $ */ /* * Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -70,6 +70,7 @@ server_file(struct httpd *env, struct client *clt) strlcat(path, "index.html", sizeof(path)); if (access(path, R_OK) == -1) { + strlcpy(path, desc->http_path, sizeof(path)); switch (errno) { case EACCES: server_abort_http(clt, 403, path); |