[Bug 2801] Wine doesn't start if user ID is over 65534 (2**16-1)

Wine Bugs wine-bugs at winehq.org
Wed Mar 16 15:40:09 CST 2005


http://bugs.winehq.org/show_bug.cgi?id=2801





------- Additional Comments From winehq at drydog.com  2005-16-03 15:40 -------
Apparently this is a problem with either Sun JDS Linux 2 or with the underlying
kernel, Linux 2.4.19.  I understand 32-bit UIDs will be fixed in Linux 2.6 (they
are in 2.4, but not completely working yet).  Here's a patch for a workaround:

--- libs/wine/config.c.ori	2005-03-16 13:15:41.000000000 -0800
+++ libs/wine/config.c	2005-03-16 13:16:51.000000000 -0800
@@ -105,7 +105,7 @@
 static void init_server_dir( dev_t dev, ino_t ino )
 {
     char *p;
-#ifdef HAVE_GETUID
+#ifdef HAVE_GETUID_DISABLED_BECAUSE_32_BIT_UID_BROKEN_WITH_LINUX_2_4
     const unsigned int uid = getuid();
 #else
     const unsigned int uid = 0;


--- server/request.c.ori	2005-03-04 04:38:37.000000000 -0800
+++ server/request.c	2005-03-16 13:27:45.000000000 -0800
@@ -516,7 +516,6 @@
         if (lstat( name, st ) == -1) fatal_perror( "lstat %s", name );
     }
     if (!S_ISDIR(st->st_mode)) fatal_error( "%s is not a directory\n", name );
-    if (st->st_uid != getuid()) fatal_error( "%s is not owned by you\n", name );
     if (st->st_mode & 077) fatal_error( "%s must not be accessible by other
users\n", name );
 }
 
  
--- dlls/ntdll/server.c.ori	2004-10-18 12:34:37.000000000 -0700
+++ dlls/ntdll/server.c	2005-03-16 13:34:24.000000000 -0800
@@ -625,7 +625,6 @@
 
     /* make sure we are at the right place */
     if (stat( ".", &st ) == -1) fatal_perror( "stat %s", serverdir );
-    if (st.st_uid != getuid()) fatal_error( "'%s' is not owned by you\n",
serverdir );
     if (st.st_mode & 077) fatal_error( "'%s' must not be accessible by other
users\n", serverdir );
 
     for (retry = 0; retry < 6; retry++)
@@ -647,8 +646,6 @@
         /* make sure the socket is sane (ISFIFO needed for Solaris) */
         if (!S_ISSOCK(st.st_mode) && !S_ISFIFO(st.st_mode))
             fatal_error( "'%s/%s' is not a socket\n", serverdir, SOCKETNAME );
-        if (st.st_uid != getuid())
-            fatal_error( "'%s/%s' is not owned by you\n", serverdir, SOCKETNAME );
 
         /* try to connect to it */
         addr.sun_family = AF_UNIX;


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list