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;
DS_SERVER_DS | DS_SERVER_TIMESERV |
DS_SERVER_GOOD_TIMESERV;
-#if 0
- /* w2k8-r2 as a DC does not claim these */
- server_type |= DS_DNS_CONTROLLER | DS_DNS_DOMAIN;
-#endif
-
if (samdb_is_pdc(sam_ctx)) {
server_type |= DS_SERVER_PDC;
}
server_type |= DS_SERVER_KDC;
}
- if (samdb_rodc(sam_ctx, &am_rodc) == LDB_SUCCESS && !am_rodc) {
- server_type |= DS_SERVER_WRITABLE;
+ if (str_list_check(rpc_services, "dnsserver")) {
+ server_type |= DS_DNS_CONTROLLER;
}
-#if 0
- /* w2k8-r2 as a sole DC does not claim this */
- if (ldb_dn_compare(ldb_get_root_basedn(sam_ctx), ldb_get_default_basedn(sam_ctx)) == 0) {
- server_type |= DS_DNS_FOREST_ROOT;
+ if (samdb_rodc(sam_ctx, &am_rodc) == LDB_SUCCESS && !am_rodc) {
+ server_type |= DS_SERVER_WRITABLE;
}
-#endif
pdc_name = talloc_asprintf(mem_ctx, "\\\\%s",
lpcfg_netbios_name(lp_ctx));