s3:netlogon: add support for LogonGetCapabilities, which is needed to support AES
authorStefan Metzmacher <metze@samba.org>
Sat, 19 Sep 2009 19:07:20 +0000 (21:07 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 29 Sep 2009 08:52:51 +0000 (10:52 +0200)
metze

source3/rpc_server/srv_netlog_nt.c

index 3e62083303786ac3c22da317186e64e3a18530f7..fdbea6ecf19deb55157d9d650ce3b7d30d1461ec 100644 (file)
@@ -1328,7 +1328,27 @@ WERROR _netr_DsRGetDCName(pipes_struct *p,
 NTSTATUS _netr_LogonGetCapabilities(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;
 }
 
 /****************************************************************