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:
Alexandre Rostovtsev
2012-01-31 21:10:01 -05:00
committed by Jiří Klimeš
parent a9c22166f6
commit fe29aa967c

View File

@@ -242,8 +242,7 @@ read_hostname (const char *path)
if (g_str_has_prefix (all_lines[i], "hostname")) {
tmp = strstr (all_lines[i], "=");
tmp++;
tmp = strip_string (tmp, '"');
result = g_strdup (tmp);
result = g_shell_unquote (tmp, NULL);
break;
}