]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:rpc_server/netlogon: implement netr_LogonGetCapabilities query_level=2
authorStefan Metzmacher <metze@samba.org>
Wed, 19 Jul 2023 16:03:09 +0000 (18:03 +0200)
committerDouglas Bagnall <dbagnall@samba.org>
Wed, 30 Oct 2024 23:08:36 +0000 (23:08 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source3/rpc_server/netlogon/srv_netlog_nt.c

index ad1d5dc33d7e474badbcbe58bee4a2098853951b..06ea1c0b756cedb6ac53e8703763755cf62e0b6a 100644 (file)
@@ -2317,12 +2317,7 @@ NTSTATUS _netr_LogonGetCapabilities(struct pipes_struct *p,
        case 1:
                break;
        case 2:
-               /*
-                * Until we know the details behind KB5028166
-                * just return DCERPC_NCA_S_FAULT_INVALID_TAG
-                * like an unpatched Windows Server.
-                */
-               FALL_THROUGH;
+               break;
        default:
                /*
                 * There would not be a way to marshall the
@@ -2350,7 +2345,15 @@ NTSTATUS _netr_LogonGetCapabilities(struct pipes_struct *p,
                return status;
        }
 
-       r->out.capabilities->server_capabilities = creds->negotiate_flags;
+       switch (r->in.query_level) {
+       case 1:
+               r->out.capabilities->server_capabilities = creds->negotiate_flags;
+               break;
+       case 2:
+               r->out.capabilities->requested_flags =
+                       creds->ex->client_requested_flags;
+               break;
+       }
 
        return NT_STATUS_OK;
 }