libcli/auth: also set secure channel type in netlogon_creds_client_init().
authorGünther Deschner <gd@samba.org>
Wed, 19 Dec 2012 12:53:23 +0000 (13:53 +0100)
committerAndreas Schneider <asn@samba.org>
Mon, 5 Aug 2013 08:30:00 +0000 (10:30 +0200)
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
libcli/auth/credentials.c
libcli/auth/proto.h
source3/rpc_client/cli_netlogon.c
source4/librpc/rpc/dcerpc_schannel.c
source4/torture/ntp/ntp_signd.c
source4/torture/rpc/lsa.c
source4/torture/rpc/netlogon.c
source4/torture/rpc/samba3rpc.c

index 7c8d53cf8d494ae9401cb4d71ed2c347ff9ed38c..fb77ede197a3b9c27a6c7d0273832d1184f9caf1 100644 (file)
@@ -263,6 +263,7 @@ next comes the client specific functions
 struct netlogon_creds_CredentialState *netlogon_creds_client_init(TALLOC_CTX *mem_ctx,
                                                                  const char *client_account,
                                                                  const char *client_computer_name,
+                                                                 uint16_t secure_channel_type,
                                                                  const struct netr_Credential *client_challenge,
                                                                  const struct netr_Credential *server_challenge,
                                                                  const struct samr_Password *machine_password,
@@ -277,6 +278,7 @@ struct netlogon_creds_CredentialState *netlogon_creds_client_init(TALLOC_CTX *me
 
        creds->sequence = time(NULL);
        creds->negotiate_flags = negotiate_flags;
+       creds->secure_channel_type = secure_channel_type;
 
        creds->computer_name = talloc_strdup(creds, client_computer_name);
        if (!creds->computer_name) {
index 89a732e0525c1fe658882b6891fcf4c344f83cef..6bc18d78205a554f2ea444de22fc4ddf3004be29 100644 (file)
@@ -26,6 +26,7 @@ next comes the client specific functions
 struct netlogon_creds_CredentialState *netlogon_creds_client_init(TALLOC_CTX *mem_ctx, 
                                                                  const char *client_account,
                                                                  const char *client_computer_name, 
+                                                                 uint16_t secure_channel_type,
                                                                  const struct netr_Credential *client_challenge,
                                                                  const struct netr_Credential *server_challenge,
                                                                  const struct samr_Password *machine_password,
index 66a50a8f2d97ae9308867310f038c6a7b96e64de..3d6a3e1a0a83c294a3d3a43dad5e3b867a7ca4d3 100644 (file)
@@ -89,6 +89,7 @@ NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
        cli->dc = netlogon_creds_client_init(cli,
                                    mach_acct,
                                    clnt_name,
+                                   sec_chan_type,
                                    &clnt_chal_send,
                                    &srv_chal_recv,
                                    &password,
index be1ab240bd7c6a7a1624bae2bce447511cd75c0c..1480486c3206debe5994534a29a828f4a9210193 100644 (file)
@@ -187,6 +187,7 @@ static void continue_srv_challenge(struct tevent_req *subreq)
        s->creds = netlogon_creds_client_init(s, 
                                              s->a.in.account_name, 
                                              s->a.in.computer_name,
+                                             s->a.in.secure_channel_type,
                                              &s->credentials1, &s->credentials2,
                                              s->mach_pwd, &s->credentials3,
                                              s->local_negotiate_flags);
index 89eb1a0022a643075057a06800c1e734a301e65c..5f097fedd01e3444681ef9ac517c5f3d3e35ec34 100644 (file)
@@ -113,6 +113,7 @@ static bool test_ntp_signd(struct torture_context *tctx,
 
        creds = netlogon_creds_client_init(tctx, a.in.account_name,
                                           a.in.computer_name,
+                                          a.in.secure_channel_type,
                                           &credentials1, &credentials2, 
                                           pwhash, &credentials3,
                                           negotiate_flags);
index 107af1108861cc1600d67a9bb852c1f4f4d262c3..7385ad4b91123710015d40457ee1c3860578234a 100644 (file)
@@ -2715,6 +2715,7 @@ static bool check_pw_with_ServerAuthenticate3(struct dcerpc_pipe *p,
 
        creds = netlogon_creds_client_init(tctx, a.in.account_name,
                                           a.in.computer_name,
+                                          a.in.secure_channel_type,
                                           &credentials1, &credentials2,
                                           &mach_password, &credentials3,
                                           negotiate_flags);
index dadf8bc4f9880957a995d9d0902f49a72faa2a55..c7bdf49a508f378c4813823f77ec304f5de1b457 100644 (file)
@@ -173,6 +173,7 @@ bool test_SetupCredentials(struct dcerpc_pipe *p, struct torture_context *tctx,
 
        creds = netlogon_creds_client_init(tctx, a.in.account_name,
                                           a.in.computer_name,
+                                          a.in.secure_channel_type,
                                           &credentials1, &credentials2,
                                           mach_password, &credentials3,
                                           0);
@@ -243,6 +244,7 @@ bool test_SetupCredentials2(struct dcerpc_pipe *p, struct torture_context *tctx,
 
        creds = netlogon_creds_client_init(tctx, a.in.account_name,
                                           a.in.computer_name,
+                                          a.in.secure_channel_type,
                                           &credentials1, &credentials2,
                                           mach_password, &credentials3,
                                           negotiate_flags);
@@ -310,6 +312,7 @@ bool test_SetupCredentials3(struct dcerpc_pipe *p, struct torture_context *tctx,
 
        creds = netlogon_creds_client_init(tctx, a.in.account_name,
                                           a.in.computer_name,
+                                          a.in.secure_channel_type,
                                           &credentials1, &credentials2,
                                           &mach_password, &credentials3,
                                           negotiate_flags);
index 9443d5e848069400e54024ce077e74802fe0af6b..432e9d5350956e20d7ed6c71a8ce7d12f721236a 100644 (file)
@@ -1015,6 +1015,7 @@ static bool auth2(struct torture_context *tctx,
        creds_state = netlogon_creds_client_init(mem_ctx,
                                                 a.in.account_name,
                                                 a.in.computer_name,
+                                                a.in.secure_channel_type,
                                                 r.in.credentials,
                                                 r.out.return_credentials, &mach_pw,
                                                 &netr_cred, negotiate_flags);
@@ -2146,6 +2147,7 @@ static bool torture_samba3_rpc_randomauth2(struct torture_context *torture)
        creds_state = netlogon_creds_client_init(mem_ctx,
                                                 a.in.account_name,
                                                 a.in.computer_name,
+                                                a.in.secure_channel_type,
                                                 r.in.credentials,
                                                 r.out.return_credentials, &mach_pw,
                                                 &netr_cred, negotiate_flags);