s3: Remove some pointless uses of string_sid_talloc
[ira/wip.git] / source3 / rpcclient / cmd_netlogon.c
index aa493214d752d0a608ec748c6f23412274986075..6317f8b389a1c47e615bb424dfbd94a16fadc965 100644 (file)
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "rpcclient.h"
 #include "../libcli/auth/libcli_auth.h"
+#include "../librpc/gen_ndr/cli_netlogon.h"
 
 static WERROR cmd_netlogon_logon_ctrl2(struct rpc_pipe_client *cli,
                                       TALLOC_CTX *mem_ctx, int argc,
@@ -1051,7 +1052,7 @@ static NTSTATUS cmd_netlogon_database_redo(struct rpc_pipe_client *cli,
        struct netr_Authenticator clnt_creds, srv_cred;
        struct netr_DELTA_ENUM_ARRAY *delta_enum_array = NULL;
        unsigned char trust_passwd_hash[16];
-       uint32_t sec_channel_type = 0;
+       enum netr_SchannelType sec_channel_type = 0;
        struct netr_ChangeLogEntry e;
        uint32_t rid = 500;
 
@@ -1127,11 +1128,9 @@ static NTSTATUS cmd_netlogon_capabilities(struct rpc_pipe_client *cli,
                level = atoi(argv[1]);
        }
 
-#if 0
+       ZERO_STRUCT(return_authenticator);
+
        netlogon_creds_client_authenticator(cli->dc, &credential);
-#else
-       ZERO_STRUCT(credential);
-#endif
 
        status = rpccli_netr_LogonGetCapabilities(cli, mem_ctx,
                                                  cli->desthost,
@@ -1140,13 +1139,14 @@ static NTSTATUS cmd_netlogon_capabilities(struct rpc_pipe_client *cli,
                                                  &return_authenticator,
                                                  level,
                                                  &capabilities);
-#if 0
+
        if (!netlogon_creds_client_check(cli->dc,
                                         &return_authenticator.cred)) {
                DEBUG(0,("credentials chain check failed\n"));
                return NT_STATUS_ACCESS_DENIED;
        }
-#endif
+
+       printf("capabilities: 0x%08x\n", capabilities.server_capabilities);
 
        return status;
 }