summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-03-21 23:35:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:09 -0500
commit13b0776f60f6a0f35a4afc2b3d3c6b5ec9c1ca6a (patch)
tree8eddfcb0dd18a9cee4c1de4fbd3ee98f05cd27e6 /source4/libcli/raw
parent05bc2d7b2c11a3583a6d1221cfbd618eb6730518 (diff)
downloadsamba-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/libcli/raw')
-rw-r--r--source4/libcli/raw/clitree.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index 74db1c6952..0559c64dc1 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -167,8 +167,7 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
const char *my_name,
const char *dest_host, int port,
const char *service, const char *service_type,
- const char *user, const char *domain,
- const char *password)
+ struct cli_credentials *credentials)
{
struct smb_composite_connect io;
NTSTATUS status;
@@ -179,10 +178,10 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
io.in.calling_name = strupper_talloc(parent_ctx, my_name);
io.in.service = service;
io.in.service_type = service_type;
- io.in.domain = domain;
- io.in.user = user;
- if (user && user[0]) {
- io.in.password = password;
+ io.in.domain = cli_credentials_get_domain(credentials);
+ io.in.user = cli_credentials_get_username(credentials);
+ if (!cli_credentials_is_anonymous(credentials)) {
+ io.in.password = cli_credentials_get_password(credentials);
} else {
io.in.password = NULL;
}