Bug 10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba.
MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba.
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: File services
unspecified
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
: 10095 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-19 18:21 UTC by Jeremy Allison
Modified: 2013-08-21 06:52 UTC (History)
1 user (show)

See Also:


Attachments
git-am fix for master/4.1.0/4.0.next (3.65 KB, patch)
2013-08-19 18:31 UTC, Jeremy Allison
rsharpe: review+
Details
git-am fix for 3.6.next (3.68 KB, patch)
2013-08-19 20:12 UTC, Jeremy Allison
rsharpe: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2013-08-19 18:21:00 UTC
From samba-technical.

Date: Fri, 16 Aug 2013 18:18:33 -0700
From: Richard Sharpe <realrichardsharpe@gmail.com>
To: samba-technical <samba-technical@lists.samba.org>
Subject: Mac OS X 10.9 following Samba DFS referrals (and possibly 10.76,10.8)

Hi folks,

It turns out that Mac OS X 10.9 will not follow path-based DFS
referrals handed out by Samba.

It turns out that this seems to be because Samba does not actually do
what Windows does with such things.

Firstly, Windows adds FILE_ATTRIBUTE_REPARSE_POINT to all directory
entries that are DFS junction points in a FIND (FIND FIRST/FIND NEXT)
response (SMB_FIND_ID_BOTH_DIRECTORY_INFO and others)).

Secondly, Windows places IO_REPARSE_TAG_DFS in the EA size field for
reasons known only to MS.

With these two changes, Mac OS X 10.9 will happily follow path-based DFS links.

(Thanks to George Colley for the hint that allowed me to figure this out.)
Comment 1 Jeremy Allison 2013-08-19 18:31:51 UTC
Created attachment 9146 [details]
git-am fix for master/4.1.0/4.0.next

This is what I've pushed to master.
Jeremy.
Comment 2 Richard Sharpe 2013-08-19 18:35:15 UTC
Comment on attachment 9146 [details]
git-am fix for master/4.1.0/4.0.next

Looks good to me.
Comment 3 Jeremy Allison 2013-08-19 19:31:17 UTC
Comment on attachment 9146 [details]
git-am fix for master/4.1.0/4.0.next

Fix applies cleanly to 4.1.0, 4.0.x. I'll back-port for 3.6.x.

Jeremy.
Comment 4 Richard Sharpe 2013-08-19 19:43:42 UTC
Turns out that this change allows Win XP to follow DFS referrals from Samba as well.
Comment 5 Jeremy Allison 2013-08-19 19:47:50 UTC
Didn't know we had a problem with that :-).

Jeremy.
Comment 6 Jeremy Allison 2013-08-19 20:12:56 UTC
Created attachment 9147 [details]
git-am fix for 3.6.next

Back-ported version for 3.6.next.

Jeremy.
Comment 7 Richard Sharpe 2013-08-19 20:14:47 UTC
(In reply to comment #5)
> Didn't know we had a problem with that :-).

Yeah. For some reason the more recent versions of Windows set the DFS bit in the header more frequently than XP does so XP want's to see that there is a reparse point there.
Comment 8 Jeremy Allison 2013-08-19 20:35:57 UTC
Richard, can you give me a +1 on the 3.6.x patch, then I'll re-assign to Karolin for inclusion in all our branches.

Cheers,

Jeremy.
Comment 9 Richard Sharpe 2013-08-19 20:40:34 UTC
Comment on attachment 9147 [details]
git-am fix for 3.6.next

Yes. Looks good to me.
Comment 10 Jeremy Allison 2013-08-19 20:42:09 UTC
Re-assigning to Karolin for inclusion in 4.1.0, 4.0.next, 3.6.next.

Jeremy.
Comment 11 Richard Sharpe 2013-08-19 21:05:40 UTC
Also, this approach works with Mac OS X 10.7 and 10.9 so it probably works for 10.8 as well.
Comment 12 Jeremy Allison 2013-08-19 21:35:43 UTC
*** Bug 10095 has been marked as a duplicate of this bug. ***
Comment 13 Karolin Seeger 2013-08-20 08:36:49 UTC
(In reply to comment #10)
> Re-assigning to Karolin for inclusion in 4.1.0, 4.0.next, 3.6.next.
> 
> Jeremy.

Pushed to autobuild-v4-1-test, autobuild-v4-0-test and v3-6-test.
Comment 14 Karolin Seeger 2013-08-21 06:52:17 UTC
Pushed to v4-1-test and v4-0-test.
Closing out bug report.

Thanks!