setup.ahk: set cursors to never blink
[sugaredwine.git] / patches / 0023-allow-other-users-in-the-same-group-to-share-a-wine.patch
blob1e007f23bb4bcbdc0c327e21164573999ccaf5e3
1 From 36a7110de527973e1cf25f43c64752f16dab7795 Mon Sep 17 00:00:00 2001
2 From: Vincent Povirk <vincent@codeweavers.com>
3 Date: Wed, 15 Oct 2008 12:44:16 -0500
4 Subject: [PATCH] allow other users in the same group to share a wine server
6 ---
7 dlls/ntdll/server.c | 2 +-
8 libs/wine/config.c | 6 +-----
9 server/request.c | 2 +-
10 3 files changed, 3 insertions(+), 7 deletions(-)
12 diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
13 index 27f87e6..4e0c988 100644
14 --- a/dlls/ntdll/server.c
15 +++ b/dlls/ntdll/server.c
16 @@ -860,7 +860,7 @@ static int server_connect(void)
17 /* make sure the socket is sane (ISFIFO needed for Solaris) */
18 if (!S_ISSOCK(st.st_mode) && !S_ISFIFO(st.st_mode))
19 fatal_error( "'%s/%s' is not a socket\n", serverdir, SOCKETNAME );
20 - if (st.st_uid != getuid())
21 + if (st.st_gid != getgid())
22 fatal_error( "'%s/%s' is not owned by you\n", serverdir, SOCKETNAME );
24 /* try to connect to it */
25 diff --git a/libs/wine/config.c b/libs/wine/config.c
26 index 8eaf164..14c2218 100644
27 --- a/libs/wine/config.c
28 +++ b/libs/wine/config.c
29 @@ -143,11 +143,7 @@ static char *get_runtime_libdir(void)
30 static void init_server_dir( dev_t dev, ino_t ino )
32 char *p;
33 -#ifdef HAVE_GETUID
34 - const unsigned int uid = getuid();
35 -#else
36 - const unsigned int uid = 0;
37 -#endif
38 + const unsigned int uid = getgid();
40 server_dir = xmalloc( sizeof(server_root_prefix) + 32 + sizeof(server_dir_prefix) +
41 2*sizeof(dev) + 2*sizeof(ino) );
42 diff --git a/server/request.c b/server/request.c
43 index ef5110b..1d8a3ba 100644
44 --- a/server/request.c
45 +++ b/server/request.c
46 @@ -724,7 +724,7 @@ static void acquire_lock(void)
47 fatal_perror( "bind" );
49 atexit( socket_cleanup );
50 - chmod( server_socket_name, 0600 ); /* make sure no other user can connect */
51 + chmod( server_socket_name, 0660 ); /* make sure no other group can connect */
52 if (listen( fd, 5 ) == -1) fatal_perror( "listen" );
54 if (!(master_socket = alloc_object( &master_socket_ops )) ||
55 --
56 1.5.6.5