1 --- a/hostapd/config_file.c
2 +++ b/hostapd/config_file.c
3 @@ -4816,7 +4816,12 @@ struct hostapd_config * hostapd_config_r
7 - f = fopen(fname, "r");
8 + if (!strncmp(fname, "data:", 5)) {
9 + f = fmemopen((void *)(fname + 5), strlen(fname + 5), "r");
12 + f = fopen(fname, "r");
15 wpa_printf(MSG_ERROR, "Could not open configuration file '%s' "
16 "for reading.", fname);
17 --- a/wpa_supplicant/config_file.c
18 +++ b/wpa_supplicant/config_file.c
19 @@ -326,8 +326,13 @@ struct wpa_config * wpa_config_read(cons
20 while (cred_tail && cred_tail->next)
21 cred_tail = cred_tail->next;
23 + if (!strncmp(name, "data:", 5)) {
24 + f = fmemopen((void *)(name + 5), strlen(name + 5), "r");
27 + f = fopen(name, "r");
29 wpa_printf(MSG_DEBUG, "Reading configuration file '%s'", name);
30 - f = fopen(name, "r");
32 wpa_printf(MSG_ERROR, "Failed to open config file '%s', "
33 "error: %s", name, strerror(errno));