]> git.ozlabs.org Git - petitboot/blobdiff - discover/platform.c
discover/discover-server: Restrict clients based on uid
[petitboot] / discover / platform.c
index 767f66e6fa41c4b25135287dacdff288a73e0677..7712ef14028772c07f39eb4d2d2a320eef1eba45 100644 (file)
@@ -153,7 +153,7 @@ void config_set_defaults(struct config *config)
        config->debug = config_debug_on_cmdline();
 
        lang = setlocale(LC_ALL, NULL);
-       pb_log("lang: %s\n", lang);
+       pb_log_fn("lang: %s\n", lang);
        if (lang && strlen(lang))
                config->lang = talloc_strdup(config, lang);
        else
@@ -213,6 +213,19 @@ int platform_get_sysinfo(struct system_info *info)
        return -1;
 }
 
+bool platform_restrict_clients(){
+       if (platform && platform->restrict_clients)
+               return platform->restrict_clients(platform);
+       return false;
+}
+
+int platform_set_password(const char *hash)
+{
+       if (platform && platform->set_password)
+               return platform->set_password(platform, hash);
+       return -1;
+}
+
 int config_set(struct config *newconfig)
 {
        int rc;