dfs_server_ad: return STATUS_NOT_FOUND if the client connects to an ip address
authorStefan Metzmacher <metze@samba.org>
Sun, 29 Jul 2012 22:49:13 +0000 (00:49 +0200)
committerStefan Metzmacher <metze@samba.org>
Sun, 29 Jul 2012 23:22:09 +0000 (01:22 +0200)
metze

dfs_server/dfs_server_ad.c

index 6b71f70..a354ec2 100644 (file)
@@ -26,6 +26,7 @@
 #include "param/param.h"
 #include "lib/tsocket/tsocket.h"
 #include "dfs_server/dfs_server_ad.h"
+#include "lib/util/util_net.h"
 
 #define MAX_DFS_RESPONSE 56*1024 /* 56 Kb */
 
@@ -816,7 +817,14 @@ NTSTATUS dfs_server_ad_get_referrals(struct loadparm_context *lp_ctx,
                 * handle it here.
                 */
                return NT_STATUS_NOT_FOUND;
+       }
 
+       if (is_ipaddress(server_name)) {
+               /*
+                * If it is not domain related do not
+                * handle it here.
+                */
+               return NT_STATUS_NOT_FOUND;
        }
 
        if ((strcasecmp_m(server_name, netbios_domain) != 0) &&