summaryrefslogtreecommitdiff
path: root/source4/nbt_server/dgram
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-04-14 08:00:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:33 -0500
commit0ab612f69ea273731aedb6766c7a4033f51e1f95 (patch)
tree3b65481dab397bfa44264777b38b319c3e4a17a7 /source4/nbt_server/dgram
parente284a262942eb8c69d7862cb61bf4542baec6032 (diff)
downloadsamba-0ab612f69ea273731aedb6766c7a4033f51e1f95.tar.gz
samba-0ab612f69ea273731aedb6766c7a4033f51e1f95.tar.bz2
samba-0ab612f69ea273731aedb6766c7a4033f51e1f95.zip
r6339: set the NBT_SERVER_LDAP and NBT_SERVER_KDC bits based on config
(andrew, please fix the method of sseeing if we do krb5, if you can think of a better one) (This used to be commit 4c2207c946fa7bb6a8ba32ac82256c424b5d0d3c)
Diffstat (limited to 'source4/nbt_server/dgram')
-rw-r--r--source4/nbt_server/dgram/netlogon.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c
index d47c45a875..e3f52928bf 100644
--- a/source4/nbt_server/dgram/netlogon.c
+++ b/source4/nbt_server/dgram/netlogon.c
@@ -80,6 +80,7 @@ static void nbtd_netlogon_getdc2(struct dgram_mailslot_handler *dgmslot,
const char *attrs[] = {"realm", "dnsDomain", "objectGUID", NULL};
struct ldb_message **res;
int ret;
+ const char **services = lp_server_services();
/* only answer getdc requests on the PDC or LOGON names */
if (name->type != NBT_NAME_PDC && name->type != NBT_NAME_LOGON) {
@@ -111,9 +112,18 @@ static void nbtd_netlogon_getdc2(struct dgram_mailslot_handler *dgmslot,
/* TODO: accurately depict which services we are running */
pdc->server_type =
- NBT_SERVER_PDC | NBT_SERVER_GC | NBT_SERVER_LDAP |
- NBT_SERVER_DS | NBT_SERVER_KDC | NBT_SERVER_TIMESERV |
- NBT_SERVER_CLOSEST | NBT_SERVER_WRITABLE | NBT_SERVER_GOOD_TIMESERV;
+ NBT_SERVER_PDC | NBT_SERVER_GC |
+ NBT_SERVER_DS | NBT_SERVER_TIMESERV |
+ NBT_SERVER_CLOSEST | NBT_SERVER_WRITABLE |
+ NBT_SERVER_GOOD_TIMESERV;
+
+ /* hmm, probably a better way to do this */
+ if (lp_parm_bool(-1, "gensec", "krb5", True)) {
+ pdc->server_type |= NBT_SERVER_KDC;
+ }
+ if (str_list_check(services, "ldap")) {
+ pdc->server_type |= NBT_SERVER_LDAP;
+ }
pdc->domain_uuid = samdb_result_guid(res[0], "objectGUID");
pdc->forest = samdb_result_string(res[0], "realm", lp_realm());