Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2837

Modified Files:
        server.c 
Log Message:
Sync OpenBSD patchset 722:

Give tmux sockets (but not the containing folder) group
permissions. This allows hardlinks to the sockets to be used more
easily.


Index: server.c
===================================================================
RCS file: /cvsroot/tmux/tmux/server.c,v
retrieving revision 1.241
retrieving revision 1.242
diff -u -d -r1.241 -r1.242
--- server.c    16 May 2010 17:50:31 -0000      1.241
+++ server.c    22 Jun 2010 23:21:39 -0000      1.242
@@ -85,7 +85,7 @@
        if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
                fatal("socket failed");
 
-       mask = umask(S_IXUSR|S_IRWXG|S_IRWXO);
+       mask = umask(S_IXUSR|S_IXGRP|S_IRWXO);
        if (bind(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) == -1)
                fatal("bind failed");
        umask(mask);
@@ -314,9 +314,9 @@
        if (n != last) {
                last = n;
                if (n != 0)
-                       chmod(socket_path, S_IRWXU);
+                       chmod(socket_path, S_IRWXU|S_IRWXG);
                else
-                       chmod(socket_path, S_IRUSR|S_IWUSR);
+                       chmod(socket_path, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
        }
 }
 


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to