]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:rpc_server/lsa: no longer send MSG_WINBIND_RELOAD_TRUSTED_DOMAINS
authorStefan Metzmacher <metze@samba.org>
Thu, 30 Jan 2025 18:04:28 +0000 (19:04 +0100)
committerRalph Boehme <slow@samba.org>
Sat, 8 Feb 2025 15:26:38 +0000 (15:26 +0000)
This is done by the "trust_notify" ldb module now.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source4/rpc_server/lsa/dcesrv_lsa.c

index 58e490a52da1a469508f9ec093855acc29f5d4da..6b3e3be86621c691743b247226f69f14d51117dd 100644 (file)
@@ -31,7 +31,6 @@
 #include "dsdb/common/util.h"
 #include "libcli/security/session.h"
 #include "libcli/lsarpc/util_lsarpc.h"
-#include "lib/messaging/irpc.h"
 #include "libds/common/roles.h"
 #include "lib/util/smb_strtox.h"
 #include "lib/param/loadparm.h"
@@ -1222,13 +1221,9 @@ static NTSTATUS dcesrv_lsa_CreateTrustedDomain_common(struct dcesrv_call_state *
        DATA_BLOB trustAuthIncoming = data_blob_null;
        DATA_BLOB trustAuthOutgoing = data_blob_null;
        struct dcesrv_handle *handle = NULL;
-       struct server_id *server_ids = NULL;
-       uint32_t num_server_ids = 0;
        char *dns_encoded = NULL;
        char *netbios_encoded = NULL;
        char *sid_encoded = NULL;
-       struct imessaging_context *imsg_ctx =
-               dcesrv_imessaging_context(dce_call->conn);
        NTSTATUS status;
        bool ok;
        int ret;
@@ -1443,22 +1438,6 @@ static NTSTATUS dcesrv_lsa_CreateTrustedDomain_common(struct dcesrv_call_state *
                return NT_STATUS_INTERNAL_DB_CORRUPTION;
        }
 
-       /*
-        * Notify winbindd that we have a new trust
-        */
-       status = irpc_servers_byname(imsg_ctx,
-                                    mem_ctx,
-                                    "winbind_server",
-                                    &num_server_ids,
-                                    &server_ids);
-       if (NT_STATUS_IS_OK(status) && num_server_ids >= 1) {
-               imessaging_send(imsg_ctx,
-                               server_ids[0],
-                               MSG_WINBIND_RELOAD_TRUSTED_DOMAINS,
-                               NULL);
-       }
-       TALLOC_FREE(server_ids);
-
        handle = dcesrv_handle_create(dce_call, LSA_HANDLE_TRUSTED_DOMAIN);
        if (handle == NULL) {
                return NT_STATUS_NO_MEMORY;
@@ -4535,14 +4514,10 @@ static NTSTATUS dcesrv_lsa_lsaRSetForestTrustInformation(struct dcesrv_call_stat
        struct lsa_ForestTrustCollisionInfo *c_info = NULL;
        DATA_BLOB ft_blob = {};
        struct ldb_message *msg = NULL;
-       struct server_id *server_ids = NULL;
-       uint32_t num_server_ids = 0;
        NTSTATUS status;
        enum ndr_err_code ndr_err;
        int ret;
        bool in_transaction = false;
-       struct imessaging_context *imsg_ctx =
-               dcesrv_imessaging_context(dce_call->conn);
 
        DCESRV_PULL_HANDLE(h, r->in.handle, LSA_HANDLE_POLICY);
 
@@ -4772,24 +4747,6 @@ static NTSTATUS dcesrv_lsa_lsaRSetForestTrustInformation(struct dcesrv_call_stat
                goto done;
        }
 
-       /*
-        * Notify winbindd that we have a acquired forest trust info
-        */
-       status = irpc_servers_byname(imsg_ctx,
-                                    mem_ctx,
-                                    "winbind_server",
-                                    &num_server_ids,
-                                    &server_ids);
-       if (!NT_STATUS_IS_OK(status)) {
-               DBG_ERR("irpc_servers_byname failed\n");
-               goto done;
-       }
-
-       imessaging_send(imsg_ctx,
-                       server_ids[0],
-                       MSG_WINBIND_RELOAD_TRUSTED_DOMAINS,
-                       NULL);
-
        status = NT_STATUS_OK;
 
 done: