[PATCH spice-server] RFC: Support abstract Unix sockets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Allows to specify abstract Unix sockets addresses.
These Unix sockets are supported on Linux and allows to not
have file system names.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/reds.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/server/reds.c b/server/reds.c
index ebcbe496..2b43bc0d 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2587,6 +2587,9 @@ static int reds_init_socket(const char *addr, int portnr, int family)
         g_strlcpy(local.sun_path, addr, sizeof(local.sun_path));
         unlink(local.sun_path);
         len = SUN_LEN(&local);
+        if (local.sun_path[0] == '@') {
+            local.sun_path[0] = 0;
+        }
         if (bind(slisten, (struct sockaddr *)&local, len) == -1) {
             perror("bind");
             return -1;
-- 
2.14.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]