When I tried to run FOX-based DOS EXE from two or more Win'98 or OS/2 workstations I got "Access denied" error. EXE-file is on samba 3.0.20 shared drive. On the samba 3.0.10 shared drive this bug does not exists. Details: Samba 3.0.10 1. Run exe from network drive on 1st workstation - successful 2. On unix server: smbstatus -L Locked files: Pid DenyMode Access R/W Oplock Name -------------------------------------------------------------- 43414 DENY_WRITE 0x1 RDONLY NONE /shared/SEZ/FOXDX260.ESL Fri Aug 26 11:41:45 2005 43414 DENY_WRITE 0x1 RDONLY NONE /shared/SEZ/SBYT_ZAK.EXE Fri Aug 26 11:41:49 2005 3. Run the same exe from the same network drive on 2nd workstation - successful Samba 3.0.20 1. Run exe from network drive on 1st workstation - successful 2. On unix server: smbstatus -L Locked files: Pid DenyMode Access R/W Oplock Name -------------------------------------------------------------- 43474 DENY_WRITE 0x120089 RDWR NONE /shared/SEZ/FOXDX260.ESL Fri Aug 26 11:47:02 2005 43474 DENY_WRITE 0x120089 RDWR NONE /shared/SEZ/SBYT_ZAK.EXE Fri Aug 26 11:47:05 2005 3. Run the same exe from the same network drive on 2nd workstation - Access is denied.
Created attachment 1404 [details] Sniff running exe from 2-nd workstaion on Samba 3.0.20 Attempt running foxpro exe from 2-nd workstation (step 3). Result: Access denied
Created attachment 1405 [details] Sniff running exe from 2-nd workstaion on Samba 3.0.10 Sniff of the same action with samba 3.0.10. Result - exe runned successful
Ok, the problem is this code in smbd/open.c : case DOS_OPEN_EXEC: /* This used to be FILE_READ_DATA... */ case DOS_OPEN_RDWR: case DOS_OPEN_FCB: access_mask = FILE_GENERIC_READ|FILE_GENERIC_WRITE; break; If the "case DOS_OPEN_EXEC:" were mapped to FILE_READ_DATA instead of FILE_GENERIC_READ|FILE_GENERIC_WRITE then I think this would work. Can you test this for me please ? I'll add a torture test to Samba4 smbtorture to test this against W2K3. Thanks, Jeremy.
Yes, with access_mask = FILE_READ_DATA in smbd/open.c this works. Thank you!
I've changed smbd/open.c and bug gone. But problem still exists in samba 3.0.21pre1-SVN-build-9709 In which release it will be resolved?
Ok, I've finally had time to add the Samba4 torture test that proves openX for exec is read-only. I'll fix this in the SVN 3.0 and HEAD code. Please SVN update 3.0 and test. Thanks, Jeremy.
I've verified, this problem does not exists in 3.0.21pre1-SVN-build-10154. Thanks!