From 732c701c52932419e602adfe726dee89d89549d3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 9 Dec 2009 14:39:05 +1100 Subject: s4-drs: ensure we fill in ncRoot_dn in getncchanges Signed-off-by: Andrew Tridgell --- source4/rpc_server/drsuapi/getncchanges.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/rpc_server/drsuapi') 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 */ -- cgit