dsgetdcname: the forest name should never be empty.
authorGünther Deschner <gd@samba.org>
Thu, 8 May 2008 12:24:46 +0000 (14:24 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 26 May 2008 09:50:46 +0000 (11:50 +0200)
Guenther
(cherry picked from commit 2c0a96f1e5fc065fdbeb5671cfa693009321dde8)

source/libsmb/dsgetdcname.c

index 2c8f42399f9b41e0e100a8e5fca13c05614a1acc..8021f8f054dd74b4ed11a7279e16a06ba87ffc05 100644 (file)
@@ -785,7 +785,7 @@ static NTSTATUS make_domain_controller_info(TALLOC_CTX *mem_ctx,
                NT_STATUS_HAVE_NO_MEMORY(info->domain_name);
        }
 
-       if (forest_name) {
+       if (forest_name && *forest_name) {
                info->forest_name = talloc_strdup(mem_ctx, forest_name);
                NT_STATUS_HAVE_NO_MEMORY(info->forest_name);
                flags |= DS_DNS_FOREST;