jra's patch -- fix anonymous self referral code to check that a share is an msdfs...
authorGerald Carter <jerry@samba.org>
Thu, 25 Mar 2004 14:41:56 +0000 (14:41 +0000)
committerGerald Carter <jerry@samba.org>
Thu, 25 Mar 2004 14:41:56 +0000 (14:41 +0000)
(This used to be commit 641c2acd92b358fab4441071df411adbbd934ae8)

source3/msdfs/msdfs.c

index 2df5fcf4f5acd5da1ace2afdae84342c02125543..2ac7bda17547631f1b477910d97eab91b2a60fa1 100644 (file)
@@ -481,6 +481,12 @@ BOOL get_referred_path(char *pathname, struct junction_map *jucn,
                        return False;
        }
 
+       if (!lp_msdfs_root(snum)) {
+               DEBUG(3,("get_referred_path: .%s. in dfs path %s is not a dfs root.\n",
+                        dp.servicename, pathname));
+               goto out;
+       }
+
        /*
         * Self referrals are tested with a anonymous IPC connection and
         * a GET_DFS_REFERRAL call to \\server\share. (which means dp.reqpath[0] points
@@ -496,12 +502,6 @@ BOOL get_referred_path(char *pathname, struct junction_map *jucn,
        if (!create_conn_struct(conn, snum, conn_path))
                return False;
 
-       if (!lp_msdfs_root(SNUM(conn))) {
-               DEBUG(3,("get_referred_path: .%s. in dfs path %s is not a dfs root.\n",
-                        dp.servicename, pathname));
-               goto out;
-       }
-
        if (*lp_msdfs_proxy(snum) != '\0') {
                struct referral* ref;
                jucn->referral_count = 1;