uhttpd: add /etc/uhttpd.key and /etc/uhttpd.crt to conffile hints
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 5 Oct 2010 19:34:22 +0000 (19:34 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 5 Oct 2010 19:34:22 +0000 (19:34 +0000)
SVN-Revision: 23260

package/uhttpd/Makefile
package/uhttpd/src/uhttpd.c

index 835e5b527729d11a6a60fab32993ef3f8e1eb9ed..29d3ee5b1fd960b0f8a026894e76bbb06b0a66cf 100644 (file)
@@ -68,6 +68,8 @@ endef
 
 define Package/uhttpd/conffiles
 /etc/config/uhttpd
+/etc/uhttpd.crt
+/etc/uhttpd.key
 endef
 
 define Package/uhttpd/install
index a818e1c4507e58ff55f501b7bb28a7462df57e45..86b7e63dd123db929c84e9553aad3a0107166899 100644 (file)
@@ -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