]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/rpc_server: Fix dereference of client pointer
authorNoel Power <noel.power@suse.com>
Mon, 25 Sep 2023 08:58:33 +0000 (09:58 +0100)
committerNoel Power <npower@samba.org>
Tue, 4 Jun 2024 08:33:32 +0000 (08:33 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15465
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
selftest/knownfail.d/netlogon.admin [deleted file]
source3/rpc_server/netlogon/srv_netlog_nt.c

diff --git a/selftest/knownfail.d/netlogon.admin b/selftest/knownfail.d/netlogon.admin
deleted file mode 100644 (file)
index 054eefb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.rpc.netlogon.admin.admin.LogonControl2Ex.nt4_dc
index fa3e597fa8e40259e83b02525ea6a9e81f8f2f26..61471eadae0f5ec04a8fc60ba83f5749ce46e7a5 100644 (file)
@@ -197,7 +197,6 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p,
        struct netr_NETLOGON_INFO_1 *info1;
        struct netr_NETLOGON_INFO_2 *info2;
        struct netr_NETLOGON_INFO_3 *info3;
-       struct netr_NETLOGON_INFO_4 *info4;
        const char *fn;
        NTSTATUS status;
        struct netr_DsRGetDCNameInfo *dc_info;
@@ -389,14 +388,10 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p,
                r->out.query->info3 = info3;
                break;
        case 4:
-               info4 = talloc_zero(p->mem_ctx, struct netr_NETLOGON_INFO_4);
-               W_ERROR_HAVE_NO_MEMORY(info4);
-
-               info4->trusted_dc_name          = dc_name;
-               info4->trusted_domain_name      = r->in.data->domain;
-
-               r->out.query->info4 = info4;
-               break;
+               if (r->in.function_code != NETLOGON_CONTROL_FIND_USER) {
+                       return WERR_INVALID_PARAMETER;
+               }
+               return WERR_NOT_SUPPORTED;
        default:
                return WERR_INVALID_LEVEL;
        }