From: Andrew Bartlett Date: Tue, 27 Jun 2023 02:22:52 +0000 (+1200) Subject: s4-rpc_server/drsuapi: Remove rudundant check for valid and non-NULL ncRoot_dn X-Git-Tag: samba-4.17.11~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bddbe2ca6df85aa9291c1bbaa4bd511e35f4dd6;p=thirdparty%2Fsamba.git s4-rpc_server/drsuapi: Remove rudundant check for valid and non-NULL ncRoot_dn This check was valuable before aee2039e63ceeb5e69a0461fb77e0f18278e4dc4 but now only checks things we know to be true, as the value has come from Samba via drs_ObjectIdentifier_to_dn_and_nc_root() either on this or a previous call. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher (cherry picked from commit 0550e469eda4022659718ae9a56f5deaa9f9a307) --- diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c index 977a0b75069..aaf8d8519ab 100644 --- a/source4/rpc_server/drsuapi/getncchanges.c +++ b/source4/rpc_server/drsuapi/getncchanges.c @@ -3136,13 +3136,6 @@ allowed: TALLOC_FREE(res); } - if (!ldb_dn_validate(getnc_state->ncRoot_dn) || - ldb_dn_is_null(getnc_state->ncRoot_dn)) { - DEBUG(0,(__location__ ": Bad DN '%s'\n", - drs_ObjectIdentifier_to_debug_string(mem_ctx, ncRoot))); - return WERR_DS_DRA_INVALID_PARAMETER; - } - ncRoot->guid = getnc_state->ncRoot_guid; /* we need the session key for encrypting password attributes */