SF.net SVN: geany:[3628] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Sun Mar 15 07:50:05 UTC 2009
Revision: 3628
http://geany.svn.sourceforge.net/geany/?rev=3628&view=rev
Author: eht16
Date: 2009-03-15 07:50:05 +0000 (Sun, 15 Mar 2009)
Log Message:
-----------
Reduce default file permissions on the Unix Domain socket file (reported by J?\195?\182rg Sommer, thanks).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/socket.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-03-13 17:23:56 UTC (rev 3627)
+++ trunk/ChangeLog 2009-03-15 07:50:05 UTC (rev 3628)
@@ -1,3 +1,10 @@
+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,
Modified: trunk/src/socket.c
===================================================================
--- trunk/src/socket.c 2009-03-13 17:23:56 UTC (rev 3627)
+++ trunk/src/socket.c 2009-03-15 07:50:05 UTC (rev 3628)
@@ -371,8 +371,6 @@
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 @@
return -1;
}
+ g_chmod(real_path, 0600);
+
+ g_free(real_path);
+
return sock;
}
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list