Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Gerlando Falauto <gerlando.falauto-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
To: samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: gerlando.falauto-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org
Subject: mount.cifs on Win2k8 DFS servers
Date: Mon, 17 Oct 2011 13:58:46 +0200	[thread overview]
Message-ID: <4E9C1876.5090205@keymile.com> (raw)

Hi,

my CIFS kernel module (linux 2.6.39.3) fails to mount DFS trees from 
Win2k8 servers.

Whereas upon "Tree Connect AndX Request"s (for a DFS tree) Win2k3 used 
to reply with STATUS_PATH_NOT_COVERED, Win2k8 now answers with 
STATUS_BAD_NETWORK_NAME, pretty much the same thing it would say about a 
non-existing share.

This is somewhat related to:
https://bugzilla.samba.org/show_bug.cgi?id=8003
but in fact only affects cifs-fs and NOT smbclient which works fine for me.

In fact, Windows machines (and smbclient, for that matter) don't ever 
try connecting the tree, as they both start off with a "Trans2 Request" 
GET_DFS_REFERRAL.

Excerpt from source3/libsmb/clidfs.c:
=== CUT ===
     /* here's the fun part....to support 'msdfs proxy' shares
       (on Samba or windows) we have to issues a TRANS_GET_DFS_REFERRAL
        here before trying to connect to the original share.
        cli_check_msdfs_proxy() will fail if it is a normal share. */

     if ((cli_state_capabilities(c) & CAP_DFS) &&
=== CUT ===

Now, I came up with a workaround (which I would not post here in order 
not to be yelled at...) for cifs-fs which simply treats 
NT_STATUS_BAD_NETWORK_NAME as NT_STATUS_PATH_NOT_COVERED, but I guess we 
need a better solution.

What should be the be best approach for facing this?
Detecting the server has DFS capabilities and start getting DFS 
referrals to begin with?
Has this been discussed in the past? I find it hard to believe that no 
one has reported this problem before...

Thanks!
Gerlando

             reply	other threads:[~2011-10-17 11:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17 11:58 Gerlando Falauto [this message]
     [not found] ` <4E9C1876.5090205-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
2011-10-17 12:28   ` mount.cifs on Win2k8 DFS servers Jeff Layton
2011-10-17 12:36   ` sean finney
     [not found]     ` <20111017123635.GA5978-Znhnm/lQSyjxW5zecs3cv0EOCMrvLtNR@public.gmane.org>
2011-10-17 15:04       ` Gerlando Falauto
2011-10-17 17:11         ` sean finney
     [not found]           ` <20111017171152.GA7102-Znhnm/lQSyjxW5zecs3cv0EOCMrvLtNR@public.gmane.org>
2011-10-18  9:18             ` Gerlando Falauto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E9C1876.5090205@keymile.com \
    --to=gerlando.falauto-skabal50j+5bdgjk7y7tuq@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox