From: reyk Date: Tue, 15 Jul 2014 09:51:06 +0000 (+0000) Subject: don't diplay the full path in error messages X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4ed8bfa1ace535152d828bfce6cce980d1d983f7;p=openbsd don't diplay the full path in error messages --- 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 @@ -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);