summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2005-12-06 19:48:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:09 -0500
commit17280956c3c412102150aa8a9bda48efff0f0214 (patch)
tree9dab40ff07da1f8e6041afbdfe8d39661cade2c2 /source4/scripting
parent3b85d040258a833ae42d351dca53d6a1de20ed1c (diff)
downloadsamba-17280956c3c412102150aa8a9bda48efff0f0214.tar.gz
samba-17280956c3c412102150aa8a9bda48efff0f0214.tar.bz2
samba-17280956c3c412102150aa8a9bda48efff0f0214.zip
r12104: Move to (sync) smb_composite_connect from smbcli_tree_full_connection()
This is one of the last places using the latter function. rafal (This used to be commit c95d30d38c4969c070766d320ed52e332e131195)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/ejs/smbcalls_cli.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source4/scripting/ejs/smbcalls_cli.c b/source4/scripting/ejs/smbcalls_cli.c
index d7ffea29fe..cc97282038 100644
--- a/source4/scripting/ejs/smbcalls_cli.c
+++ b/source4/scripting/ejs/smbcalls_cli.c
@@ -25,6 +25,7 @@
#include "lib/appweb/ejs/ejs.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/composite/composite.h"
+#include "libcli/smb_composite/smb_composite.h"
#include "clilist.h"
#if 0
@@ -410,6 +411,7 @@ static int ejs_cli_disconnect(MprVarHandle eid, int argc, MprVar **argv)
static int ejs_tree_connect(MprVarHandle eid, int argc, char **argv)
{
struct cli_credentials *creds;
+ struct smb_composite_connect io;
struct smbcli_tree *tree;
const char *hostname, *sharename;
NTSTATUS result;
@@ -433,8 +435,17 @@ static int ejs_tree_connect(MprVarHandle eid, int argc, char **argv)
/* Do connect */
- result = smbcli_tree_full_connection(NULL, &tree, hostname, 0,
- sharename, "?????", creds, NULL);
+ io.in.dest_host = hostname;
+ io.in.port = 0;
+ io.in.called_name = strupper_talloc(mem_ctx, hostname);
+ io.in.service = sharename;
+ io.in.service_type = "?????";
+ io.in.credentials = creds;
+ io.in.fallback_to_anonymous = False;
+ io.in.workgroup = lp_workgroup();
+
+ result = smb_composite_connect(&io, mem_ctx, NULL);
+ tree = io.out.tree;
talloc_free(mem_ctx);