Bug 6254 - PUT/GET produces an error in IPv6 to a smb-server(3.3) has parameter "msdfs root = yes"
Summary: PUT/GET produces an error in IPv6 to a smb-server(3.3) has parameter "msdfs r...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.3
Classification: Unclassified
Component: Client tools (show other bugs)
Version: 3.3.3
Hardware: x86 Linux
: P3 critical
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-09 01:31 UTC by Jason.Wong
Modified: 2009-04-13 10:11 UTC (History)
1 user (show)

See Also:


Attachments
Patch for 3.3 I'm testing (1.27 KB, patch)
2009-04-10 00:25 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason.Wong 2009-04-09 01:31:58 UTC
1 Install the samba-server(3.3) and samba-client(3.3) on Fedola 8.
2 Set the parameter, "msdfs root = yes", in file /etc/samba/smb.conf.
3 Restart samba server (/sbin/service smb restart).
4 From client to do the following test.
 smbclient //2001:250:6c01:100::3/test -U test%xxx -c "put test.txt text.txt"
 There is an error happened:
 
   "NT_STATUS_OBJECT_PATH_NOT_FOUND opening remote file \text.txt"

5 But, in IPv4, it works correctly.
6 Besides, in IPv6, not all commands produce errors, for example:
   [–c “ls”],
   [-c “mkdir ”],
   [-c “rd “],
   [-c “del ”] are correct.

7 Whereas, set the parameter, "msdfs root = no", in /etc/samba/smb.conf;
  All functions above (in both IPv4, IPv6) are correct.

Best
Jason.Wong
2009/04/09
Comment 1 Jeremy Allison 2009-04-09 12:00:50 UTC
Just to confirm, if you use a IPv6 DNS name in the msdfs link, it should work correctly - yes ? It only fails with the IPv6 raw address here.
If you can confirm, this should be a reasonably easy fix.
Jeremy.
Comment 2 Jeremy Allison 2009-04-09 12:16:46 UTC
Never mind. I misunderstood the bug report. I'll try and reproduce it here and create a fix for you asap.
Jeremy.
Comment 3 Jeremy Allison 2009-04-10 00:25:21 UTC
Created attachment 4057 [details]
Patch for 3.3 I'm testing

Looks like the refactoring of the open file code for "create_file()" broke the opening of IPv6 filenames in msdfs root mode (IPv6 addresses contain ":" which gets the full \ip-v6-addr\share\filename mistakenly recognized as an NTFS Stream name. All MS-DFS path processing must be done *first* in create_file().
Jeremy.
Comment 4 Jeremy Allison 2009-04-10 00:53:23 UTC
This patch fixes the problem here, and I've committed it to all git branches (3.2.x, 3.3.x, 3.4.x and master).
Let me know if it fixes the problem for you and we'll close out the bug.
Thanks for reporting the problem !
Jeremy.
Comment 5 Jason.Wong 2009-04-13 06:53:45 UTC
Yes, I'v confirmed it.
That's great! It works fine.
Thank you.
Comment 6 Jeremy Allison 2009-04-13 10:11:49 UTC
Confirmed fixed.
Jeremy.