Update wine to 1.2.
[sugaredwine.git] / patches / 0026-allow-other-users-in-the-same-group-to-share-a-wine.patch
blob1dad45fbee18424ae55468f578ae95392bd622b5
1 From 5ddc607731dd47efdcece98d4116a5c65e2504a0 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 680a44e..445f0d4 100644
14 --- a/dlls/ntdll/server.c
15 +++ b/dlls/ntdll/server.c
16 @@ -870,7 +870,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 16986a2..e792948 100644
27 --- a/libs/wine/config.c
28 +++ b/libs/wine/config.c
29 @@ -200,11 +200,7 @@ static char *get_runtime_bindir( const char *argv0 )
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 e03f47b..d6264ca 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