1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

Remove another use of global_loadparm.

Eventually, we should move some of these parameters into a separate
struct (perhaps into smb_transport_options?), to avoid the long lists of
parameters.
This commit is contained in:
Jelmer Vernooij 2008-11-02 16:07:28 +01:00
parent 7a0e5de08d
commit ff36c52d8c
31 changed files with 97 additions and 52 deletions

View File

@ -933,7 +933,7 @@ _PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t pu
/* avoid recursion */
if (flags & LIBNDR_FLAG_NO_NDR_SIZE) return 0;
ndr = ndr_push_init_ctx(NULL, lp_iconv_convenience(global_loadparm));
ndr = ndr_push_init_ctx(NULL, global_iconv_convenience);
if (!ndr) return 0;
ndr->flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE;
status = push(ndr, NDR_SCALARS|NDR_BUFFERS, discard_const(p));
@ -958,7 +958,7 @@ _PUBLIC_ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_pus
/* avoid recursion */
if (flags & LIBNDR_FLAG_NO_NDR_SIZE) return 0;
ndr = ndr_push_init_ctx(NULL, lp_iconv_convenience(global_loadparm));
ndr = ndr_push_init_ctx(NULL, global_iconv_convenience);
if (!ndr) return 0;
ndr->flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE;

View File

@ -567,6 +567,7 @@ typedef char fstring[FSTRING_LEN];
#endif
/* Samba 3 doesn't use iconv_convenience: */
extern void *global_iconv_convenience;
extern void *global_loadparm;
extern void *cmdline_lp_ctx;
struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);

View File

@ -166,6 +166,7 @@ _PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name
ndr->print(ndr, "%-25s: %s", name, print_sockaddr(addr, sizeof(addr), ss));
}
void *global_iconv_convenience;
void *global_loadparm;
void *cmdline_lp_ctx;
struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx)

View File

@ -67,6 +67,7 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
}
io.in.dest_ports = lp_smb_ports(ctx->auth_ctx->lp_ctx);
io.in.socket_options = lp_socket_options(ctx->auth_ctx->lp_ctx);
io.in.gensec_settings = lp_gensec_settings(mem_ctx, ctx->auth_ctx->lp_ctx);
io.in.called_name = strupper_talloc(mem_ctx, io.in.dest_host);

View File

@ -100,7 +100,8 @@ struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx,
const char *socket_options,
struct smbcli_options *smb_options,
struct smbcli_session_options *smb_session_options,
struct smb_iconv_convenience *iconv_convenience);
struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings);
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,

View File

@ -228,7 +228,8 @@ static struct smbcli_state * init_smb_session(struct resolve_context *resolve_ct
const char *socket_options,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
struct smb_iconv_convenience *iconv_convenience)
struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
NTSTATUS ret;
struct smbcli_state * cli = NULL;
@ -242,7 +243,8 @@ static struct smbcli_state * init_smb_session(struct resolve_context *resolve_ct
cmdline_credentials, resolve_ctx,
ev, options,
session_options,
iconv_convenience);
iconv_convenience,
gensec_settings);
if (!NT_STATUS_IS_OK(ret)) {
fprintf(stderr, "%s: connecting to //%s/%s: %s\n",
@ -311,7 +313,8 @@ static struct dd_iohandle * open_cifs_handle(struct resolve_context *resolve_ctx
const char *socket_options,
struct smbcli_options *smb_options,
struct smbcli_session_options *smb_session_options,
struct smb_iconv_convenience *iconv_convenience)
struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
struct cifs_handle * smbh;
@ -334,7 +337,8 @@ static struct dd_iohandle * open_cifs_handle(struct resolve_context *resolve_ctx
if ((smbh->cli = init_smb_session(resolve_ctx, ev, host, ports, share,
socket_options,
smb_options, smb_session_options,
iconv_convenience)) == NULL) {
iconv_convenience,
gensec_settings)) == NULL) {
return(NULL);
}
@ -358,7 +362,8 @@ struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx,
const char *socket_options,
struct smbcli_options *smb_options,
struct smbcli_session_options *smb_session_options,
struct smb_iconv_convenience *iconv_convenience)
struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
if (file_exist(path)) {
return(open_fd_handle(path, io_size, options));
@ -378,7 +383,8 @@ struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx,
io_size, options,
socket_options, smb_options,
smb_session_options,
iconv_convenience));
iconv_convenience,
gensec_settings));
}
return(open_fd_handle(path, io_size, options));

View File

@ -3049,7 +3049,8 @@ static bool do_connect(struct smbclient_context *ctx,
struct cli_credentials *cred,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
struct smb_iconv_convenience *iconv_convenience)
struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
NTSTATUS status;
char *server, *share;
@ -3071,7 +3072,8 @@ static bool do_connect(struct smbclient_context *ctx,
socket_options,
cred, resolve_ctx,
ev_ctx, options, session_options,
iconv_convenience);
iconv_convenience,
gensec_settings);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Connection to \\\\%s\\%s failed - %s\n",
server, share, nt_errstr(status));
@ -3284,7 +3286,8 @@ static int do_message_op(const char *netbios_name, const char *desthost,
desthost, lp_smb_ports(cmdline_lp_ctx), service,
lp_socket_options(cmdline_lp_ctx),
cmdline_credentials, &smb_options, &smb_session_options,
lp_iconv_convenience(cmdline_lp_ctx)))
lp_iconv_convenience(cmdline_lp_ctx),
lp_gensec_settings(ctx, cmdline_lp_ctx)))
return 1;
if (base_directory)

View File

@ -154,7 +154,8 @@ NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
struct event_context *ev,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
struct smb_iconv_convenience *iconv_convenience)
struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
struct smbcli_tree *tree;
NTSTATUS status;
@ -168,7 +169,8 @@ NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
credentials, resolve_ctx, ev,
options,
session_options,
iconv_convenience);
iconv_convenience,
gensec_settings);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}

View File

@ -179,7 +179,8 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
struct event_context *ev,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
struct smb_iconv_convenience *iconv_convenience)
struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
struct smb_composite_connect io;
NTSTATUS status;
@ -195,6 +196,7 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
io.in.service = service;
io.in.service_type = service_type;
io.in.credentials = credentials;
io.in.gensec_settings = gensec_settings;
io.in.fallback_to_anonymous = false;
/* This workgroup gets sent out by the SPNEGO session setup.

View File

@ -32,6 +32,7 @@ struct smbcli_transport; /* forward declare */
struct resolve_context;
struct cli_credentials;
struct gensec_settings;
/* default timeout for all smb requests */
#define SMB_REQUEST_TIMEOUT 60

View File

@ -257,7 +257,7 @@ static NTSTATUS connect_negprot(struct composite_context *c,
state->io_setup->in.capabilities = state->transport->negotiate.capabilities;
state->io_setup->in.credentials = io->in.credentials;
state->io_setup->in.workgroup = io->in.workgroup;
state->io_setup->in.gensec_settings = lp_gensec_settings(state->io_setup, global_loadparm);
state->io_setup->in.gensec_settings = io->in.gensec_settings;
state->creq = smb_composite_sesssetup_send(state->session, state->io_setup);
NT_STATUS_HAVE_NO_MEMORY(state->creq);

View File

@ -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.gensec_settings = io->in.gensec_settings;
state->connect->in.iconv_convenience = io->in.iconv_convenience;
state->connect->in.options = io->in.options;

View File

@ -154,6 +154,7 @@ struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
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.gensec_settings = io->in.gensec_settings;
state->connect->in.options = tree->session->transport->options;
state->connect->in.session_options = tree->session->options;

View File

@ -61,6 +61,7 @@ struct smb_composite_fetchfile {
struct smbcli_session_options session_options;
struct resolve_context *resolve_ctx;
struct smb_iconv_convenience *iconv_convenience;
struct gensec_settings *gensec_settings;
} in;
struct {
uint8_t *data;
@ -104,6 +105,7 @@ struct smb_composite_connect {
struct smbcli_options options;
struct smbcli_session_options session_options;
struct smb_iconv_convenience *iconv_convenience;
struct gensec_settings *gensec_settings;
} in;
struct {
struct smbcli_tree *tree;
@ -144,6 +146,7 @@ struct smb_composite_fsinfo {
const char *workgroup;
enum smb_fsinfo_level level;
struct smb_iconv_convenience *iconv_convenience;
struct gensec_settings *gensec_settings;
} in;
struct {

View File

@ -207,6 +207,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
io.in.service = remote_share;
io.in.service_type = "?????";
io.in.iconv_convenience = lp_iconv_convenience(ntvfs->ctx->lp_ctx);
io.in.gensec_settings = lp_gensec_settings(private, 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);

View File

@ -1450,14 +1450,8 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
const char *os2_fname = ".+,;=[].";
const char *dname = "samba3_errordir";
union smb_open io;
TALLOC_CTX *mem_ctx = talloc_init("samba3_errorpaths");
NTSTATUS status;
if (mem_ctx == NULL) {
torture_comment(tctx, "talloc_init failed\n");
return false;
}
nt_status_support = lp_nt_status_support(tctx->lp_ctx);
if (!lp_set_cmdline(tctx->lp_ctx, "nt status support", "yes")) {
@ -1506,14 +1500,14 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
io.ntcreatex.in.security_flags = 0;
io.ntcreatex.in.fname = dname;
status = smb_raw_open(cli_nt->tree, mem_ctx, &io);
status = smb_raw_open(cli_nt->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
torture_comment(tctx, "(%s) incorrect status %s should be %s\n",
__location__, nt_errstr(status),
nt_errstr(NT_STATUS_OBJECT_NAME_COLLISION));
goto fail;
}
status = smb_raw_open(cli_dos->tree, mem_ctx, &io);
status = smb_raw_open(cli_dos->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_DOS(ERRDOS, ERRfilexists))) {
torture_comment(tctx, "(%s) incorrect status %s should be %s\n",
__location__, nt_errstr(status),
@ -1563,7 +1557,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
}
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
status = smb_raw_open(cli_nt->tree, mem_ctx, &io);
status = smb_raw_open(cli_nt->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
torture_comment(tctx, "(%s) incorrect status %s should be %s\n",
__location__, nt_errstr(status),
@ -1571,7 +1565,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
goto fail;
}
status = smb_raw_open(cli_dos->tree, mem_ctx, &io);
status = smb_raw_open(cli_dos->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_DOS(ERRDOS, ERRfilexists))) {
torture_comment(tctx, "(%s) incorrect status %s should be %s\n",
__location__, nt_errstr(status),
@ -1644,7 +1638,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
io.ntcreatex.in.fname = fname;
io.ntcreatex.in.flags = 0;
status = smb_raw_open(cli_nt->tree, mem_ctx, &io);
status = smb_raw_open(cli_nt->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_A_DIRECTORY)) {
torture_comment(tctx, "ntcreate as dir gave %s, "
"expected NT_STATUS_NOT_A_DIRECTORY\n",
@ -1656,7 +1650,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
smbcli_close(cli_nt->tree, io.ntcreatex.out.file.fnum);
}
status = smb_raw_open(cli_dos->tree, mem_ctx, &io);
status = smb_raw_open(cli_dos->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_DOS(ERRDOS,
ERRbaddirectory))) {
torture_comment(tctx, "ntcreate as dir gave %s, "

View File

@ -823,6 +823,7 @@ static struct composite_context *torture_connect_async(
smb->in.credentials=cmdline_credentials;
smb->in.fallback_to_anonymous=false;
smb->in.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
smb->in.gensec_settings = lp_gensec_settings(mem_ctx, 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);

View File

@ -246,7 +246,8 @@ static bool connect_servers(struct event_context *ev,
lp_resolve_context(lp_ctx), ev,
&smb_options,
&smb_session_options,
lp_iconv_convenience(lp_ctx));
lp_iconv_convenience(lp_ctx),
lp_gensec_settings(lp_ctx, lp_ctx));
}
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect to \\\\%s\\%s - %s\n",

View File

@ -168,7 +168,8 @@ static struct smbcli_state *connect_one(struct event_context *ev,
servers[snum],
lp_resolve_context(lp_ctx),
ev, &options, &session_options,
lp_iconv_convenience(lp_ctx));
lp_iconv_convenience(lp_ctx),
lp_gensec_settings(mem_ctx, lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
sleep(2);
}

View File

@ -144,6 +144,7 @@ static struct smbcli_state *connect_one(TALLOC_CTX *mem_ctx,
char *share, const char **ports,
struct smb_options *options,
struct smb_options *session_options,
struct gensec_settings *gensec_settings,
struct event_context *ev)
{
struct smbcli_state *c;
@ -173,7 +174,7 @@ static struct smbcli_state *connect_one(TALLOC_CTX *mem_ctx,
nt_status = smbcli_full_connection(NULL,
&c, myname, server_n, ports, share, NULL,
username, lp_workgroup(), password, ev,
options, session_options);
options, session_options, gensec_settings);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("smbcli_full_connection failed with error %s\n", nt_errstr(nt_status)));
return NULL;
@ -192,6 +193,7 @@ static void reconnect(TALLOC_CTX *mem_ctx,
const char **ports,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
struct gensec_settings *gensec_settings,
struct event_context *ev,
char *share1, char *share2)
{
@ -211,7 +213,7 @@ static void reconnect(TALLOC_CTX *mem_ctx,
smbcli_ulogoff(cli[server][conn]);
talloc_free(cli[server][conn]);
}
cli[server][conn] = connect_one(mem_ctx, share[server], ports, options, session_options, ev);
cli[server][conn] = connect_one(mem_ctx, share[server], ports, options, session_options, gensec_settings, ev);
if (!cli[server][conn]) {
DEBUG(0,("Failed to connect to %s\n", share[server]));
exit(1);
@ -362,6 +364,7 @@ static void test_locks(TALLOC_CTX *mem_ctx, char *share1, char *share2,
const char **ports,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
struct gensec_settings *gensec_settings,
struct event_context *ev)
{
struct smbcli_state *cli[NSERVERS][NCONNECTIONS];
@ -391,7 +394,7 @@ static void test_locks(TALLOC_CTX *mem_ctx, char *share1, char *share2,
recorded[n].needed = true;
}
reconnect(mem_ctx, cli, nfs, fnum, ports, options, session_options, ev, share1, share2);
reconnect(mem_ctx, cli, nfs, fnum, ports, options, session_options, gensec_settings, ev, share1, share2);
open_files(cli, nfs, fnum);
n = retest(cli, nfs, fnum, numops);
@ -429,7 +432,7 @@ static void test_locks(TALLOC_CTX *mem_ctx, char *share1, char *share2,
}
close_files(cli, nfs, fnum);
reconnect(mem_ctx, cli, nfs, fnum, ports, options, session_options, ev, share1, share2);
reconnect(mem_ctx, cli, nfs, fnum, ports, options, session_options, gensec_settings, ev, share1, share2);
open_files(cli, nfs, fnum);
showall = true;
n1 = retest(cli, nfs, fnum, n);
@ -567,8 +570,9 @@ static void usage(void)
locking_init(1);
lp_smbcli_options(lp_ctx, &options);
lp_smbcli_session_options(lp_ctx, &session_options);
test_locks(mem_ctx, share1, share2, nfspath1, nfspath2, lp_smb_ports(lp_ctx),
&options, &session_options, ev);
test_locks(mem_ctx, share1, share2, nfspath1, nfspath2,
lp_smb_ports(lp_ctx),
&options, &session_options, lp_gensec_settings(lp_ctx), ev);
return(0);
}

View File

@ -79,7 +79,8 @@ static struct smbcli_state *connect_one(struct resolve_context *resolve_ctx,
const char *socket_options,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
struct smb_iconv_convenience *iconv_convenience)
struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
struct smbcli_state *c;
char *server;
@ -100,7 +101,8 @@ static struct smbcli_state *connect_one(struct resolve_context *resolve_ctx,
socket_options,
cmdline_credentials, resolve_ctx, ev,
options, session_options,
iconv_convenience);
iconv_convenience,
gensec_settings);
if (!NT_STATUS_IS_OK(status)) {
return NULL;
@ -372,7 +374,8 @@ static void usage(poptContext pc)
cli = connect_one(lp_resolve_context(lp_ctx), ev, mem_ctx, share,
lp_smb_ports(lp_ctx), lp_socket_options(lp_ctx),
&options, &session_options,
lp_iconv_convenience(lp_ctx));
lp_iconv_convenience(lp_ctx),
lp_gensec_settings(mem_ctx, lp_ctx));
if (!cli) {
DEBUG(0,("Failed to connect to %s\n", share));
exit(1);

View File

@ -164,6 +164,7 @@ static bool test_fetchfile(struct smbcli_state *cli, struct torture_context *tct
io2.in.filename = fname;
io2.in.resolve_ctx = lp_resolve_context(tctx->lp_ctx);
io2.in.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
io2.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
lp_smbcli_options(tctx->lp_ctx, &io2.in.options);
lp_smbcli_session_options(tctx->lp_ctx, &io2.in.session_options);
@ -355,6 +356,7 @@ static bool test_fsinfo(struct smbcli_state *cli, struct torture_context *tctx)
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);
io1.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
printf("testing parallel queryfsinfo [Object ID] with %d ops\n", torture_numops);

View File

@ -188,6 +188,7 @@ static void reopen_connection(struct event_context *ev, struct timed_event *te,
io->in.dest_host = state->dest_host;
io->in.dest_ports = state->dest_ports;
io->in.gensec_settings = lp_gensec_settings(state->mem_ctx, state->tctx->lp_ctx);
io->in.socket_options = lp_socket_options(state->tctx->lp_ctx);
io->in.called_name = state->called_name;
io->in.service = share;

View File

@ -137,6 +137,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.gensec_settings = lp_gensec_settings(state->mem_ctx, 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);

View File

@ -190,7 +190,8 @@ static bool open_connection_no_level2_oplocks(struct torture_context *tctx,
NULL, lp_socket_options(tctx->lp_ctx), cmdline_credentials,
lp_resolve_context(tctx->lp_ctx),
tctx->ev, &options, &session_options,
lp_iconv_convenience(tctx->lp_ctx));
lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to open connection - %s\n", nt_errstr(status));
return false;

View File

@ -103,7 +103,8 @@ static int fork_tcon_client(struct torture_context *tctx,
NULL, lp_socket_options(tctx->lp_ctx), cmdline_credentials,
lp_resolve_context(tctx->lp_ctx),
tctx->ev, &options, &session_options,
lp_iconv_convenience(tctx->lp_ctx));
lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
printf("failed to connect to //%s/%s: %s\n",

View File

@ -43,7 +43,8 @@ bool torture_rpc_join(struct torture_context *torture)
machine_account,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
lp_iconv_convenience(torture->lp_ctx));
lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
TORTURE_NETBIOS_NAME));
@ -71,7 +72,8 @@ bool torture_rpc_join(struct torture_context *torture)
machine_account,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
lp_iconv_convenience(torture->lp_ctx));
lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
TORTURE_NETBIOS_NAME));

View File

@ -94,7 +94,8 @@ bool torture_bind_authcontext(struct torture_context *torture)
cmdline_credentials,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
lp_iconv_convenience(torture->lp_ctx));
lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
d_printf("smbcli_full_connection failed: %s\n",
nt_errstr(status));
@ -316,7 +317,8 @@ bool torture_bind_samba3(struct torture_context *torture)
cmdline_credentials,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
lp_iconv_convenience(torture->lp_ctx));
lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
d_printf("smbcli_full_connection failed: %s\n",
nt_errstr(status));
@ -1254,7 +1256,8 @@ bool torture_netlogon_samba3(struct torture_context *torture)
anon_creds,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
lp_iconv_convenience(torture->lp_ctx));
lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
d_printf("smbcli_full_connection failed: %s\n",
nt_errstr(status));
@ -1344,7 +1347,8 @@ static bool test_join3(struct torture_context *tctx,
"IPC$", NULL, lp_socket_options(tctx->lp_ctx),
smb_creds, lp_resolve_context(tctx->lp_ctx),
tctx->ev, &options, &session_options,
lp_iconv_convenience(tctx->lp_ctx));
lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
d_printf("smbcli_full_connection failed: %s\n",
nt_errstr(status));
@ -1727,7 +1731,8 @@ bool torture_samba3_rpc_getusername(struct torture_context *torture)
"IPC$", NULL, lp_socket_options(torture->lp_ctx), cmdline_credentials,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
lp_iconv_convenience(torture->lp_ctx));
lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) smbcli_full_connection failed: %s\n",
__location__, nt_errstr(status));
@ -1755,7 +1760,8 @@ bool torture_samba3_rpc_getusername(struct torture_context *torture)
lp_socket_options(torture->lp_ctx), anon_creds,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
lp_iconv_convenience(torture->lp_ctx));
lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) anon smbcli_full_connection failed: %s\n",
__location__, nt_errstr(status));

View File

@ -67,7 +67,8 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx)
cmdline_credentials,
lp_resolve_context(tctx->lp_ctx),
tctx->ev, &options, &session_options,
lp_iconv_convenience(tctx->lp_ctx));
lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
printf("failed to connect to //%s/%s: %s\n",

View File

@ -87,7 +87,8 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx,
share, NULL, lp_socket_options(tctx->lp_ctx),
creds, lp_resolve_context(tctx->lp_ctx),
tctx->ev, &options, &session_options,
lp_iconv_convenience(tctx->lp_ctx));
lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
printf("failed to connect to //%s/%s: %s\n",

View File

@ -490,7 +490,8 @@ _PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx,
cmdline_credentials,
lp_resolve_context(tctx->lp_ctx),
ev, &options, &session_options,
lp_iconv_convenience(tctx->lp_ctx));
lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to open connection - %s\n", nt_errstr(status));
return false;