r160: Fix msdfs proxy. Could others please also test this, this code is soo
authorVolker Lendecke <vlendec@samba.org>
Sun, 11 Apr 2004 10:33:05 +0000 (10:33 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:51:11 +0000 (10:51 -0500)
cluttered. I've tested with w2k and xp with msdfs proxy and normal msdfs root,
but I would like others to also look at the code.

Thanks,

Volker
(This used to be commit c31feb045a3d9a6bc1dfd0377a74d93354e8034a)

source3/msdfs/msdfs.c

index 2ac7bda17547631f1b477910d97eab91b2a60fa1..c66f0477a84073b2ea02dd01a01f8d5e4a12508b 100644 (file)
@@ -495,15 +495,13 @@ BOOL get_referred_path(char *pathname, struct junction_map *jucn,
         */
 
        if (dp.reqpath[0] == '\0') {
-               return self_ref(pathname, jucn, consumedcntp, self_referralp);
-       }
-
-       pstrcpy(conn_path, lp_pathname(snum));
-       if (!create_conn_struct(conn, snum, conn_path))
-               return False;
 
-       if (*lp_msdfs_proxy(snum) != '\0') {
                struct referral* ref;
+
+               if (*lp_msdfs_proxy(snum) == '\0')
+                       return self_ref(pathname, jucn, consumedcntp,
+                                       self_referralp);
+
                jucn->referral_count = 1;
                if ((ref = (struct referral*) malloc(sizeof(struct referral))) == NULL) {
                        DEBUG(0, ("malloc failed for referral\n"));
@@ -522,6 +520,10 @@ BOOL get_referred_path(char *pathname, struct junction_map *jucn,
                goto out;
        }
 
+       pstrcpy(conn_path, lp_pathname(snum));
+       if (!create_conn_struct(conn, snum, conn_path))
+               return False;
+
        /* If not remote & not a self referral, return False */
        if (!resolve_dfs_path(pathname, &dp, conn, False, 
                              &jucn->referral_list, &jucn->referral_count,