2004-06-06 16:59:14 +04:00
#include "idl_types.h"
/*
schannel structures
*/
2006-11-07 01:54:49 +03:00
import "netlogon.idl", "nbt.idl";
2004-06-06 16:59:14 +04:00
interface schannel
{
/*
a schannel bind blob - used in dcerpc auth_info
on a schannel
*/
typedef struct {
astring domain;
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)
2005-03-19 11:34:43 +03:00
astring workstation;
2004-06-06 16:59:14 +04:00
} schannel_bind_3;
typedef struct {
astring domain;
2005-05-05 15:15:24 +04:00
astring workstation;
nbt_string dnsdomain;
nbt_string dnsworkstation;
2004-06-06 16:59:14 +04:00
} schannel_bind_23;
typedef [nodiscriminant] union {
[case (3)] schannel_bind_3 info3;
[case (23)] schannel_bind_23 info23;
} schannel_bind_info;
typedef [public] struct {
uint32 unknown1; /* seems to need to be 0 */
uint32 bind_type;
[switch_is(bind_type)] schannel_bind_info u;
} schannel_bind;
/* a bind_ack blob */
typedef [public] struct {
uint32 unknown1; /* 1 */
uint32 unknown2; /* 0 */
uint32 unknown3; /* 0x006c0000 */
} schannel_bind_ack;
2009-08-26 16:45:35 +04:00
/* this structure is used internally in the NETLOGON server */
typedef [public,flag(NDR_PAHEX)] struct {
netr_NegotiateFlags negotiate_flags;
uint8 session_key[16];
uint32 sequence;
netr_Credential seed;
netr_Credential client;
netr_Credential server;
netr_SchannelType secure_channel_type;
[string,charset(UTF8)] uint8 computer_name[];
[string,charset(UTF8)] uint8 account_name[];
dom_sid *sid;
} netlogon_creds_CredentialState;
2004-06-06 16:59:14 +04:00
}