From 13b0776f60f6a0f35a4afc2b3d3c6b5ec9c1ca6a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 21 Mar 2005 23:35:58 +0000 Subject: r5929: Use cli_credentials for the SMB functions as well. Fix a couple of bugs in the new cli_credentials code (This used to be commit 4ad481cfe5cde514d2ef9646147239f3faaa6173) --- source4/librpc/rpc/dcerpc_util.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source4/librpc/rpc') diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index 4b245fd24d..ed4015c878 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -914,11 +914,11 @@ NTSTATUS dcerpc_pipe_auth(struct dcerpc_pipe *p, /* remember the binding string for possible secondary connections */ p->conn->binding_string = dcerpc_binding_string(p, binding); - if (cli_credentials_is_anonymous(credentials) && + if (!cli_credentials_is_anonymous(credentials) && (binding->flags & DCERPC_SCHANNEL_ANY)) { status = dcerpc_bind_auth_schannel(p, pipe_uuid, pipe_version, credentials); - } else if (cli_credentials_is_anonymous(credentials)) { + } else if (!cli_credentials_is_anonymous(credentials)) { uint8_t auth_type; if (binding->flags & DCERPC_AUTH_SPNEGO) { auth_type = DCERPC_AUTH_TYPE_SPNEGO; @@ -984,15 +984,13 @@ static NTSTATUS dcerpc_pipe_connect_ncacn_np(struct dcerpc_pipe **pp, cli_credentials_get_workstation(credentials), binding->host, "ipc$", NULL, - "", "", NULL); + NULL); } else { status = smbcli_full_connection(p->conn, &cli, cli_credentials_get_workstation(credentials), binding->host, "ipc$", NULL, - cli_credentials_get_username(credentials), - cli_credentials_get_domain(credentials), - cli_credentials_get_password(credentials)); + credentials); } if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("Failed to connect to %s - %s\n", binding->host, nt_errstr(status))); -- cgit