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.
Created attachment 2149 [details]
Here is the ethereal traces for OS2 client / Samba server
Created attachment 2150 [details]
Here is the ethereal traces for OS2 client / OS2 lan server
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.
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"
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"
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
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'
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
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
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.
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.
*** Bug 4107 has been marked as a duplicate of this bug. ***
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.
this bug has already been fixed in svn (18896).
reply.c line 3821
if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION) &&
* 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
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.
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.
#define NT_STATUS_OBJECT_NAME_COLLISION NT_STATUS(0xC0000000 | 0x0035)
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
Created attachment 2162 [details]
kukks: failing one against samba-3.0.23c
Created attachment 2163 [details]
kukks: the ok one against svn 18931
Created attachment 2164 [details]
kukks: an ok one against w2k
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!
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 ?
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