Bug 5641 - Can't use Samba server as DFS host via dfsgui.msc
Summary: Can't use Samba server as DFS host via dfsgui.msc
Status: NEW
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.31
Hardware: x86 Windows 2003
: P3 major
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-28 13:09 UTC by Brian Nelson
Modified: 2009-08-11 04:13 UTC (History)
3 users (show)

See Also:


Attachments
tcpdump trace of the client-server communication (3.50 KB, application/octet-stream)
2008-07-28 13:11 UTC, Brian Nelson
no flags Details
level 10 debug log from smbd of client-server comminucation (120.78 KB, text/plain)
2008-07-28 13:12 UTC, Brian Nelson
no flags Details
tcpdump trace of the client-server communication with full packets (5.29 KB, application/octet-stream)
2008-07-28 16:27 UTC, Brian Nelson
no flags Details
comparative trace of the same call against windows machine (8.42 KB, application/octet-stream)
2008-07-28 17:21 UTC, Brian Nelson
no flags Details
level 10 debug log showing 2nd failure type (213.73 KB, text/plain)
2008-07-29 11:03 UTC, Brian Nelson
no flags Details
network trace against samba of failing 2nd step (18.03 KB, application/octet-stream)
2008-07-29 11:04 UTC, Brian Nelson
no flags Details
working network trace against windows for compairison. (29.24 KB, application/octet-stream)
2008-07-29 11:05 UTC, Brian Nelson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Nelson 2008-07-28 13:09:09 UTC
I tried to create a DFS root in my 2003 AD domain and point it to a share hosted on a Samba server. From the documentation, I thought that this was supported (msdfs host = yes ?). This is with Samba 3.0.31 on RHEL 5 x86. The domain controllers are MS 2003 SP2, all in native-2003 mode. I also tried with samba 3.0.28 with the same result.

When I go to create the DFS root (via the msc plugin) and instruct it to use my samba machine as the host, I get this error:

"The computer you entered cannot host the DFS root. You must enter the name of a computer running an operating system in the Windows 2000 Server or Windows Server 2003 families."

Just to be clear, I'm NOT trying to make Samba a DFS root, just a host (ie target) for a DFS root that will exist on the AD domain.
Comment 1 Brian Nelson 2008-07-28 13:11:42 UTC
Created attachment 3427 [details]
tcpdump trace of the client-server communication
Comment 2 Brian Nelson 2008-07-28 13:12:25 UTC
Created attachment 3428 [details]
level 10 debug log from smbd of client-server comminucation
Comment 3 Volker Lendecke 2008-07-28 16:18:46 UTC
Can you please upload the dump again, this time with full packets? You can make tcpdump dump more with -s 1500 or -s 0.

Volker
Comment 4 Brian Nelson 2008-07-28 16:27:54 UTC
Created attachment 3429 [details]
tcpdump trace of the client-server communication with full packets
Comment 5 Volker Lendecke 2008-07-28 16:35:28 UTC
Thanks. It would be great if you could send a comparative trace of the same call against a working Windows DFS target. I suspect that the bitmask sent in the Server Type field of frame 33 matters, I would like to see what a working box sends. As a simple patch we could just send back the same bitmask and see how far we come then.

Volker
Comment 6 Brian Nelson 2008-07-28 17:21:53 UTC
Created attachment 3430 [details]
comparative trace of the same call against windows machine

This is against Windows 2003R2 SP2.

There are some bits different. If the wireshark descriptions are correct, the only strange one is that samba says it's Xenix. Another strange thing is that samba says it is a domain member and windows does not (but it definitely is).

Another possibility could be that the msc wants major version >= 5 ?
Comment 7 Volker Lendecke 2008-07-29 00:56:33 UTC
Oh, the version is easy to test: "announce version = 5.2".

Volker
Comment 8 Brian Nelson 2008-07-29 11:03:34 UTC
Created attachment 3439 [details]
level 10 debug log showing 2nd failure type

Ok, that was easy! Setting 'announce version' to 5.x makes that step work.

Now however, when I get to the last step and click finish I get a new error: "The stub received bad data."

Looking at the debug log, I believe this is where it dies:

Requested \PIPE\netdfs
api_rpcTNP: netdfs op 0xa - api_rpcTNP: rpc command: DFS_ADDFTROOT
api_rpc_cmds[10].fn == 0x8665d0
000000 netdfs_io_q_dfs_AddFtRoot 
000000 netdfs_io_r_dfs_AddFtRoot 
    0000 status: WERR_NOT_SUPPORTED
api_rpcTNP: called netdfs successfully
api_rpcTNP: rpc input buffer underflow (parse error?)


I will upload network traces in a sec.
Comment 9 Brian Nelson 2008-07-29 11:04:19 UTC
Created attachment 3440 [details]
network trace against samba of failing 2nd step
Comment 10 Brian Nelson 2008-07-29 11:05:54 UTC
Created attachment 3441 [details]
working network trace against windows for compairison.

This trace is a start to finish of the whole process.
Comment 11 Brian Nelson 2008-07-29 12:18:47 UTC
Ah yes. We seem to be here:

source/rpc_server/srv_dfs_nt.c:
WERROR _dfs_AddFtRoot(pipes_struct *p, NETDFS_Q_DFS_ADDFTROOT *q_u, NETDFS_R_DFS_ADDFTROOT *r_u)
{
        /* FIXME: Implement your code here */
        return WERR_NOT_SUPPORTED;
}


So I guess this issue is going to be more of an RFE than a bug.
Comment 12 Jeremy Allison 2008-07-29 12:20:37 UTC
The good news is that all these info levels are now documented, so we can take a look at adding this in a reasonable timeframe.
Jeremy.
Comment 13 Matthieu Patou 2009-06-20 12:16:26 UTC
Jeremy, any update on this bug ?