gdbus: Escape nonce files in dbus addressess

Otherwise the colon in c:\blah made for trouble
This commit is contained in:
Alexander Larsson 2012-04-17 15:50:53 +02:00
parent 2414d7d6a1
commit 82aecce301

View File

@ -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
{