s4:rpc_server/netlogon: implement netr_LogonGetCapabilities
authorStefan Metzmacher <metze@samba.org>
Fri, 18 Sep 2009 18:24:16 +0000 (20:24 +0200)
committerAndreas Schneider <asn@samba.org>
Tue, 17 Jul 2012 08:58:38 +0000 (10:58 +0200)
This is also needed to support AES.

metze

Signed-off-by: G√ľnther Deschner <gd@samba.org>
source4/rpc_server/netlogon/dcerpc_netlogon.c

index 1cbd9583c7a68d828ee54d76997f9cd64ba9ce1d..1de1d74dd1cf7bf243876a682337f21715f090af 100644 (file)
@@ -1234,9 +1234,27 @@ static NTSTATUS dcesrv_netr_NetrEnumerateTrustedDomains(struct dcesrv_call_state
 static NTSTATUS dcesrv_netr_LogonGetCapabilities(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
                       struct netr_LogonGetCapabilities *r)
 {
+       struct netlogon_creds_CredentialState *creds;
+       NTSTATUS status;
 
-       /* we don't support AES yet */
-       return NT_STATUS_NOT_IMPLEMENTED;
+       status = dcesrv_netr_creds_server_step_check(dce_call,
+                                                    mem_ctx,
+                                                    r->in.computer_name,
+                                                    r->in.credential,
+                                                    r->out.return_authenticator,
+                                                    &creds);
+       if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(0,(__location__ " Bad credentials - error\n"));
+       }
+       NT_STATUS_NOT_OK_RETURN(status);
+
+       if (r->in.query_level != 1) {
+               return NT_STATUS_NOT_SUPPORTED;
+       }
+
+       r->out.capabilities->server_capabilities = creds->negotiate_flags;
+
+       return NT_STATUS_OK;
 }