summaryrefslogtreecommitdiff
path: root/source4/rpc_server/drsuapi
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server/drsuapi')
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index cb0a145639..24ff324992 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -402,6 +402,13 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
return WERR_NOMEM;
}
b_state->getncchanges_state = getnc_state;
+ getnc_state->ncRoot_dn = ldb_dn_new(getnc_state, b_state->sam_ctx, ncRoot->dn);
+ }
+
+ if (!ldb_dn_validate(getnc_state->ncRoot_dn) ||
+ ldb_dn_is_null(getnc_state->ncRoot_dn)) {
+ DEBUG(0,(__location__ ": Bad DN '%s'\n", ncRoot->dn));
+ return WERR_DS_DRA_INVALID_PARAMETER;
}
/* we need the session key for encrypting password attributes */