ifnet: properly unquote hostnames with g_shell_unquote() (bgo #669148)
If /etc/conf.d/hostname contains "hostname='foo'", then the hostname needs to be set to "foo", not "'foo'". https://bugzilla.gnome.org/show_bug.cgi?id=669148
This commit is contained in:

committed by
Jiří Klimeš

parent
a9c22166f6
commit
fe29aa967c
@@ -242,8 +242,7 @@ read_hostname (const char *path)
|
|||||||
if (g_str_has_prefix (all_lines[i], "hostname")) {
|
if (g_str_has_prefix (all_lines[i], "hostname")) {
|
||||||
tmp = strstr (all_lines[i], "=");
|
tmp = strstr (all_lines[i], "=");
|
||||||
tmp++;
|
tmp++;
|
||||||
tmp = strip_string (tmp, '"');
|
result = g_shell_unquote (tmp, NULL);
|
||||||
result = g_strdup (tmp);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user