Commit 82aecce3 authored by Alexander Larsson's avatar Alexander Larsson

gdbus: Escape nonce files in dbus addressess

Otherwise the colon in c:\blah made for trouble
parent 2414d7d6
......@@ -843,6 +843,7 @@ try_tcp (GDBusServer *server,
guint n;
gsize bytes_written;
gsize bytes_remaining;
char *file_escaped;
server->nonce = g_new0 (guchar, 16);
for (n = 0; n < 16; n++)
......@@ -878,10 +879,12 @@ try_tcp (GDBusServer *server,
bytes_remaining -= ret;
}
close (fd);
file_escaped = g_uri_escape_string (server->nonce_file, "/\\", FALSE);
server->client_address = g_strdup_printf ("nonce-tcp:host=%s,port=%d,noncefile=%s",
host,
port_num,
server->nonce_file);
file_escaped);
g_free (file_escaped);
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment