From: Jo-Philipp Wich Date: Tue, 5 Oct 2010 19:34:22 +0000 (+0000) Subject: uhttpd: add /etc/uhttpd.key and /etc/uhttpd.crt to conffile hints X-Git-Tag: reboot~18761 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=88db961cf0f9a86d052e685fec9b77a8a692f70a;p=oweals%2Fopenwrt.git uhttpd: add /etc/uhttpd.key and /etc/uhttpd.crt to conffile hints SVN-Revision: 23260 --- 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