The branch, master has been updated
       via  22945de doc/msdfs proxy: extend example for multi target config
       via  85b5bed smbd: Support multiple dfs targets for msdfs proxy shares
      from  127fc67 libcli/smb: fix smb2cli_ioctl*() against Windows 2008.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 22945de4300cff49db663c5d7c69bd76ac889c9d
Author: Björn Jacke <b...@sernet.de>
Date:   Thu Oct 31 12:01:22 2013 +0100

    doc/msdfs proxy: extend example for multi target config
    
    Signed-off-by: Björn Jacke <b...@sernet.de>
    Reviewed-by: Michael Adam <ob...@samba.org>
    
    Autobuild-User(master): Björn Jacke <b...@sernet.de>
    Autobuild-Date(master): Fri Nov  1 00:12:19 CET 2013 on sn-devel-104

commit 85b5bedd43cdb758463cb03079eb1bb4aadf6677
Author: Volker Lendecke <v...@samba.org>
Date:   Wed Oct 30 13:22:05 2013 +0000

    smbd: Support multiple dfs targets for msdfs proxy shares
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Björn Jacke <b...@sernet.de>

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/smbdotconf/vfs/msdfsproxy.xml |    6 ++--
 source3/smbd/msdfs.c                   |   34 +++++++------------------------
 2 files changed, 11 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/vfs/msdfsproxy.xml 
b/docs-xml/smbdotconf/vfs/msdfsproxy.xml
index 5117bae..566dcd7 100644
--- a/docs-xml/smbdotconf/vfs/msdfsproxy.xml
+++ b/docs-xml/smbdotconf/vfs/msdfsproxy.xml
@@ -6,13 +6,13 @@
        <para>This parameter indicates that the share is a
        stand-in for another CIFS share whose location is specified by
        the value of the parameter. When clients attempt to connect to
-       this share, they are redirected to the proxied share using
-       the SMB-Dfs protocol.</para>
+       this share, they are redirected to one or multiple, comma separated
+       proxied shares using the SMB-Dfs protocol.</para>
 
        <para>Only Dfs roots can act as proxy shares. Take a look at the
        <smbconfoption name="msdfs root"/> and <smbconfoption name="host 
msdfs"/>
        options to find out how to set up a Dfs root share.</para>
 </description>
 
-<value type="example">\otherserver\someshare</value>
+<value type="example">\otherserver\someshare,\otherserver2\someshare</value>
 </samba:parameter>
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 52a2a48..aede3e6 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -958,6 +958,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
        if (pdp->reqpath[0] == '\0') {
                char *tmp;
                struct referral *ref;
+               int refcount;
 
                if (*lp_msdfs_proxy(talloc_tos(), snum) == '\0') {
                        TALLOC_FREE(pdp);
@@ -973,39 +974,20 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
                 * the configured target share.
                 */
 
-               jucn->referral_count = 1;
-               if ((ref = talloc_zero(ctx, struct referral)) == NULL) {
+               tmp = talloc_asprintf(talloc_tos(), "msdfs:%s",
+                                     lp_msdfs_proxy(talloc_tos(), snum));
+               if (tmp == NULL) {
                        TALLOC_FREE(pdp);
                        return NT_STATUS_NO_MEMORY;
                }
 
-               if (!(tmp = talloc_strdup(ctx, lp_msdfs_proxy(talloc_tos(), 
snum)))) {
+               if (!parse_msdfs_symlink(ctx, tmp, &ref, &refcount)) {
+                       TALLOC_FREE(tmp);
                        TALLOC_FREE(pdp);
-                       return NT_STATUS_NO_MEMORY;
+                       return NT_STATUS_INVALID_PARAMETER;
                }
-
-               trim_string(tmp, "\\", 0);
-
-               ref->alternate_path = talloc_asprintf(ctx, "\\%s", tmp);
                TALLOC_FREE(tmp);
-
-               if (!ref->alternate_path) {
-                       TALLOC_FREE(pdp);
-                       return NT_STATUS_NO_MEMORY;
-               }
-
-               if (pdp->reqpath[0] != '\0') {
-                       ref->alternate_path = talloc_asprintf_append(
-                                       ref->alternate_path,
-                                       "%s",
-                                       pdp->reqpath);
-                       if (!ref->alternate_path) {
-                               TALLOC_FREE(pdp);
-                               return NT_STATUS_NO_MEMORY;
-                       }
-               }
-               ref->proximity = 0;
-               ref->ttl = REFERRAL_TTL;
+               jucn->referral_count = refcount;
                jucn->referral_list = ref;
                *consumedcntp = strlen(dfs_path);
                TALLOC_FREE(pdp);


-- 
Samba Shared Repository

Reply via email to