1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00
Andrew Bartlett df64302213 r5902: A rather large change...
I wanted to add a simple 'workstation' argument to the DCERPC
authenticated binding calls, but this patch kind of grew from there.

With SCHANNEL, the 'workstation' name (the netbios name of the client)
matters, as this is what ties the session between the NETLOGON ops and
the SCHANNEL bind.  This changes a lot of files, and these will again
be changed when jelmer does the credentials work.

I also correct some schannel IDL to distinguish between workstation
names and account names.  The distinction matters for domain trust
accounts.

Issues in handling this (issues with lifetime of talloc pointers)
caused me to change the 'creds_CredentialsState' and 'struct
dcerpc_binding' pointers to always be talloc()ed pointers.

In the schannel DB, we now store both the domain and computername, and
query on both.  This should ensure we fault correctly when the domain
is specified incorrectly in the SCHANNEL bind.

In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out,
where the comment claimed we re-used a connection, but in fact we made
a new connection.

This was achived by breaking apart some of the
dcerpc_secondary_connection() logic.

The addition of workstation handling was also propogated to NTLMSSP
and GENSEC, for completeness.

The RPC-SAMSYNC test has been cleaned up a little, using a loop over
usernames/passwords rather than manually expanded tests.  This will be
expanded further (the code in #if 0 in this patch) to use a newly
created user account for testing.

In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO
server, caused by the removal of [ref] and the assoicated pointer from
the IDL.  This has been re-added, until the underlying pidl issues are
solved.
(This used to be commit 824289dcc20908ddec957a4a892a103eec2da9b9)
2007-10-10 13:11:07 -05:00

134 lines
2.4 KiB
Plaintext

#include "idl_types.h"
[
uuid("60a15ec5-4de8-11d7-a637-005056a20182"),
endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:", "ncalrpc:"),
pointer_default(unique),
version(1.0),
helpstring("Simple echo pipe")
]
interface rpcecho
{
/* Add one to an integer */
void echo_AddOne(
[in,out,ref] uint32 *v
);
/* Echo an array of bytes back at the caller */
void echo_EchoData(
[in] uint32 len,
[in] [size_is(len)] uint8 in_data[],
[out] [size_is(len)] uint8 out_data[]
);
/* Sink data to the server */
void echo_SinkData(
[in] uint32 len,
[in,ref,size_is(len)] uint8 *data[]
);
/* Source data from server */
void echo_SourceData(
[in] uint32 len,
[out,ref,size_is(len)] uint8 *data[]
);
/* test strings */
void echo_TestCall (
[in] unistr *s1,
[out] unistr *s2
);
/* test some alignment issues */
typedef struct {
uint8 v;
} echo_info1;
typedef struct {
uint16 v;
} echo_info2;
typedef struct {
uint32 v;
} echo_info3;
typedef struct {
hyper v;
} echo_info4;
typedef struct {
uint8 v1;
hyper v2;
} echo_info5;
typedef struct {
uint8 v1;
echo_info1 info1;
} echo_info6;
typedef union {
[case(1)] echo_info1 info1;
} echo_XXX;
typedef struct {
uint8 v1;
echo_info4 info4;
} echo_info7;
typedef [switch_type(uint16)] union {
[case(1)] echo_info1 info1;
[case(2)] echo_info2 info2;
[case(3)] echo_info3 info3;
[case(4)] echo_info4 info4;
[case(5)] echo_info5 info5;
[case(6)] echo_info6 info6;
[case(7)] echo_info7 info7;
} echo_Info;
NTSTATUS echo_TestCall2 (
[in] uint16 level,
[out,switch_is(level)] echo_Info *info
);
uint32 echo_TestSleep(
[in] uint32 seconds
);
typedef enum {
ECHO_ENUM1 = 1,
ECHO_ENUM2 = 2
} echo_Enum1;
typedef [v1_enum] enum {
ECHO_ENUM1_32 = 1,
ECHO_ENUM2_32 = 2
} echo_Enum1_32;
typedef struct {
echo_Enum1 e1;
echo_Enum1_32 e2;
} echo_Enum2;
typedef [switch_type(echo_Enum1)] union {
[case(ECHO_ENUM1)] echo_Enum1 e1;
[case(ECHO_ENUM2)] echo_Enum2 e2;
} echo_Enum3;
void echo_TestEnum(
[in,out,ref] echo_Enum1 *foo1,
[in,out,ref] echo_Enum2 *foo2,
[in,out,ref,switch_is(*foo1)] echo_Enum3 *foo3
);
typedef struct {
uint32 x;
[size_is(x)] uint16 surrounding[*];
} echo_Surrounding;
void echo_TestSurrounding(
[in,out,ref] echo_Surrounding *data
);
uint16 echo_TestDoublePointer([in,ref] uint16 ***data);
}