summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-29 01:14:08 +0100
committerGünther Deschner <gd@samba.org>2008-10-29 08:57:51 +0100
commit8e4c691c0aa406eedf52afb5cee33ff1540c0f8d (patch)
tree12e546568675427c295dfa5f94ff477c33529ef0
parent8f52c33401f0cd12184335507271ae9141618679 (diff)
downloadsamba-8e4c691c0aa406eedf52afb5cee33ff1540c0f8d.tar.gz
samba-8e4c691c0aa406eedf52afb5cee33ff1540c0f8d.tar.bz2
samba-8e4c691c0aa406eedf52afb5cee33ff1540c0f8d.zip
s4-netlogon: merge netr_ServerAuthenticate{2,3} from s3 idl.
Guenther
-rw-r--r--source3/librpc/idl/netlogon.idl3
-rw-r--r--source4/librpc/idl/netlogon.idl9
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c4
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c8
-rw-r--r--source4/torture/ndr/netlogon.c2
-rw-r--r--source4/torture/rpc/netlogon.c6
-rw-r--r--source4/torture/rpc/samba3rpc.c6
7 files changed, 21 insertions, 17 deletions
diff --git a/source3/librpc/idl/netlogon.idl b/source3/librpc/idl/netlogon.idl
index 105775ffca..c89cf37ee7 100644
--- a/source3/librpc/idl/netlogon.idl
+++ b/source3/librpc/idl/netlogon.idl
@@ -1112,7 +1112,8 @@ interface netlogon
[in] [string,charset(UTF16)] uint16 account_name[],
[in] netr_SchannelType secure_channel_type,
[in] [string,charset(UTF16)] uint16 computer_name[],
- [in,out,ref] netr_Credential *credentials,
+ [in,ref] netr_Credential *credentials,
+ [out,ref] netr_Credential *return_credentials,
[in,out,ref] netr_NegotiateFlags *negotiate_flags,
[out,ref] uint32 *rid
);
diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl
index 1c25ecbd13..9f6c1e756e 100644
--- a/source4/librpc/idl/netlogon.idl
+++ b/source4/librpc/idl/netlogon.idl
@@ -330,7 +330,8 @@ interface netlogon
[in,string,charset(UTF16)] uint16 account_name[],
[in] netr_SchannelType secure_channel_type,
[in,string,charset(UTF16)] uint16 computer_name[],
- [in,out,ref] netr_Credential *credentials
+ [in,ref] netr_Credential *credentials,
+ [out,ref] netr_Credential *return_credentials
);
@@ -929,7 +930,8 @@ interface netlogon
[in] [string,charset(UTF16)] uint16 account_name[],
[in] netr_SchannelType secure_channel_type,
[in] [string,charset(UTF16)] uint16 computer_name[],
- [in,out,ref] netr_Credential *credentials,
+ [in,ref] netr_Credential *credentials,
+ [out,ref] netr_Credential *return_credentials,
[in,out,ref] netr_NegotiateFlags *negotiate_flags
);
@@ -1109,7 +1111,8 @@ interface netlogon
[in] [string,charset(UTF16)] uint16 account_name[],
[in] netr_SchannelType secure_channel_type,
[in] [string,charset(UTF16)] uint16 computer_name[],
- [in,out,ref] netr_Credential *credentials,
+ [in,ref] netr_Credential *credentials,
+ [out,ref] netr_Credential *return_credentials,
[in,out,ref] netr_NegotiateFlags *negotiate_flags,
[out,ref] uint32 *rid
);
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index 5588b43dcd..35adc8b42e 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -178,7 +178,7 @@ static void continue_srv_challenge(struct rpc_request *req)
s->a.in.negotiate_flags = &s->negotiate_flags;
s->a.in.credentials = &s->credentials3;
s->a.out.negotiate_flags = &s->negotiate_flags;
- s->a.out.credentials = &s->credentials3;
+ s->a.out.return_credentials = &s->credentials3;
/*
authenticate on the netlogon pipe - a rpc request over secondary pipe
@@ -207,7 +207,7 @@ static void continue_srv_auth2(struct rpc_request *req)
if (!composite_is_ok(c)) return;
/* verify credentials */
- if (!creds_client_check(s->creds, s->a.out.credentials)) {
+ if (!creds_client_check(s->creds, s->a.out.return_credentials)) {
composite_error(c, NT_STATUS_UNSUCCESSFUL);
return;
}
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 0152604d43..a022ddf576 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -90,7 +90,7 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate3(struct dcesrv_call_state *dce_ca
const char *trust_dom_attrs[] = {"flatname", NULL};
const char *account_name;
- ZERO_STRUCTP(r->out.credentials);
+ ZERO_STRUCTP(r->out.return_credentials);
*r->out.rid = 0;
*r->out.negotiate_flags = *r->in.negotiate_flags;
@@ -208,7 +208,7 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate3(struct dcesrv_call_state *dce_ca
creds_server_init(creds, &pipe_state->client_challenge,
&pipe_state->server_challenge, mach_pwd,
- r->out.credentials,
+ r->out.return_credentials,
*r->in.negotiate_flags);
if (!creds_server_check(creds, r->in.credentials)) {
@@ -250,7 +250,7 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate(struct dcesrv_call_state *dce_cal
r3.in.secure_channel_type = r->in.secure_channel_type;
r3.in.computer_name = r->in.computer_name;
r3.in.credentials = r->in.credentials;
- r3.out.credentials = r->out.credentials;
+ r3.out.return_credentials = r->out.return_credentials;
r3.in.negotiate_flags = &negotiate_flags;
r3.out.negotiate_flags = &negotiate_flags;
r3.out.rid = &rid;
@@ -269,7 +269,7 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate2(struct dcesrv_call_state *dce_ca
r3.in.secure_channel_type = r->in.secure_channel_type;
r3.in.computer_name = r->in.computer_name;
r3.in.credentials = r->in.credentials;
- r3.out.credentials = r->out.credentials;
+ r3.out.return_credentials = r->out.return_credentials;
r3.in.negotiate_flags = r->in.negotiate_flags;
r3.out.negotiate_flags = r->out.negotiate_flags;
r3.out.rid = &rid;
diff --git a/source4/torture/ndr/netlogon.c b/source4/torture/ndr/netlogon.c
index a5221f71e9..f437fa0deb 100644
--- a/source4/torture/ndr/netlogon.c
+++ b/source4/torture/ndr/netlogon.c
@@ -59,7 +59,7 @@ static bool netrserverauthenticate3_out_check(struct torture_context *tctx,
struct netr_ServerAuthenticate3 *r)
{
uint8_t cred_expected[8] = { 0x22, 0x0c, 0x86, 0x8a, 0xe9, 0x92, 0x93, 0xc9 };
- torture_assert_mem_equal(tctx, cred_expected, r->out.credentials->data, 8, "credentials");
+ torture_assert_mem_equal(tctx, cred_expected, r->out.return_credentials->data, 8, "return_credentials");
torture_assert_int_equal(tctx, *r->out.negotiate_flags, 0x6007ffff, "negotiate flags");
torture_assert_int_equal(tctx, *r->out.rid, 0x454, "rid");
torture_assert_ntstatus_ok(tctx, r->out.result, "return code");
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 174022248d..44d92eb121 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -108,7 +108,7 @@ static bool test_SetupCredentials(struct dcerpc_pipe *p, struct torture_context
a.in.secure_channel_type = SEC_CHAN_BDC;
a.in.computer_name = machine_name;
a.in.credentials = &credentials3;
- a.out.credentials = &credentials3;
+ a.out.return_credentials = &credentials3;
creds_client_init(creds, &credentials1, &credentials2,
mach_password, &credentials3,
@@ -173,7 +173,7 @@ bool test_SetupCredentials2(struct dcerpc_pipe *p, struct torture_context *tctx,
a.in.negotiate_flags = &negotiate_flags;
a.out.negotiate_flags = &negotiate_flags;
a.in.credentials = &credentials3;
- a.out.credentials = &credentials3;
+ a.out.return_credentials = &credentials3;
creds_client_init(creds, &credentials1, &credentials2,
mach_password, &credentials3,
@@ -235,7 +235,7 @@ static bool test_SetupCredentials3(struct dcerpc_pipe *p, struct torture_context
a.in.computer_name = machine_name;
a.in.negotiate_flags = &negotiate_flags;
a.in.credentials = &credentials3;
- a.out.credentials = &credentials3;
+ a.out.return_credentials = &credentials3;
a.out.negotiate_flags = &negotiate_flags;
a.out.rid = &rid;
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 5f8225cb33..220bc02351 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -946,7 +946,7 @@ static bool auth2(struct smbcli_state *cli,
a.in.negotiate_flags = &negotiate_flags;
a.out.negotiate_flags = &negotiate_flags;
a.in.credentials = &netr_cred;
- a.out.credentials = &netr_cred;
+ a.out.return_credentials = &netr_cred;
status = dcerpc_netr_ServerAuthenticate2(net_pipe, mem_ctx, &a);
if (!NT_STATUS_IS_OK(status)) {
@@ -955,7 +955,7 @@ static bool auth2(struct smbcli_state *cli,
goto done;
}
- if (!creds_client_check(creds_state, a.out.credentials)) {
+ if (!creds_client_check(creds_state, a.out.return_credentials)) {
d_printf("creds_client_check failed\n");
goto done;
}
@@ -2081,7 +2081,7 @@ bool torture_samba3_rpc_randomauth2(struct torture_context *torture)
a.in.negotiate_flags = &negotiate_flags;
a.out.negotiate_flags = &negotiate_flags;
a.in.credentials = &netr_cred;
- a.out.credentials = &netr_cred;
+ a.out.return_credentials = &netr_cred;
status = dcerpc_netr_ServerAuthenticate2(net_pipe, mem_ctx, &a);