]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libnet4: Call map_netlogon_samlogon_response directly
authorVolker Lendecke <vl@samba.org>
Tue, 29 Oct 2024 07:59:29 +0000 (08:59 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 11 Nov 2024 14:03:03 +0000 (14:03 +0000)
Avoid using a boolean flag passed down

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/libnet/libnet_site.c

index 691e4b243acb1f3df5309c28fefed9cbc512f1f7..a3e3d5970dc63e95be43ffff20c1738eb0b214d7 100644 (file)
@@ -56,7 +56,6 @@ NTSTATUS libnet_FindSite(TALLOC_CTX *ctx, struct libnet_context *lctx, struct li
        search.in.dest_port = 0;
        search.in.acct_control = -1;
        search.in.version = NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX;
-       search.in.map_response = true;
 
        ret = tsocket_address_inet_from_strings(tmp_ctx, "ip",
                                                r->in.dest_address,
@@ -77,6 +76,9 @@ NTSTATUS libnet_FindSite(TALLOC_CTX *ctx, struct libnet_context *lctx, struct li
                return status;
        }
        status = cldap_netlogon(cldap, tmp_ctx, &search);
+       if (NT_STATUS_IS_OK(status)) {
+               map_netlogon_samlogon_response(&search.out.netlogon);
+       }
        if (!NT_STATUS_IS_OK(status)
            || search.out.netlogon.data.nt5_ex.client_site == NULL
            || search.out.netlogon.data.nt5_ex.client_site[0] == '\0') {