Revert "winbindd: always use winbind_add_failed_connection_entry() wrapper"
authorStefan Metzmacher <metze@samba.org>
Tue, 4 Jul 2023 16:09:11 +0000 (18:09 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 16 Oct 2023 08:23:18 +0000 (10:23 +0200)
This reverts commit 4bbfbf80e53aa823adc054e40c8ef7e7c4792e18.

source3/winbindd/winbindd_cm.c
source3/winbindd/winbindd_pam.c
source3/winbindd/winbindd_proto.h

index 709969530b24f405d7990c7c8b4e6bee7b39874a..014392fdb5da575835f0535e5de3b10070b094c8 100644 (file)
@@ -320,7 +320,7 @@ void set_domain_online_request(struct winbindd_domain *domain)
  Add -ve connection cache entries for domain and realm.
 ****************************************************************/
 
-void winbind_add_failed_connection_entry(
+static void winbind_add_failed_connection_entry(
        const struct winbindd_domain *domain,
        const char *server,
        NTSTATUS result)
index ac22a9a439a56ba0de2eaccb29e507e1e07db74b..c523425b247d43245fd4f179de066f082787e7da 100644 (file)
@@ -1706,9 +1706,10 @@ static NTSTATUS winbind_samlogon_retry_loop(struct winbindd_domain *domain,
                                DEBUG(3, ("This is the third problem for this "
                                          "particular call, adding DC to the "
                                          "negative cache list: %s %s\n", domain->name, domain->dcname));
-                               winbind_add_failed_connection_entry(domain,
+                               add_failed_connection_entry(domain->name,
                                                            domain->dcname,
                                                            result);
+                               saf_delete(domain->name);
                        }
 
                        /* Only allow 3 retries */
index a077b7b89e93657389f7d3afe31100244225e4d6..9b10f2c061a53618a1d773fcaa18e2cb6b512b1c 100644 (file)
@@ -206,10 +206,6 @@ void winbind_msg_domain_online(struct messaging_context *msg_ctx,
 
 void set_domain_offline(struct winbindd_domain *domain);
 void set_domain_online_request(struct winbindd_domain *domain);
-void winbind_add_failed_connection_entry(
-       const struct winbindd_domain *domain,
-       const char *server,
-       NTSTATUS result);
 
 struct ndr_interface_table;
 NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,