aboutsummaryrefslogtreecommitdiffstats
path: root/package/uhttpd
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-10-05 19:34:22 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-10-05 19:34:22 +0000
commit62f58cd112dc4682e550d365d2e96ec302f7fcf2 (patch)
treed46949557469ac695e4ae2643a1c8b6d401d7dd1 /package/uhttpd
parentffe051af996f00c26bcb0bc863866ed07f6d5959 (diff)
downloadupstream-62f58cd112dc4682e550d365d2e96ec302f7fcf2.tar.gz
upstream-62f58cd112dc4682e550d365d2e96ec302f7fcf2.tar.bz2
upstream-62f58cd112dc4682e550d365d2e96ec302f7fcf2.zip
[package] uhttpd: add /etc/uhttpd.key and /etc/uhttpd.crt to conffile hints
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23260 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/uhttpd')
-rw-r--r--package/uhttpd/Makefile2
-rw-r--r--package/uhttpd/src/uhttpd.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/package/uhttpd/Makefile b/package/uhttpd/Makefile
index 835e5b5277..29d3ee5b1f 100644
--- a/package/uhttpd/Makefile
+++ b/package/uhttpd/Makefile
@@ -68,6 +68,8 @@ endef
define Package/uhttpd/conffiles
/etc/config/uhttpd
+/etc/uhttpd.crt
+/etc/uhttpd.key
endef
define Package/uhttpd/install
diff --git a/package/uhttpd/src/uhttpd.c b/package/uhttpd/src/uhttpd.c
index a818e1c450..86b7e63dd1 100644
--- a/package/uhttpd/src/uhttpd.c
+++ b/package/uhttpd/src/uhttpd.c
@@ -558,7 +558,9 @@ static void uh_mainloop(struct config *conf, fd_set serv_fds, int max_fd)
if( conf->lua_state &&
uh_path_match(conf->lua_prefix, req->url) )
{
- conf->lua_request(cl, req, conf->lua_state);
+ /* auth ok? */
+ if( uh_auth_check(cl, req, pin) )
+ conf->lua_request(cl, req, conf->lua_state);
}
else
#endif