Kaydet (Commit) 3be9ab09 authored tarafından Enrico Tröger's avatar Enrico Tröger

Reduce default file permissions on the Unix Domain socket file (reported by Jörg Sommer, thanks).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3628 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst b2faa6dc
2009-03-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/socket.c:
Reduce default file permissions on the Unix Domain socket file
(reported by Jörg Sommer, thanks).
2009-03-13 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* doc/geany.txt, doc/geany.html, geany.glade, src/interface.c,
......
......@@ -371,8 +371,6 @@ static gint socket_fd_open_unix(const gchar *path)
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, real_path, sizeof(addr.sun_path) - 1);
g_free(real_path);
if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0)
{
perror("bind");
......@@ -387,6 +385,10 @@ static gint socket_fd_open_unix(const gchar *path)
return -1;
}
g_chmod(real_path, 0600);
g_free(real_path);
return sock;
}
#endif
......
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