diff options
author | 2010-06-21 00:18:57 +0000 | |
---|---|---|
committer | 2010-06-21 00:18:57 +0000 | |
commit | 7394227cb4e8c668cb30224d3356b1392e11c4ab (patch) | |
tree | 3f810bb45a412be1d63ff4309455cdeb1763a43c | |
parent | Ensure we overwrite UTF-8 wide characters properly, and never overwrite (diff) | |
download | wireguard-openbsd-7394227cb4e8c668cb30224d3356b1392e11c4ab.tar.xz wireguard-openbsd-7394227cb4e8c668cb30224d3356b1392e11c4ab.zip |
Give tmux sockets (but not the containing folder) group
permissions. This allows hardlinks to the sockets to be used more
easily.
-rw-r--r-- | usr.bin/tmux/server.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c index 1e790e75d31..88d73d73a34 100644 --- a/usr.bin/tmux/server.c +++ b/usr.bin/tmux/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.88 2010/05/04 17:28:16 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.89 2010/06/21 00:18:57 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -86,7 +86,7 @@ server_create_socket(void) 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); @@ -310,9 +310,9 @@ server_update_socket(void) 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); } } |