Bug 10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba.
Summary: MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba.
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
: 10095 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-19 18:21 UTC by Jeremy Allison
Modified: 2020-09-24 01:20 UTC (History)
4 users (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
Patch for v4-10-test (1.41 KB, patch)
2019-04-15 13:50 UTC, Stefan Metzmacher
jra: review+
Details
Patch for v4-9-test (1.41 KB, text/plain)
2019-04-15 13:50 UTC, Stefan Metzmacher
jra: review+
Details
Patch for v4-8-test (1.41 KB, text/plain)
2019-04-15 13:51 UTC, Stefan Metzmacher
jra: 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!
Comment 15 Stefan Metzmacher 2019-04-15 13:50:28 UTC
Created attachment 15065 [details]
Patch for v4-10-test
Comment 16 Stefan Metzmacher 2019-04-15 13:50:59 UTC
Created attachment 15066 [details]
Patch for v4-9-test
Comment 17 Stefan Metzmacher 2019-04-15 13:51:27 UTC
Created attachment 15067 [details]
Patch for v4-8-test
Comment 18 Jeremy Allison 2019-04-15 21:18:58 UTC
Re-assigning to Karolin for inclusion in 4.10.next, 4.9.next (4.8.next?).
Comment 19 Karolin Seeger 2019-04-16 07:27:03 UTC
(In reply to Jeremy Allison from comment #18)
Pushed to autobuild-v4-{10,9}-test.
Comment 20 Karolin Seeger 2019-04-25 07:08:00 UTC
(In reply to Karolin Seeger from comment #19)
Pushed to both branches.
Closing out bug report.

Thanks!