diff options
Diffstat (limited to 'source4')
31 files changed, 109 insertions, 46 deletions
diff --git a/source4/auth/ntlm/auth_server.c b/source4/auth/ntlm/auth_server.c index fde9835cf2..0b1e091eea 100644 --- a/source4/auth/ntlm/auth_server.c +++ b/source4/auth/ntlm/auth_server.c @@ -80,6 +80,8 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX io.in.workgroup = ""; /* only used with SPNEGO, disabled above */ io.in.options = smb_options; + + io.in.iconv_convenience = lp_iconv_convenience(ctx->auth_ctx->lp_ctx); lp_smbcli_session_options(ctx->auth_ctx->lp_ctx, &io.in.session_options); status = smb_composite_connect(&io, mem_ctx, lp_resolve_context(ctx->auth_ctx->lp_ctx), diff --git a/source4/client/cifsdd.c b/source4/client/cifsdd.c index 5f07826d06..6d35dc6b82 100644 --- a/source4/client/cifsdd.c +++ b/source4/client/cifsdd.c @@ -358,7 +358,8 @@ static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx, struct event_context *ev, const char * which, const char **ports, struct smbcli_options *smb_options, - struct smbcli_session_options *smb_session_options) + struct smbcli_session_options *smb_session_options, + struct smb_iconv_convenience *iconv_convenience) { int options = 0; const char * path = NULL; @@ -380,13 +381,15 @@ static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx, path = check_arg_pathname("if"); handle = dd_open_path(resolve_ctx, ev, path, ports, check_arg_numeric("ibs"), options, - smb_options, smb_session_options); + smb_options, smb_session_options, + iconv_convenience); } else if (strcmp(which, "of") == 0) { options |= DD_WRITE; path = check_arg_pathname("of"); handle = dd_open_path(resolve_ctx, ev, path, ports, check_arg_numeric("obs"), options, - smb_options, smb_session_options); + smb_options, smb_session_options, + iconv_convenience); } else { SMB_ASSERT(0); return(NULL); @@ -440,13 +443,14 @@ static int copy_files(struct event_context *ev, struct loadparm_context *lp_ctx) if (!(ifile = open_file(lp_resolve_context(lp_ctx), ev, "if", lp_smb_ports(lp_ctx), &options, - &session_options))) { + &session_options, lp_iconv_convenience(lp_ctx)))) { return(FILESYS_EXIT_CODE); } if (!(ofile = open_file(lp_resolve_context(lp_ctx), ev, "of", lp_smb_ports(lp_ctx), &options, - &session_options))) { + &session_options, + lp_iconv_convenience(lp_ctx)))) { return(FILESYS_EXIT_CODE); } diff --git a/source4/client/cifsdd.h b/source4/client/cifsdd.h index 3195e4334f..bb851fa248 100644 --- a/source4/client/cifsdd.h +++ b/source4/client/cifsdd.h @@ -98,7 +98,8 @@ struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx, const char **ports, uint64_t io_size, int options, struct smbcli_options *smb_options, - struct smbcli_session_options *smb_session_options); + struct smbcli_session_options *smb_session_options, + struct smb_iconv_convenience *iconv_convenience); bool dd_fill_block(struct dd_iohandle * h, uint8_t * buf, uint64_t * buf_size, uint64_t need_size, uint64_t block_size); bool dd_flush_block(struct dd_iohandle * h, uint8_t * buf, diff --git a/source4/client/cifsddio.c b/source4/client/cifsddio.c index 25194a621a..3c9e0c2202 100644 --- a/source4/client/cifsddio.c +++ b/source4/client/cifsddio.c @@ -226,7 +226,8 @@ static struct smbcli_state * init_smb_session(struct resolve_context *resolve_ct const char **ports, const char * share, struct smbcli_options *options, - struct smbcli_session_options *session_options) + struct smbcli_session_options *session_options, + struct smb_iconv_convenience *iconv_convenience) { NTSTATUS ret; struct smbcli_state * cli = NULL; @@ -238,7 +239,8 @@ static struct smbcli_state * init_smb_session(struct resolve_context *resolve_ct NULL /* devtype */, cmdline_credentials, resolve_ctx, ev, options, - session_options); + session_options, + iconv_convenience); if (!NT_STATUS_IS_OK(ret)) { fprintf(stderr, "%s: connecting to //%s/%s: %s\n", @@ -305,7 +307,8 @@ static struct dd_iohandle * open_cifs_handle(struct resolve_context *resolve_ctx uint64_t io_size, int options, struct smbcli_options *smb_options, - struct smbcli_session_options *smb_session_options) + struct smbcli_session_options *smb_session_options, + struct smb_iconv_convenience *iconv_convenience) { struct cifs_handle * smbh; @@ -326,7 +329,8 @@ static struct dd_iohandle * open_cifs_handle(struct resolve_context *resolve_ctx smbh->h.io_seek = smb_seek_func; if ((smbh->cli = init_smb_session(resolve_ctx, ev, host, ports, share, - smb_options, smb_session_options)) == NULL) { + smb_options, smb_session_options, + iconv_convenience)) == NULL) { return(NULL); } @@ -348,7 +352,8 @@ struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx, uint64_t io_size, int options, struct smbcli_options *smb_options, - struct smbcli_session_options *smb_session_options) + struct smbcli_session_options *smb_session_options, + struct smb_iconv_convenience *iconv_convenience) { if (file_exist(path)) { return(open_fd_handle(path, io_size, options)); @@ -366,7 +371,8 @@ struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx, return(open_cifs_handle(resolve_ctx, ev, host, ports, share, remain, io_size, options, smb_options, - smb_session_options)); + smb_session_options, + iconv_convenience)); } return(open_fd_handle(path, io_size, options)); diff --git a/source4/client/client.c b/source4/client/client.c index 1865d8db13..a61d1b4ca4 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -3033,7 +3033,8 @@ static bool do_connect(struct smbclient_context *ctx, const char *specified_share, struct cli_credentials *cred, struct smbcli_options *options, - struct smbcli_session_options *session_options) + struct smbcli_session_options *session_options, + struct smb_iconv_convenience *iconv_convenience) { NTSTATUS status; char *server, *share; @@ -3052,7 +3053,8 @@ static bool do_connect(struct smbclient_context *ctx, status = smbcli_full_connection(ctx, &ctx->cli, server, ports, share, NULL, cred, resolve_ctx, - ev_ctx, options, session_options); + ev_ctx, options, session_options, + iconv_convenience); if (!NT_STATUS_IS_OK(status)) { d_printf("Connection to \\\\%s\\%s failed - %s\n", server, share, nt_errstr(status)); @@ -3085,7 +3087,8 @@ static int do_message_op(const char *netbios_name, const char *desthost, int name_type, 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 nbt_name called, calling; const char *server_name; @@ -3099,7 +3102,8 @@ static int do_message_op(const char *netbios_name, const char *desthost, if (!(cli = smbcli_state_init(NULL)) || !smbcli_socket_connect(cli, server_name, destports, - ev_ctx, resolve_ctx, options)) { + ev_ctx, resolve_ctx, options, + iconv_convenience)) { d_printf("Connection to %s failed\n", server_name); return 1; } @@ -3252,13 +3256,14 @@ static int do_message_op(const char *netbios_name, const char *desthost, lp_smb_ports(cmdline_lp_ctx), dest_ip, name_type, ev_ctx, lp_resolve_context(cmdline_lp_ctx), - &smb_options); + &smb_options, lp_iconv_convenience(cmdline_lp_ctx)); return rc; } if (!do_connect(ctx, ev_ctx, lp_resolve_context(cmdline_lp_ctx), desthost, lp_smb_ports(cmdline_lp_ctx), service, - cmdline_credentials, &smb_options, &smb_session_options)) + cmdline_credentials, &smb_options, &smb_session_options, + lp_iconv_convenience(cmdline_lp_ctx))) return 1; if (base_directory) diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c index 621a2fe349..fb23214bca 100644 --- a/source4/lib/messaging/pymessaging.c +++ b/source4/lib/messaging/pymessaging.c @@ -21,6 +21,7 @@ #include "includes.h" #include <Python.h> +#include "scripting/python/modules.h" #include "libcli/util/pyerrors.h" #include "librpc/rpc/pyrpc.h" #include "lib/messaging/irpc.h" @@ -347,12 +348,12 @@ PyObject *py_irpc_connect(PyTypeObject *self, PyObject *args, PyObject *kwargs) ret->msg_ctx = messaging_init(ret->mem_ctx, messaging_path, server_id, - lp_iconv_convenience(global_loadparm), + py_iconv_convenience(ret->mem_ctx), ev); } else { ret->msg_ctx = messaging_client_init(ret->mem_ctx, messaging_path, - lp_iconv_convenience(global_loadparm), + py_iconv_convenience(ret->mem_ctx), ev); } 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 { diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c index b117a98270..9583fcdc02 100644 --- a/source4/librpc/rpc/dcerpc_connect.c +++ b/source4/librpc/rpc/dcerpc_connect.c @@ -120,6 +120,8 @@ static struct composite_context *dcerpc_pipe_connect_ncacn_np_smb_send(TALLOC_CT conn->in.service_type = NULL; conn->in.workgroup = lp_workgroup(lp_ctx); + conn->in.iconv_convenience = lp_iconv_convenience(lp_ctx); + lp_smbcli_options(lp_ctx, &conn->in.options); lp_smbcli_session_options(lp_ctx, &conn->in.session_options); diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index 322814ef5d..14bf79ecf6 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -205,6 +205,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs, io.in.workgroup = lp_workgroup(ntvfs->ctx->lp_ctx); io.in.service = remote_share; io.in.service_type = "?????"; + io.in.iconv_convenience = lp_iconv_convenience(ntvfs->ctx->lp_ctx); lp_smbcli_options(ntvfs->ctx->lp_ctx, &io.in.options); lp_smbcli_session_options(ntvfs->ctx->lp_ctx, &io.in.session_options); diff --git a/source4/scripting/python/modules.h b/source4/scripting/python/modules.h index 238c73455f..6b242ee257 100644 --- a/source4/scripting/python/modules.h +++ b/source4/scripting/python/modules.h @@ -23,4 +23,6 @@ void py_load_samba_modules(void); void py_update_path(const char *bindir); +#define py_iconv_convenience(mem_ctx) smb_iconv_convenience_init(mem_ctx, "ASCII", PyUnicode_GetDefaultEncoding(), true) + #endif /* __SAMBA_PYTHON_MODULES_H__ */ diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c index 2ab3f9ca91..f2b7b9b225 100644 --- a/source4/torture/basic/base.c +++ b/source4/torture/basic/base.c @@ -56,7 +56,8 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx) lp_smbcli_options(tctx->lp_ctx, &options); if (!smbcli_socket_connect(cli, host, lp_smb_ports(tctx->lp_ctx), tctx->ev, - lp_resolve_context(tctx->lp_ctx), &options)) { + lp_resolve_context(tctx->lp_ctx), &options, + lp_iconv_convenience(tctx->lp_ctx))) { torture_comment(tctx, "Failed to connect with %s\n", host); goto failed; } diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c index 3a09fa74b5..89e7169883 100644 --- a/source4/torture/basic/misc.c +++ b/source4/torture/basic/misc.c @@ -821,6 +821,7 @@ static struct composite_context *torture_connect_async( smb->in.service_type=NULL; smb->in.credentials=cmdline_credentials; smb->in.fallback_to_anonymous=false; + smb->in.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx); smb->in.workgroup=workgroup; lp_smbcli_options(tctx->lp_ctx, &smb->in.options); lp_smbcli_session_options(tctx->lp_ctx, &smb->in.session_options); diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c index 74ece99422..aefed23f51 100644 --- a/source4/torture/gentest.c +++ b/source4/torture/gentest.c @@ -241,7 +241,8 @@ static bool connect_servers(struct event_context *ev, servers[i].credentials, lp_resolve_context(lp_ctx), ev, &smb_options, - &smb_session_options); + &smb_session_options, + lp_iconv_convenience(lp_ctx)); } if (!NT_STATUS_IS_OK(status)) { printf("Failed to connect to \\\\%s\\%s - %s\n", diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c index 710aa8007a..819fbe072b 100644 --- a/source4/torture/locktest.c +++ b/source4/torture/locktest.c @@ -166,7 +166,8 @@ static struct smbcli_state *connect_one(struct event_context *ev, share, NULL, servers[snum], lp_resolve_context(lp_ctx), - ev, &options, &session_options); + ev, &options, &session_options, + lp_iconv_convenience(lp_ctx)); if (!NT_STATUS_IS_OK(status)) { sleep(2); } diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c index 6e9ae89336..14d597666e 100644 --- a/source4/torture/masktest.c +++ b/source4/torture/masktest.c @@ -77,7 +77,8 @@ static struct smbcli_state *connect_one(struct resolve_context *resolve_ctx, TALLOC_CTX *mem_ctx, char *share, const char **ports, struct smbcli_options *options, - struct smbcli_session_options *session_options) + struct smbcli_session_options *session_options, + struct smb_iconv_convenience *iconv_convenience) { struct smbcli_state *c; char *server; @@ -96,7 +97,8 @@ static struct smbcli_state *connect_one(struct resolve_context *resolve_ctx, ports, share, NULL, cmdline_credentials, resolve_ctx, ev, - options, session_options); + options, session_options, + iconv_convenience); if (!NT_STATUS_IS_OK(status)) { return NULL; @@ -366,7 +368,8 @@ static void usage(poptContext pc) lp_smbcli_session_options(lp_ctx, &session_options); cli = connect_one(lp_resolve_context(lp_ctx), ev, mem_ctx, share, - lp_smb_ports(lp_ctx), &options, &session_options); + lp_smb_ports(lp_ctx), &options, &session_options, + lp_iconv_convenience(lp_ctx)); if (!cli) { DEBUG(0,("Failed to connect to %s\n", share)); exit(1); diff --git a/source4/torture/raw/composite.c b/source4/torture/raw/composite.c index 7f1f5943e1..16de4308bb 100644 --- a/source4/torture/raw/composite.c +++ b/source4/torture/raw/composite.c @@ -163,6 +163,7 @@ static bool test_fetchfile(struct smbcli_state *cli, struct torture_context *tct io2.in.workgroup = lp_workgroup(tctx->lp_ctx); io2.in.filename = fname; io2.in.resolve_ctx = lp_resolve_context(tctx->lp_ctx); + io2.in.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx); lp_smbcli_options(tctx->lp_ctx, &io2.in.options); lp_smbcli_session_options(tctx->lp_ctx, &io2.in.session_options); @@ -352,6 +353,7 @@ static bool test_fsinfo(struct smbcli_state *cli, struct torture_context *tctx) io1.in.credentials = cmdline_credentials; io1.in.workgroup = lp_workgroup(tctx->lp_ctx); io1.in.level = RAW_QFS_OBJECTID_INFORMATION; + io1.in.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx); printf("testing parallel queryfsinfo [Object ID] with %d ops\n", torture_numops); diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c index 26fad4235e..a6dce8a926 100644 --- a/source4/torture/raw/lockbench.c +++ b/source4/torture/raw/lockbench.c @@ -194,6 +194,7 @@ static void reopen_connection(struct event_context *ev, struct timed_event *te, io->in.credentials = cmdline_credentials; io->in.fallback_to_anonymous = false; io->in.workgroup = lp_workgroup(state->tctx->lp_ctx); + io->in.iconv_convenience = lp_iconv_convenience(state->tctx->lp_ctx); lp_smbcli_options(state->tctx->lp_ctx, &io->in.options); lp_smbcli_session_options(state->tctx->lp_ctx, &io->in.session_options); diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c index 19924e731b..46b41e51a0 100644 --- a/source4/torture/raw/oplock.c +++ b/source4/torture/raw/oplock.c @@ -189,7 +189,8 @@ static bool open_connection_no_level2_oplocks(struct torture_context *tctx, torture_setting_string(tctx, "share", NULL), NULL, cmdline_credentials, lp_resolve_context(tctx->lp_ctx), - tctx->ev, &options, &session_options); + tctx->ev, &options, &session_options, + lp_iconv_convenience(tctx->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { printf("Failed to open connection - %s\n", nt_errstr(status)); return false; diff --git a/source4/torture/raw/tconrate.c b/source4/torture/raw/tconrate.c index 66ef2ae2dd..9e75301828 100644 --- a/source4/torture/raw/tconrate.c +++ b/source4/torture/raw/tconrate.c @@ -102,7 +102,8 @@ static int fork_tcon_client(struct torture_context *tctx, host, lp_smb_ports(tctx->lp_ctx), share, NULL, cmdline_credentials, lp_resolve_context(tctx->lp_ctx), - tctx->ev, &options, &session_options); + tctx->ev, &options, &session_options, + lp_iconv_convenience(tctx->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { printf("failed to connect to //%s/%s: %s\n", diff --git a/source4/torture/rpc/join.c b/source4/torture/rpc/join.c index ee0c05360f..a6bb53a759 100644 --- a/source4/torture/rpc/join.c +++ b/source4/torture/rpc/join.c @@ -41,7 +41,8 @@ bool torture_rpc_join(struct torture_context *torture) "IPC$", NULL, machine_account, lp_resolve_context(torture->lp_ctx), - torture->ev, &options, &session_options); + torture->ev, &options, &session_options, + lp_iconv_convenience(torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n", TORTURE_NETBIOS_NAME)); @@ -67,7 +68,8 @@ bool torture_rpc_join(struct torture_context *torture) "IPC$", NULL, machine_account, lp_resolve_context(torture->lp_ctx), - torture->ev, &options, &session_options); + torture->ev, &options, &session_options, + lp_iconv_convenience(torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n", TORTURE_NETBIOS_NAME)); diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index 25ff7d0ea9..85714ace13 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -91,7 +91,8 @@ bool torture_bind_authcontext(struct torture_context *torture) lp_smb_ports(torture->lp_ctx), "IPC$", NULL, cmdline_credentials, lp_resolve_context(torture->lp_ctx), - torture->ev, &options, &session_options); + torture->ev, &options, &session_options, + lp_iconv_convenience(torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { d_printf("smbcli_full_connection failed: %s\n", nt_errstr(status)); @@ -307,7 +308,8 @@ bool torture_bind_samba3(struct torture_context *torture) lp_smb_ports(torture->lp_ctx), "IPC$", NULL, cmdline_credentials, lp_resolve_context(torture->lp_ctx), - torture->ev, &options, &session_options); + torture->ev, &options, &session_options, + lp_iconv_convenience(torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { d_printf("smbcli_full_connection failed: %s\n", nt_errstr(status)); @@ -1226,7 +1228,8 @@ bool torture_netlogon_samba3(struct torture_context *torture) lp_smb_ports(torture->lp_ctx), "IPC$", NULL, anon_creds, lp_resolve_context(torture->lp_ctx), - torture->ev, &options, &session_options); + torture->ev, &options, &session_options, + lp_iconv_convenience(torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { d_printf("smbcli_full_connection failed: %s\n", nt_errstr(status)); @@ -1315,7 +1318,8 @@ static bool test_join3(struct torture_context *tctx, lp_smb_ports(tctx->lp_ctx), "IPC$", NULL, smb_creds, lp_resolve_context(tctx->lp_ctx), - tctx->ev, &options, &session_options); + tctx->ev, &options, &session_options, + lp_iconv_convenience(tctx->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { d_printf("smbcli_full_connection failed: %s\n", nt_errstr(status)); @@ -1692,7 +1696,8 @@ bool torture_samba3_rpc_getusername(struct torture_context *torture) lp_smb_ports(torture->lp_ctx), "IPC$", NULL, cmdline_credentials, lp_resolve_context(torture->lp_ctx), - torture->ev, &options, &session_options); + torture->ev, &options, &session_options, + lp_iconv_convenience(torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { d_printf("(%s) smbcli_full_connection failed: %s\n", __location__, nt_errstr(status)); @@ -1719,7 +1724,8 @@ bool torture_samba3_rpc_getusername(struct torture_context *torture) lp_smb_ports(torture->lp_ctx), "IPC$", NULL, anon_creds, lp_resolve_context(torture->lp_ctx), - torture->ev, &options, &session_options); + torture->ev, &options, &session_options, + lp_iconv_convenience(torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { d_printf("(%s) anon smbcli_full_connection failed: %s\n", __location__, nt_errstr(status)); diff --git a/source4/torture/unix/unix_info2.c b/source4/torture/unix/unix_info2.c index 3bddde2a97..53909f645b 100644 --- a/source4/torture/unix/unix_info2.c +++ b/source4/torture/unix/unix_info2.c @@ -66,7 +66,8 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx) share, NULL, cmdline_credentials, lp_resolve_context(tctx->lp_ctx), - tctx->ev, &options, &session_options); + tctx->ev, &options, &session_options, + lp_iconv_convenience(tctx->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { printf("failed to connect to //%s/%s: %s\n", diff --git a/source4/torture/unix/whoami.c b/source4/torture/unix/whoami.c index d742e23e82..d7fbe4a23d 100644 --- a/source4/torture/unix/whoami.c +++ b/source4/torture/unix/whoami.c @@ -86,7 +86,8 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx, lp_smb_ports(tctx->lp_ctx), share, NULL, creds, lp_resolve_context(tctx->lp_ctx), - tctx->ev, &options, &session_options); + tctx->ev, &options, &session_options, + lp_iconv_convenience(tctx->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { printf("failed to connect to //%s/%s: %s\n", diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c index 3d9c5e321d..b84938cf11 100644 --- a/source4/torture/util_smb.c +++ b/source4/torture/util_smb.c @@ -488,7 +488,8 @@ _PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx, sharename, NULL, cmdline_credentials, lp_resolve_context(tctx->lp_ctx), - ev, &options, &session_options); + ev, &options, &session_options, + lp_iconv_convenience(tctx->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { printf("Failed to open connection - %s\n", nt_errstr(status)); return false; |