From 4e18066fa243da1c505f782ba87187c3bb1078ee Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 27 Jul 2023 16:58:13 +1200 Subject: [PATCH] s4-rpc_server/lsa: Use samdb_system_container_dn() in dcesrv_lsa_get_policy_state() This is now exactly the same actions, but just uses common code to do it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9959 Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher --- source4/rpc_server/lsa/lsa_init.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source4/rpc_server/lsa/lsa_init.c b/source4/rpc_server/lsa/lsa_init.c index 62aa638f4f5..1065cc33f4d 100644 --- a/source4/rpc_server/lsa/lsa_init.c +++ b/source4/rpc_server/lsa/lsa_init.c @@ -146,15 +146,11 @@ NTSTATUS dcesrv_lsa_get_policy_state(struct dcesrv_call_state *dce_call, /* work out the system_dn - useful for so many calls its worth fetching here */ - state->system_dn = ldb_dn_copy(state, state->domain_dn); + state->system_dn = samdb_system_container_dn(state->sam_ldb, state); if (state->system_dn == NULL) { return NT_STATUS_NO_MEMORY; } - if (!ldb_dn_add_child_fmt(state->system_dn, "CN=System")) { - return NT_STATUS_NO_MEMORY; - } - state->builtin_sid = dom_sid_parse_talloc(state, SID_BUILTIN); if (!state->builtin_sid) { return NT_STATUS_NO_SUCH_DOMAIN; -- 2.47.3