diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-03-21 23:35:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:11:09 -0500 |
commit | 13b0776f60f6a0f35a4afc2b3d3c6b5ec9c1ca6a (patch) | |
tree | 8eddfcb0dd18a9cee4c1de4fbd3ee98f05cd27e6 /source4/librpc | |
parent | 05bc2d7b2c11a3583a6d1221cfbd618eb6730518 (diff) | |
download | samba-13b0776f60f6a0f35a4afc2b3d3c6b5ec9c1ca6a.tar.gz samba-13b0776f60f6a0f35a4afc2b3d3c6b5ec9c1ca6a.tar.bz2 samba-13b0776f60f6a0f35a4afc2b3d3c6b5ec9c1ca6a.zip |
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)
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 10 |
1 files changed, 4 insertions, 6 deletions
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))); |