diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-03-19 08:34:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:11:07 -0500 |
commit | df643022136a4b229aca817f5b57f7302a97f852 (patch) | |
tree | e2a2b5b20b5b3c580fd899a4f39a7911ac5ea250 /source4/rpc_server/dcerpc_sock.c | |
parent | 4037a7e80c3e5d9560b084d9925896d2a5a9518c (diff) | |
download | samba-df643022136a4b229aca817f5b57f7302a97f852.tar.gz samba-df643022136a4b229aca817f5b57f7302a97f852.tar.bz2 samba-df643022136a4b229aca817f5b57f7302a97f852.zip |
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)
Diffstat (limited to 'source4/rpc_server/dcerpc_sock.c')
-rw-r--r-- | source4/rpc_server/dcerpc_sock.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source4/rpc_server/dcerpc_sock.c b/source4/rpc_server/dcerpc_sock.c index d2ebf794b3..56b55a9fbf 100644 --- a/source4/rpc_server/dcerpc_sock.c +++ b/source4/rpc_server/dcerpc_sock.c @@ -159,11 +159,11 @@ static NTSTATUS add_socket_rpc_unix(struct dcesrv_context *dce_ctx, struct dcesr dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx); status = stream_setup_socket(event_ctx, model_ops, &dcesrv_stream_ops, - "unix", e->ep_description.endpoint, &port, + "unix", e->ep_description->endpoint, &port, dcesrv_sock); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("service_setup_stream_socket(path=%s) failed - %s\n", - e->ep_description.endpoint, nt_errstr(status))); + e->ep_description->endpoint, nt_errstr(status))); } return status; @@ -177,14 +177,14 @@ static NTSTATUS add_socket_rpc_ncalrpc(struct dcesrv_context *dce_ctx, struct dc char *full_path; NTSTATUS status; - if (!e->ep_description.endpoint) { + if (!e->ep_description->endpoint) { /* No identifier specified: use DEFAULT. * DO NOT hardcode this value anywhere else. Rather, specify * no endpoint and let the epmapper worry about it. */ - e->ep_description.endpoint = talloc_strdup(dce_ctx, "DEFAULT"); + e->ep_description->endpoint = talloc_strdup(dce_ctx, "DEFAULT"); } - full_path = talloc_asprintf(dce_ctx, "%s/%s", lp_ncalrpc_dir(), e->ep_description.endpoint); + full_path = talloc_asprintf(dce_ctx, "%s/%s", lp_ncalrpc_dir(), e->ep_description->endpoint); dcesrv_sock = talloc(dce_ctx, struct dcesrv_socket_context); NT_STATUS_HAVE_NO_MEMORY(dcesrv_sock); @@ -197,7 +197,7 @@ static NTSTATUS add_socket_rpc_ncalrpc(struct dcesrv_context *dce_ctx, struct dc "unix", full_path, &port, dcesrv_sock); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("service_setup_stream_socket(identifier=%s,path=%s) failed - %s\n", - e->ep_description.endpoint, full_path, nt_errstr(status))); + e->ep_description->endpoint, full_path, nt_errstr(status))); } return status; } @@ -213,8 +213,8 @@ static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx, struct uint16_t port = 0; NTSTATUS status; - if (e->ep_description.endpoint) { - port = atoi(e->ep_description.endpoint); + if (e->ep_description->endpoint) { + port = atoi(e->ep_description->endpoint); } dcesrv_sock = talloc(dce_ctx, struct dcesrv_socket_context); @@ -231,8 +231,8 @@ static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx, struct address, port, nt_errstr(status))); } - if (e->ep_description.endpoint == NULL) { - e->ep_description.endpoint = talloc_asprintf(dce_ctx, "%d", port); + if (e->ep_description->endpoint == NULL) { + e->ep_description->endpoint = talloc_asprintf(dce_ctx, "%d", port); } return status; @@ -275,7 +275,7 @@ NTSTATUS dcesrv_sock_init(struct dcesrv_context *dce_ctx, } for (e=dce_ctx->endpoint_list;e;e=e->next) { - switch (e->ep_description.transport) { + switch (e->ep_description->transport) { case NCACN_UNIX_STREAM: status = add_socket_rpc_unix(dce_ctx, e, event_ctx, model_ops); NT_STATUS_NOT_OK_RETURN(status); |