Skip to contentSkip to conversation

CLIPPER LOCKS (again)

PATCH Anderson Pereira Ataides 2 participants 2 messages Jul 12, 2002 – Jul 17, 2002

lore
Share & tools
lore
#0 lore raw

Hello,

Again I'm asking for help, because I did not fix my problem. Remembering my story is that I have an application written using Clipper 5.2 and when a workstation with linux+dosemu opens a file and lock a record (or the entire file), another workstation running Windows still can open that file, meaning that it can't see the file is locked by dosemu. Trying this operation opening the file in Windows first, the problem still occurs.

I upgraded kernel to 2.4.18 but problem is still there.

I'm using:

	kernel 2.4.18
	samba 2.2.0
	dosemu-1.1.2

Mr Sergey Suleymanov sent me a message telling me to use a fix (see below) but I did not understand it. How am I supposed to use this fix? Do I have to type it at linux prompt? Is it a script? Is it something to put into a configuration file?

Greg LaBossiere also sent me a message suggesting to upgrade kernel. So I did it but did not solve my problem.

Thanks,
Anderson Pereira Ataides
Linux User #277884

------------------------------------------------

Anderson> Hi, I've got an application develop using Clipper 5.01 and Anderson> I'm having trouble with locks.

Anderson> How can I solve this problem? Is it a dosemu bug?

Can you try this fix?

diff -rubN dosemu-1.1.3/src/dosext/mfs/mfs.c
dosemu-1.1.3.my2/src/dosext/mfs/mfs.c

src/dosext/mfs/mfs.c Mon May 6 10:18:53 2002 renamed from src/dosext/mfs/mfs.c Tue Apr 23 15:16:39 2002 +0 -0
@@ -3795,6 +3866,7 @@
                 ret = fcntl (fd,F_SETLK,&larg);
                 Debug0((dbg_fd, "lock fd=%x rc=%x type=%x whence=%x 

start=%lx, len=%lx\n",
fd, ret, larg.l_type, larg.l_whence,
larg.l_start,larg.l_len));

+                if (ret == -1) SETWORD(&(state->eax), ACCESS_DENIED);
                 return ret != -1 ? TRUE : FALSE;
         }
     break;
Signature · 3 lines
  Sergey Suleymanov

-
#1 lore raw

Yo tambien tengo el mismo problema y lo he solucionado en parte con SAMBA
con la opcion
--kerner oplocks = yes -- en /etc/smb.conf
y despues hago las exepciones con la opcion
--veto oplock files = /*.*/ -- en la seccion especifica del share aquí voy a pegar una parte de smb.conf que me ha funcionado

[global]
workgroup = NEGSIS
server string = Windows 98 SE
security = SERVER
# security = share
encrypt passwords = Yes
map to guest = Bad User
log file = /usr/local/logs/samba.log
# keepalive = 30
guest ok = True
os level = 2
# kernel oplocks = Yes
# veto oplock files = /*.*/ # en esta parte agrego los archivos que
necesito excluir de el bloqueo (locK)

para mas informacion miren el libro de Usando Samba de Orelly

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Mensaje original <<<<<<<<<<<<<<<<<<

El 12/07/02, 12:37:19, Anderson Pereira Ataides <[email protected]> escribió sobre el tema CLIPPER LOCKS (again):

Quoted 3 lines

Hello,

Again I'm asking for help, because I did not fix my problem. Remembering

my

Quoted 2 lines

story is that I have an application written using Clipper 5.2 and when a workstation with linux+dosemu opens a file and lock a record (or the

entire

Quoted 1 line

file), another workstation running Windows still can open that file,

meaning

Quoted 1 line

that it can't see the file is locked by dosemu. Trying this operation

opening

Quoted 10 lines

the file in Windows first, the problem still occurs.

I upgraded kernel to 2.4.18 but problem is still there.

I'm using:

      kernel 2.4.18
      samba 2.2.0
      dosemu-1.1.2

Mr Sergey Suleymanov sent me a message telling me to use a fix (see

below)

Quoted 1 line

but I did not understand it. How am I supposed to use this fix? Do I have

to

Quoted 4 lines

type it at linux prompt? Is it a script? Is it something to put into a configuration file?

Greg LaBossiere also sent me a message suggesting to upgrade kernel. So I

did

Quoted 35 lines

it but did not solve my problem.

Thanks,
Anderson Pereira Ataides
Linux User #277884

------------------------------------------------

Anderson> Hi, I've got an application develop using Clipper 5.01 and Anderson> I'm having trouble with locks.

Anderson> How can I solve this problem? Is it a dosemu bug?

Can you try this fix?

diff -rubN dosemu-1.1.3/src/dosext/mfs/mfs.c
dosemu-1.1.3.my2/src/dosext/mfs/mfs.c

src/dosext/mfs/mfs.c Mon May 6 10:18:53 2002 renamed from src/dosext/mfs/mfs.c Tue Apr 23 15:16:39 2002 +1 -0
@@ -3795,6 +3866,7 @@
                 ret = fcntl (fd,F_SETLK,&larg);
                 Debug0((dbg_fd, "lock fd=%x rc=%x type=%x whence=%x
 start=%lx, len=%lx\n",
                         fd, ret, larg.l_type, larg.l_whence,
 larg.l_start,larg.l_len));
+                if (ret == -1) SETWORD(&(state->eax), ACCESS_DENIED);
                 return ret != -1 ? TRUE : FALSE;
         }
     break;

--
Sergey Suleymanov

src/dosext/mfs/mfs.c Mon May 6 10:18:53 2002 renamed from src/dosext/mfs/mfs.c Tue Apr 23 15:16:39 2002 +0 -2
-
-
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html