mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 13:20:08 +01:00
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:
parent
a9c22166f6
commit
fe29aa967c
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue