r26680: Don't always advertise GC functionality.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 7 Jan 2008 06:47:01 +0000 (00:47 -0600)
committerStefan Metzmacher <metze@samba.org>
Mon, 7 Jan 2008 00:51:02 +0000 (18:51 -0600)
Andrew Bartlett

source/cldap_server/netlogon.c

index f77909e8fa1bfdaab72076850fe500b518cf4030..3493e342d63822d0a198305c0c442958af5959ba 100644 (file)
@@ -162,7 +162,6 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
        }
 
        server_type      = 
-               NBT_SERVER_GC | 
                NBT_SERVER_DS | NBT_SERVER_TIMESERV |
                NBT_SERVER_CLOSEST | NBT_SERVER_WRITABLE | 
                NBT_SERVER_GOOD_TIMESERV;
@@ -171,6 +170,10 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
                server_type |= NBT_SERVER_PDC;
        }
 
+       if (samdb_is_gc(cldapd->samctx)) {
+               server_type |= NBT_SERVER_GC;
+       }
+
        if (str_list_check(services, "ldap")) {
                server_type |= NBT_SERVER_LDAP;
        }