Add check to prevent non-Dfs clients from connecting to an msdfs proxy.
[samba.git] / source3 / smbd / service.c
index 1f168dd3ffff5b62c677be2d1bab9785c904992a..d00c908a1a9396f2b56d05d3091e5f9b267d9cea 100644 (file)
@@ -833,6 +833,13 @@ connection_struct *make_connection(const char *service_in, DATA_BLOB password,
                return NULL;
        }
 
+       /* Handle non-Dfs clients attempting connections to msdfs proxy */
+       if (lp_host_msdfs() && (*lp_msdfs_proxy(snum) != '\0'))  {
+               DEBUG(3, ("refusing connection to dfs proxy '%s'\n", service));
+               *status = NT_STATUS_BAD_NETWORK_NAME;
+               return NULL;
+       }
+
        DEBUG(5, ("making a connection to 'normal' service %s\n", service));
 
        return make_connection_snum(snum, vuser,