diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-12-09 14:39:05 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-12-09 18:18:26 +1100 |
commit | 732c701c52932419e602adfe726dee89d89549d3 (patch) | |
tree | 104d89ed6eb5c85abd01ec43a45a0edbe90f332e | |
parent | 16eb25b35b1a2bf9d7e96db26c8a379d15adc106 (diff) | |
download | samba-732c701c52932419e602adfe726dee89d89549d3.tar.gz samba-732c701c52932419e602adfe726dee89d89549d3.tar.bz2 samba-732c701c52932419e602adfe726dee89d89549d3.zip |
s4-drs: ensure we fill in ncRoot_dn in getncchanges
Signed-off-by: Andrew Tridgell <tridge@samba.org>
-rw-r--r-- | source4/rpc_server/drsuapi/getncchanges.c | 7 |
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 */ |