]> git.e2factory.org Git - e2factory.git/commitdiff
e2lib: improve e2.conf verification
authorTobias Ulmer <tu@emlix.com>
Fri, 15 Mar 2019 17:20:54 +0000 (18:20 +0100)
committerTobias Ulmer <tu@emlix.com>
Fri, 15 Mar 2019 17:21:38 +0000 (18:21 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua

index 112347788038e185e002614daeb5447601157e0a..91cbf75c5eb15a537a41f10aa1f2de874fddc855 100644 (file)
@@ -1085,6 +1085,17 @@ local function verify_global_config(config)
         return false, re
     end
 
+    rc, re = assert_type(config.cache, "config.cache", "table")
+    if not rc then
+        return false, re
+    end
+
+    rc, re = e2lib.vrfy_dict_exp_keys(config, "e2 config",
+        { "cache", "log", "servers", "site", "tools", })
+    if not rc then
+        return false, re
+    end
+
     return true
 end