const char *pdc_ip;
struct ldb_dn *domain_dn = NULL;
struct interface *ifaces;
- bool user_known;
+ bool user_known, am_rodc;
NTSTATUS status;
/* the domain parameter could have an optional trailing "." */
server_type =
DS_SERVER_DS | DS_SERVER_TIMESERV |
- DS_SERVER_CLOSEST | DS_SERVER_WRITABLE |
+ DS_SERVER_CLOSEST |
DS_SERVER_GOOD_TIMESERV;
#if 0
server_type |= DS_SERVER_KDC;
}
+ if (samdb_rodc(sam_ctx, &am_rodc) != LDB_SUCCESS && !am_rodc) {
+ server_type |= DS_SERVER_WRITABLE;
+ }
+
#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) {