unsigned int timeout_inputreq;
unsigned int timeout_browserlaunch;
char **blacklisted_interfaces;
+ connman_bool_t allow_hostname_updates;
} connman_settings = {
.bg_scan = TRUE,
.pref_timeservers = NULL,
.timeout_inputreq = DEFAULT_INPUT_REQUEST_TIMEOUT,
.timeout_browserlaunch = DEFAULT_BROWSER_LAUNCH_TIMEOUT,
.blacklisted_interfaces = NULL,
+ .allow_hostname_updates = TRUE,
};
static GKeyFile *load_config(const char *file)
g_strdupv(default_blacklist);
g_clear_error(&error);
+
+ boolean = g_key_file_get_boolean(config, "General",
+ "AllowHostnameUpdates",
+ &error);
+ if (error == NULL)
+ connman_settings.allow_hostname_updates = boolean;
+
+ g_clear_error(&error);
}
static int config_init(const char *file)
if (g_str_equal(key, "BackgroundScanning") == TRUE)
return connman_settings.bg_scan;
+ if (g_str_equal(key, "AllowHostnameUpdates") == TRUE)
+ return connman_settings.allow_hostname_updates;
+
return FALSE;
}
# match any of the list entries. Default value is
# vmnet,vboxnet,virbr.
# NetworkInterfaceBlacklist = vmnet,vboxnet,virbr
+
+# Allow connman to change the system hostname. This can
+# happen for example if we receive DHCP hostname option.
+# Default value is true.
+# AllowHostnameUpdates = true