diff options
author | Amitay Isaacs <amitay@gmail.com> | 2011-12-08 09:28:45 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2011-12-13 00:55:32 +1100 |
commit | f02e4ebfafa6e5911e3fe744b1780527ab12c970 (patch) | |
tree | d184dcf1e1a5c102c822e51d57bb846d250b74fe /source4/cldap_server | |
parent | a77b0dd7b8d468d0198c6c8a8649e089172fc922 (diff) | |
download | samba-f02e4ebfafa6e5911e3fe744b1780527ab12c970.tar.gz samba-f02e4ebfafa6e5911e3fe744b1780527ab12c970.tar.bz2 samba-f02e4ebfafa6e5911e3fe744b1780527ab12c970.zip |
s4-cldap: Set DS_DNS_CONTROLLER bit if we are running RPC dnsserver
Till we have internal DNS server which appears in services, use
endpoint services to find out if we are running dns server.
Diffstat (limited to 'source4/cldap_server')
-rw-r--r-- | source4/cldap_server/netlogon.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c index 9d9f45e8bb..e9ec0745f4 100644 --- a/source4/cldap_server/netlogon.c +++ b/source4/cldap_server/netlogon.c @@ -61,6 +61,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx, struct ldb_result *dom_res = NULL, *user_res = NULL; int ret; const char **services = lpcfg_server_services(lp_ctx); + const char **rpc_services = lpcfg_dcerpc_endpoint_servers(lp_ctx); uint32_t server_type; const char *pdc_name; struct GUID domain_uuid; @@ -246,6 +247,10 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx, server_type |= DS_SERVER_KDC; } + if (str_list_check(rpc_services, "dnsserver")) { + server_type |= DS_DNS_CONTROLLER; + } + if (samdb_rodc(sam_ctx, &am_rodc) == LDB_SUCCESS && !am_rodc) { server_type |= DS_SERVER_WRITABLE; } |