David Lerner <[EMAIL PROTECTED]> writes:

> Some additional tests with dosemu-0.99.13.1 reveal a problem with the
> linux-2.2.14 kernel.

It's a minor uid handling glitch in the new code.

> The FAT and VFAT file systems still are largely broken with the
> linux-2.3.44 kernel. I assume that this is a known problem that is being
> worked.

Alex Viro (I think thats the right person) and I have seen a patch.
Something like the last sector not being read due to a rounding down instead of up.

Anyway here is a patch that fixes it on my system.

Eric

diff -uNrX dosemu-ignore-files dosemu-0.99.13.1.eb1.17/src/arch/linux/mapping/mapself.c dosemu-0.99.13.1.eb1.18/src/arch/linux/mapping/mapself.c
--- dosemu-0.99.13.1.eb1.17/src/arch/linux/mapping/mapself.c	Fri Feb 11 20:54:30 2000
+++ dosemu-0.99.13.1.eb1.18/src/arch/linux/mapping/mapself.c	Sun Feb 13 23:17:03 2000
@@ -340,18 +340,23 @@
 		MAP_PRIVATE | fixed | MAP_ANON, -1, 0);
   }
   if (cap & MAPPING_SHM) {
+    PRIV_SAVE_AREA
     struct shm_table *p = get_alloced_shm(source);
+    int result;
     if (!p) return (void *)-1;
     if (protect) protect = SHM_RDONLY;
+    enter_priv_on();
     if (fixed) {
       /* we need to make 'target' non zero and use SHM_RND,
        * else we would not be able to map fixed to address 0
        */
-      return shmat(p->id, (char *)target+1, SHM_REMAP | SHM_RND | protect);
+      result = shmat(p->id, (char *)target+1, SHM_REMAP | SHM_RND | protect);
     }
     else {
-      return shmat(p->id, 0, protect);
+      result = shmat(p->id, 0, protect);
     }
+    leave_priv_setting();
+    return result;
   }
   return (void *)-1;
 }

Reply via email to