s3-netlogon: Add support for LogonGetCapabilities.
authorStefan Metzmacher <metze@samba.org>
Sat, 19 Sep 2009 19:07:20 +0000 (21:07 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 22 Dec 2011 16:48:24 +0000 (17:48 +0100)
This is also needed to support AES.

metze

source3/rpc_server/netlogon/srv_netlog_nt.c

index 05651aae4152f25952c1dca58c682ef050f966ca..ed29ffc51fbc051afe9e8517dacad8cfe48b79dd 100644 (file)
@@ -2032,7 +2032,27 @@ WERROR _netr_DsRGetDCName(struct pipes_struct *p,
 NTSTATUS _netr_LogonGetCapabilities(struct pipes_struct *p,
                                    struct netr_LogonGetCapabilities *r)
 {
-       return NT_STATUS_NOT_IMPLEMENTED;
+       struct netlogon_creds_CredentialState *creds;
+       NTSTATUS status;
+
+       become_root();
+       status = netr_creds_server_step_check(p, p->mem_ctx,
+                                             r->in.computer_name,
+                                             r->in.credential,
+                                             r->out.return_authenticator,
+                                             &creds);
+       unbecome_root();
+       if (!NT_STATUS_IS_OK(status)) {
+               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;
 }
 
 /****************************************************************