Bug 4122 - Problem making directory that already exists from an OS2
Summary: Problem making directory that already exists from an OS2
Status: NEW
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.23c
Hardware: x86 OS/2
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
: 4107 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-23 11:34 UTC by Alain GORLIER
Modified: 2006-11-21 21:05 UTC (History)
3 users (show)

See Also:


Attachments
Here is the ethereal traces for OS2 client / Samba server (249 bytes, application/octet-stream)
2006-09-23 11:35 UTC, Alain GORLIER
no flags Details
Here is the ethereal traces for OS2 client / OS2 lan server (484 bytes, application/octet-stream)
2006-09-23 11:35 UTC, Alain GORLIER
no flags Details
Make directory from OS2 client to OS2 server, 1st acess : directory already exists (1.52 KB, application/octet-stream)
2006-09-25 03:33 UTC, Alain GORLIER
no flags Details
Make directory from OS2 client to OS2 server, 2nd acsess : directory already exists (582 bytes, application/octet-stream)
2006-09-25 03:35 UTC, Alain GORLIER
no flags Details
1st try to make directory from OS2 client to Samba server. Client says NOTHING AT ALL ! (1.38 KB, application/octet-stream)
2006-09-25 03:36 UTC, Alain GORLIER
no flags Details
2nd try to make directory from OS2 client to Samba server : SYS0317 (572 bytes, application/octet-stream)
2006-09-25 03:37 UTC, Alain GORLIER
no flags Details
Make directory from WinXP client to OS2 server, 2 tries : directory already exists (3.07 KB, application/octet-stream)
2006-09-25 03:42 UTC, Alain GORLIER
no flags Details
Make directory from WinXP client to Samba server, 2 tries : directory already exists (5.24 KB, application/octet-stream)
2006-09-25 03:44 UTC, Alain GORLIER
no flags Details
kukks: failing one against samba-3.0.23c (2.25 KB, application/octet-stream)
2006-09-26 21:30 UTC, Guenter Kukkukk
no flags Details
kukks: the ok one against svn 18931 (2.45 KB, application/octet-stream)
2006-09-26 21:31 UTC, Guenter Kukkukk
no flags Details
kukks: an ok one against w2k (2.26 KB, application/octet-stream)
2006-09-26 21:32 UTC, Guenter Kukkukk
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alain GORLIER 2006-09-23 11:34:01 UTC
We are encountering problems creating directories from OS2 clients to a samba server (Version 3.0.23c-SerNet-RedHat).
It occurs when the directory already exists. (no problem for Windows clients)

From an OS2 client to an OS2 server we receive this message :
SYS1248: A subdirectory or file \\server\directory already exists.

From an OS2 client to an Samba server we receive this message :
SYS0317: The system cannot find message 0183 in message file OSO001.MSG.

Looks like there is different return codes between OS2 Lan server and Samba server for event "directory already exist".

Taking ethereal traces :
    we see that the return code from OS2 Lan server is 0x05.
    we see that the return code from Samba server is 0xb7.  (0183)

The problem is similar to another problem we had with OS2 clients on an older version of Samba with empty directories.
Comment 1 Alain GORLIER 2006-09-23 11:35:25 UTC
Created attachment 2149 [details]
Here is the ethereal traces for OS2 client / Samba server
Comment 2 Alain GORLIER 2006-09-23 11:35:59 UTC
Created attachment 2150 [details]
Here is the ethereal traces for OS2 client / OS2 lan server
Comment 3 Volker Lendecke 2006-09-23 14:36:45 UTC
Now this is weird. We do have a torture test (BASE-SAMBA3ERROR) that tests exactly this error condition, and Windows replies with access denied. If OS/2 replies differently, we have to decide which one we emulate.

Can you try that test against a Windows box? Preferably a W2k3 server, but an XP box might also be sufficient.

And, please send the full sniffs from the beginning of the connection. If OS/2 and Windows behave the same in that situation, we need the full session from the beginning.

Volker
Comment 4 Alain GORLIER 2006-09-25 03:33:06 UTC
Created attachment 2152 [details]
Make directory from OS2 client to OS2 server, 1st acess : directory already exists

1st acesss to OS2 lan server. 
OS2 client says "directory already exists"
Comment 5 Alain GORLIER 2006-09-25 03:35:35 UTC
Created attachment 2153 [details]
Make directory from OS2 client to OS2 server, 2nd  acsess : directory already exists

2nd try to make directory on OS2 lan server. 
OS2 client says "directory already exists"
Comment 6 Alain GORLIER 2006-09-25 03:36:26 UTC
Created attachment 2154 [details]
1st try to make directory from OS2 client to Samba server.
Client says NOTHING AT ALL !

1st try to make directory from OS2 client to Samba server
Comment 7 Alain GORLIER 2006-09-25 03:37:59 UTC
Created attachment 2155 [details]
2nd try to make directory from OS2 client to Samba server : SYS0317

2nd try to make directory from OS2 client to Samba server.
client says 'SYS0317; the system cannot find message 0183 in message file OSO001.MSG'
Comment 8 Alain GORLIER 2006-09-25 03:42:30 UTC
Created attachment 2156 [details]
Make directory from WinXP client to OS2 server, 2 tries : directory already exists

WinXP client session to OS2 server. Message is correct : directory already exists
Comment 9 Alain GORLIER 2006-09-25 03:44:00 UTC
Created attachment 2157 [details]
Make directory from WinXP client to Samba server, 2 tries : directory already exists

WinXP client session to Samba server. Messages are correct : directory already exists
Comment 10 Alain GORLIER 2006-09-25 03:55:07 UTC
Here are 6 ethereal traces containing sessions with make directory from OS2 and WinXP clients that try to make an existing directory on the OS2 or Samba servers.

WinXP client always says "directory already exists" correctly accessing OS2 Lan server or Samba server.

OS2 client always says "directory already exists" correctly accessing OS2 lan server.

But,

OS2 client says NO MESSAGE for the 1st try to make a directory that already exists on Samba server (session setup)
OS2 client says "SYS0317: The system cannot find message 0183 in message file OSO001.MSG" for the next tries to make a directory that already exists on Samba server (session already established).

Beware of the Ethereal messages translation from return codes. Seems to be Windows like. Let's talk about 0xXX return codes.

Comment 11 nicolas 2006-09-25 04:12:14 UTC
*** Bug 4107 has been marked as a duplicate of this bug. ***
Comment 12 Volker Lendecke 2006-09-25 10:44:13 UTC
Just having looked at your comments: The interesting one is missing. What we need is OS/2 client to *Windows* server, where Windows server can also be a XP box.

Volker
Comment 13 Guenter Kukkukk 2006-09-25 11:32:16 UTC
Hi all,
this bug has already been fixed in svn (18896).

reply.c line 3821
...
		if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION) &&
		    !use_nt_status()) {
			/*
			 * Yes, in the DOS error code case we get a
			 * ERRDOS:ERRnoaccess here. See BASE-SAMBA3ERROR
			 * samba4 torture test.
			 */
			status = NT_STATUS_DOS(ERRDOS, ERRnoaccess);
		}
...

I guess, samba-qa will soon close this one and will comment
on a release day.

Cheers, Guenter Kukkukk
Comment 14 Volker Lendecke 2006-09-25 22:33:16 UTC
Günther, there might be more behind this. One of the traces shows a different errno than we return. But I need the OS/2->Windows sniff for this to make sure that Windows not only differentiates based on NTSTATUS vs DOS but also maybe on negotiated protocol.

Volker
Comment 15 Guenter Kukkukk 2006-09-26 21:27:07 UTC
Volker,
now I also checked this with samba-3.0.23c
The bug can be re-produced!
The wrong DosErr 0xb7 (183) is returned.
Ethereal displays 0xb7 as "file already exists" - the IBM OS/2 docu
names it "Shared segment already exists". :-)

When NT_STATUS_OBJECT_NAME_COLLISION ==> 0xC0000035 is returned,
it is mapped to W_ERROR(0xb7) in errormap.c
And this 0xb7 is then falsely returned to OS/2.

nterr.h
#define NT_STATUS_OBJECT_NAME_COLLISION NT_STATUS(0xC0000000 | 0x0035)

errormap.c
{NT_STATUS(0xc0000035), W_ERROR(0xb7)},

I again checked (and sniffed) svn 18931 - and the right error
0x05 is returned.

I'll send 3 sniffs - all with SessSetup and NegProt included:
 - the failing 3.0.23c one
 - the okay one from svn 18931
 - one taken against w2k

Good luck, Guenter
Comment 16 Guenter Kukkukk 2006-09-26 21:30:11 UTC
Created attachment 2162 [details]
kukks: failing one against samba-3.0.23c
Comment 17 Guenter Kukkukk 2006-09-26 21:31:33 UTC
Created attachment 2163 [details]
kukks: the ok one against svn 18931
Comment 18 Guenter Kukkukk 2006-09-26 21:32:13 UTC
Created attachment 2164 [details]
kukks: an ok one against w2k
Comment 19 Volker Lendecke 2006-09-26 23:45:31 UTC
Ok.... So this means in current code it's ok? I'll look at that on Friday or over the weekend, right now I'm travelling.

Thanks for the sniffs!

Volker
Comment 20 Alain GORLIER 2006-11-20 10:59:33 UTC
We have tested samba version 3.0.23d. 
The problem still occurs.
Is the SVN18931 included in this version ?
How could I apply this SVN on 3.0.23d ?

Thanks,


Comment 21 Guenter Kukkukk 2006-11-21 21:05:08 UTC
Ouch, for some strange reasons, the fix was in svn before 
3.0.23d and later, too.

But _not_ in 3.0.23d!

Strange - Guenter Kukkukk