summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-24 13:13:27 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-24 13:13:27 +0200
commit8b06312f7eeff5ea8625677478792888774bd2be (patch)
treecd1d662f3e7e43a0c5ed667d396592f6aa6c941a /source4/libcli
parent5d146d0178d7da8d8f14f340dacb5b01fd03fab8 (diff)
downloadsamba-8b06312f7eeff5ea8625677478792888774bd2be.tar.gz
samba-8b06312f7eeff5ea8625677478792888774bd2be.tar.bz2
samba-8b06312f7eeff5ea8625677478792888774bd2be.zip
Eliminate another instance of global_loadparm.
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/cliconnect.c12
-rw-r--r--source4/libcli/raw/clitransport.c4
-rw-r--r--source4/libcli/raw/clitree.c4
-rw-r--r--source4/libcli/raw/libcliraw.h3
-rw-r--r--source4/libcli/smb_composite/connect.c2
-rw-r--r--source4/libcli/smb_composite/fetchfile.c1
-rw-r--r--source4/libcli/smb_composite/fsinfo.c1
-rw-r--r--source4/libcli/smb_composite/smb_composite.h3
8 files changed, 23 insertions, 7 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index e42b04cdc5..1b3d2c98c9 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -35,7 +35,8 @@ bool smbcli_socket_connect(struct smbcli_state *cli, const char *server,
const char **ports,
struct event_context *ev_ctx,
struct resolve_context *resolve_ctx,
- struct smbcli_options *options)
+ struct smbcli_options *options,
+ struct smb_iconv_convenience *iconv_convenience)
{
struct smbcli_socket *sock;
@@ -44,7 +45,8 @@ bool smbcli_socket_connect(struct smbcli_state *cli, const char *server,
if (sock == NULL) return false;
- cli->transport = smbcli_transport_init(sock, cli, true, options);
+ cli->transport = smbcli_transport_init(sock, cli, true, options,
+ iconv_convenience);
if (!cli->transport) {
return false;
}
@@ -147,7 +149,8 @@ NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
struct resolve_context *resolve_ctx,
struct event_context *ev,
struct smbcli_options *options,
- struct smbcli_session_options *session_options)
+ struct smbcli_session_options *session_options,
+ struct smb_iconv_convenience *iconv_convenience)
{
struct smbcli_tree *tree;
NTSTATUS status;
@@ -159,7 +162,8 @@ NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
sharename, devtype,
credentials, resolve_ctx, ev,
options,
- session_options);
+ session_options,
+ iconv_convenience);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index db43c9e20c..391efe0619 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -76,7 +76,8 @@ static NTSTATUS smbcli_transport_finish_recv(void *private, DATA_BLOB blob);
struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock,
TALLOC_CTX *parent_ctx,
bool primary,
- struct smbcli_options *options)
+ struct smbcli_options *options,
+ struct smb_iconv_convenience *iconv_convenience)
{
struct smbcli_transport *transport;
@@ -91,6 +92,7 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock,
transport->negotiate.protocol = PROTOCOL_NT1;
transport->options = *options;
transport->negotiate.max_xmit = transport->options.max_xmit;
+ transport->iconv_convenience = iconv_convenience;
/* setup the stream -> packet parser */
transport->packet = packet_init(transport);
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index ccfb28b84d..08f611941d 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -178,7 +178,8 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
struct resolve_context *resolve_ctx,
struct event_context *ev,
struct smbcli_options *options,
- struct smbcli_session_options *session_options)
+ struct smbcli_session_options *session_options,
+ struct smb_iconv_convenience *iconv_convenience)
{
struct smb_composite_connect io;
NTSTATUS status;
@@ -201,6 +202,7 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
io.in.workgroup = "";
io.in.options = *options;
io.in.session_options = *session_options;
+ io.in.iconv_convenience = iconv_convenience;
status = smb_composite_connect(&io, parent_ctx, resolve_ctx, ev);
if (NT_STATUS_IS_OK(status)) {
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index bd9bda0db1..98f18b1ed5 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -162,6 +162,9 @@ struct smbcli_transport {
/* context of the stream -> packet parser */
struct packet_context *packet;
+
+ /* iconv convenience */
+ struct smb_iconv_convenience *iconv_convenience;
};
/* this is the context for the user */
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c
index a4137290bb..8af1756562 100644
--- a/source4/libcli/smb_composite/connect.c
+++ b/source4/libcli/smb_composite/connect.c
@@ -322,7 +322,7 @@ static NTSTATUS connect_socket(struct composite_context *c,
/* the socket is up - we can initialise the smbcli transport layer */
state->transport = smbcli_transport_init(state->sock, state, true,
- &io->in.options);
+ &io->in.options, io->in.iconv_convenience);
NT_STATUS_HAVE_NO_MEMORY(state->transport);
if (is_ipaddress(state->sock->hostname) &&
diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c
index ff4f0e7930..c46cda25df 100644
--- a/source4/libcli/smb_composite/fetchfile.c
+++ b/source4/libcli/smb_composite/fetchfile.c
@@ -145,6 +145,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc
state->connect->in.credentials = io->in.credentials;
state->connect->in.fallback_to_anonymous = false;
state->connect->in.workgroup = io->in.workgroup;
+ state->connect->in.iconv_convenience = io->in.iconv_convenience;
state->connect->in.options = io->in.options;
state->connect->in.session_options = io->in.session_options;
diff --git a/source4/libcli/smb_composite/fsinfo.c b/source4/libcli/smb_composite/fsinfo.c
index dc5327a29c..284fe84154 100644
--- a/source4/libcli/smb_composite/fsinfo.c
+++ b/source4/libcli/smb_composite/fsinfo.c
@@ -153,6 +153,7 @@ struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
state->connect->in.credentials = io->in.credentials;
state->connect->in.fallback_to_anonymous = false;
state->connect->in.workgroup = io->in.workgroup;
+ state->connect->in.iconv_convenience = io->in.iconv_convenience;
state->connect->in.options = tree->session->transport->options;
state->connect->in.session_options = tree->session->options;
diff --git a/source4/libcli/smb_composite/smb_composite.h b/source4/libcli/smb_composite/smb_composite.h
index 08ca40c833..fd1b95e64f 100644
--- a/source4/libcli/smb_composite/smb_composite.h
+++ b/source4/libcli/smb_composite/smb_composite.h
@@ -59,6 +59,7 @@ struct smb_composite_fetchfile {
struct smbcli_options options;
struct smbcli_session_options session_options;
struct resolve_context *resolve_ctx;
+ struct smb_iconv_convenience *iconv_convenience;
} in;
struct {
uint8_t *data;
@@ -100,6 +101,7 @@ struct smb_composite_connect {
const char *workgroup;
struct smbcli_options options;
struct smbcli_session_options session_options;
+ struct smb_iconv_convenience *iconv_convenience;
} in;
struct {
struct smbcli_tree *tree;
@@ -137,6 +139,7 @@ struct smb_composite_fsinfo {
struct cli_credentials *credentials;
const char *workgroup;
enum smb_fsinfo_level level;
+ struct smb_iconv_convenience *iconv_convenience;
} in;
struct {