Bug 3044 - "Access denied" when running FOX Pro for DOS applications from two or more Win'98 or OS/2 workstations
Summary: "Access denied" when running FOX Pro for DOS applications from two or more Wi...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.20
Hardware: x86 FreeBSD
: P3 major
Target Milestone: none
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-25 21:48 UTC by Alex Masterov
Modified: 2005-09-12 02:34 UTC (History)
0 users

See Also:


Attachments
Sniff running exe from 2-nd workstaion on Samba 3.0.20 (8.56 KB, application/octet-stream)
2005-08-25 21:58 UTC, Alex Masterov
no flags Details
Sniff running exe from 2-nd workstaion on Samba 3.0.10 (55.51 KB, application/octet-stream)
2005-08-25 22:08 UTC, Alex Masterov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Masterov 2005-08-25 21:48:54 UTC
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.
Comment 1 Alex Masterov 2005-08-25 21:58:27 UTC
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
Comment 2 Alex Masterov 2005-08-25 22:08:02 UTC
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
Comment 3 Jeremy Allison 2005-08-25 22:42:39 UTC
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.
Comment 4 Alex Masterov 2005-08-26 00:18:07 UTC
Yes, with

access_mask = FILE_READ_DATA
in smbd/open.c

this works.

Thank you!
Comment 5 Alex Masterov 2005-08-28 21:48:48 UTC
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?
Comment 6 Jeremy Allison 2005-09-09 14:50:01 UTC
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.
Comment 7 Alex Masterov 2005-09-12 02:34:56 UTC
I've verified, this problem does not exists in 3.0.21pre1-SVN-build-10154.
Thanks!