1 From c9fb24b93efdd2ebac89a20e3aa499ce7b496a36 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
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 )
34 - const unsigned int uid = getuid();
36 - const unsigned int uid = 0;
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 )) ||