Cope with API changes.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 30 Sep 2008 01:07:08 +0000 (03:07 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 30 Sep 2008 01:07:08 +0000 (03:07 +0200)
16 files changed:
source4/client/cifsdd.c
source4/client/cifsdd.h
source4/client/cifsddio.c
source4/client/client.c
source4/libcli/cliconnect.c
source4/torture/gentest.c
source4/torture/locktest.c
source4/torture/locktest2.c
source4/torture/masktest.c
source4/torture/raw/oplock.c
source4/torture/raw/tconrate.c
source4/torture/rpc/join.c
source4/torture/rpc/samba3rpc.c
source4/torture/unix/unix_info2.c
source4/torture/unix/whoami.c
source4/torture/util_smb.c

index 141b165ad44808e68f61011137720593411afa16..5f07826d06eb7381ffcbc8759053163882731cf6 100644 (file)
@@ -357,7 +357,8 @@ static void print_transfer_stats(void)
 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_options *smb_options,
+                                     struct smbcli_session_options *smb_session_options)
 {
        int                     options = 0;
        const char *            path = NULL;
@@ -379,13 +380,13 @@ 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_options, smb_session_options);
        } 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_options, smb_session_options);
        } else {
                SMB_ASSERT(0);
                return(NULL);
@@ -412,12 +413,14 @@ static int copy_files(struct event_context *ev, struct loadparm_context *lp_ctx)
        struct dd_iohandle *    ofile;
 
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
 
        ibs = check_arg_numeric("ibs");
        obs = check_arg_numeric("obs");
        count = check_arg_numeric("count");
 
        lp_smbcli_options(lp_ctx, &options);
+       lp_smbcli_session_options(lp_ctx, &session_options);
 
        /* Allocate IO buffer. We need more than the max IO size because we
         * could accumulate a remainder if ibs and obs don't match.
@@ -436,12 +439,14 @@ static int copy_files(struct event_context *ev, struct loadparm_context *lp_ctx)
                        (unsigned long long)iomax, options.max_xmit));
 
        if (!(ifile = open_file(lp_resolve_context(lp_ctx), ev, "if",
-                               lp_smb_ports(lp_ctx), &options))) {
+                               lp_smb_ports(lp_ctx), &options,
+                               &session_options))) {
                return(FILESYS_EXIT_CODE);
        }
 
        if (!(ofile = open_file(lp_resolve_context(lp_ctx), ev, "of",
-                               lp_smb_ports(lp_ctx), &options))) {
+                               lp_smb_ports(lp_ctx), &options,
+                               &session_options))) {
                return(FILESYS_EXIT_CODE);
        }
 
index 21a4ad488222048da96c650a219b3ab6533fb7e1..3195e4334f3bc4938fa97ad1bf6e4293465784f8 100644 (file)
@@ -89,6 +89,7 @@ struct dd_iohandle
 #define DD_OPLOCK              0x00000008
 
 struct smbcli_options;
+struct smbcli_session_options;
 struct event_context;
 
 struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx, 
@@ -96,7 +97,8 @@ struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx,
                                  const char * path,
                                  const char **ports,
                                uint64_t io_size, int options, 
-                               struct smbcli_options *smb_options);
+                               struct smbcli_options *smb_options,
+                               struct smbcli_session_options *smb_session_options);
 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,
index 4297c300121ef6c4f57b379caa9005975619efb8..25194a621a82472db63e02fc7b60964978cee21e 100644 (file)
@@ -225,7 +225,8 @@ static struct smbcli_state * init_smb_session(struct resolve_context *resolve_ct
                                              const char * host,
                                              const char **ports,
                                              const char * share,
-                                             struct smbcli_options *options)
+                                             struct smbcli_options *options,
+                                             struct smbcli_session_options *session_options)
 {
        NTSTATUS                ret;
        struct smbcli_state *   cli = NULL;
@@ -236,7 +237,8 @@ static struct smbcli_state * init_smb_session(struct resolve_context *resolve_ct
        ret = smbcli_full_connection(NULL, &cli, host, ports, share,
                                     NULL /* devtype */,
                                     cmdline_credentials, resolve_ctx,
-                                    ev, options);
+                                    ev, options,
+                                    session_options);
 
        if (!NT_STATUS_IS_OK(ret)) {
                fprintf(stderr, "%s: connecting to //%s/%s: %s\n",
@@ -302,7 +304,8 @@ static struct dd_iohandle * open_cifs_handle(struct resolve_context *resolve_ctx
                                        const char * path,
                                        uint64_t io_size,
                                        int options,
-                                       struct smbcli_options *smb_options)
+                                       struct smbcli_options *smb_options,
+                                       struct smbcli_session_options *smb_session_options)
 {
        struct cifs_handle * smbh;
 
@@ -323,7 +326,7 @@ 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)) == NULL) {
+                                         smb_options, smb_session_options)) == NULL) {
                return(NULL);
        }
 
@@ -344,7 +347,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_options *smb_options,
+                               struct smbcli_session_options *smb_session_options)
 {
        if (file_exist(path)) {
                return(open_fd_handle(path, io_size, options));
@@ -361,7 +365,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));
+                                               io_size, options, smb_options,
+                                               smb_session_options));
                }
 
                return(open_fd_handle(path, io_size, options));
index e05e195372f2ca362d54b7e52321e2caf6a79861..266bd670250da182465ef41b04f58789c3920eb9 100644 (file)
@@ -3032,7 +3032,8 @@ static bool do_connect(struct smbclient_context *ctx,
                       const char *specified_server, const char **ports, 
                       const char *specified_share, 
                       struct cli_credentials *cred, 
-                      struct smbcli_options *options)
+                      struct smbcli_options *options,
+                      struct smbcli_session_options *session_options)
 {
        NTSTATUS status;
        char *server, *share;
@@ -3051,7 +3052,7 @@ 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);
+                                       ev_ctx, options, session_options);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("Connection to \\\\%s\\%s failed - %s\n", 
                         server, share, nt_errstr(status));
@@ -3138,6 +3139,7 @@ static int do_message_op(const char *netbios_name, const char *desthost,
        struct smbclient_context *ctx;
        const char *cmdstr = NULL;
        struct smbcli_options smb_options;
+       struct smbcli_session_options smb_session_options;
 
        struct poptOption long_options[] = {
                POPT_AUTOHELP
@@ -3227,6 +3229,7 @@ static int do_message_op(const char *netbios_name, const char *desthost,
        poptFreeContext(pc);
 
        lp_smbcli_options(cmdline_lp_ctx, &smb_options);
+       lp_smbcli_session_options(cmdline_lp_ctx, &smb_session_options);
 
        ev_ctx = s4_event_context_init(talloc_autofree_context());
 
@@ -3255,7 +3258,7 @@ static int do_message_op(const char *netbios_name, const char *desthost,
        
        if (!do_connect(ctx, ev_ctx, lp_resolve_context(cmdline_lp_ctx),
                        desthost, lp_smb_ports(cmdline_lp_ctx), service,
-                       cmdline_credentials, &smb_options))
+                       cmdline_credentials, &smb_options, &smb_session_options))
                return 1;
 
        if (base_directory) 
index 3b1c3c531458722f4b2d492eb3138263beb4c81b..e42b04cdc57426027a8d45e32d5fcac796f32dd1 100644 (file)
@@ -146,7 +146,8 @@ NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
                                struct cli_credentials *credentials,
                                struct resolve_context *resolve_ctx,
                                struct event_context *ev,
-                               struct smbcli_options *options)
+                               struct smbcli_options *options,
+                               struct smbcli_session_options *session_options)
 {
        struct smbcli_tree *tree;
        NTSTATUS status;
@@ -157,7 +158,8 @@ NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
                                             &tree, host, ports, 
                                             sharename, devtype,
                                             credentials, resolve_ctx, ev,
-                                            options);
+                                            options,
+                                            session_options);
        if (!NT_STATUS_IS_OK(status)) {
                goto done;
        }
index fecdfda56ef288ab3fc2a21cdb7b48896d3d695c..3bf3ad8b1bf550f0346134b1be1129d36b89a75e 100644 (file)
@@ -214,7 +214,9 @@ static bool connect_servers(struct event_context *ev,
                for (j=0;j<NINSTANCES;j++) {
                        NTSTATUS status;
                        struct smbcli_options smb_options;
+                       struct smbcli_session_options smb_session_options;
                        lp_smbcli_options(lp_ctx, &smb_options);
+                       lp_smbcli_session_options(lp_ctx, &smb_session_options);
 
                        printf("Connecting to \\\\%s\\%s as %s - instance %d\n",
                               servers[i].server_name, servers[i].share_name, 
@@ -238,7 +240,8 @@ static bool connect_servers(struct event_context *ev,
                                                                     servers[i].share_name, "A:",
                                                                     servers[i].credentials,
                                                                     lp_resolve_context(lp_ctx), ev,
-                                                                    &smb_options);
+                                                                    &smb_options,
+                                                                    &smb_session_options);
                        }
                        if (!NT_STATUS_IS_OK(status)) {
                                printf("Failed to connect to \\\\%s\\%s - %s\n",
index 9c7bffb6f4c99ce286fa084b7e46de7da57de0ff..a511e261cb9606dd74718ef9bf4179b6cf96351e 100644 (file)
@@ -117,8 +117,10 @@ static struct smbcli_state *connect_one(struct event_context *ev,
        NTSTATUS status;
        int retries = 10;
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
 
        lp_smbcli_options(lp_ctx, &options);
+       lp_smbcli_session_options(lp_ctx, &session_options);
 
        printf("connect_one(%s, %d, %d)\n", share, snum, conn);
 
@@ -164,7 +166,7 @@ static struct smbcli_state *connect_one(struct event_context *ev,
                                                share, NULL,
                                                servers[snum], 
                                                lp_resolve_context(lp_ctx),
-                                               ev, &options);
+                                               ev, &options, &session_options);
                if (!NT_STATUS_IS_OK(status)) {
                        sleep(2);
                }
index e6c4728f0ddf854aba43b39ff2af1371a6a86f8b..b49b8d256ab164d33d3c3d079d5793870b96c51d 100644 (file)
@@ -138,7 +138,8 @@ static bool try_unlock(struct smbcli_state *c, int fstype,
 return a connection to a server
 *******************************************************/
 static struct smbcli_state *connect_one(char *share, const char **ports,
-                                       struct smb_options *optionsi,
+                                       struct smb_options *options,
+                                       struct smb_options *session_options,
                                        struct event_context *ev)
 {
        struct smbcli_state *c;
@@ -168,7 +169,7 @@ static struct smbcli_state *connect_one(char *share, const char **ports,
        nt_status = smbcli_full_connection(NULL, 
                           &c, myname, server_n, ports, share, NULL,
                           username, lp_workgroup(), password, ev,
-                          options);
+                          options, session_options);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("smbcli_full_connection failed with error %s\n", nt_errstr(nt_status)));
                return NULL;
@@ -185,6 +186,7 @@ static void reconnect(struct smbcli_state *cli[NSERVERS][NCONNECTIONS],
                      int fnum[NSERVERS][NUMFSTYPES][NCONNECTIONS][NFILES],
                      const char **ports,
                      struct smbcli_options *options,
+                     struct smbcli_session_options *session_options,
                      struct event_context *ev,
                      char *share1, char *share2)
 {
@@ -204,7 +206,7 @@ static void reconnect(struct smbcli_state *cli[NSERVERS][NCONNECTIONS],
                        smbcli_ulogoff(cli[server][conn]);
                        talloc_free(cli[server][conn]);
                }
-               cli[server][conn] = connect_one(share[server], ports, options, ev);
+               cli[server][conn] = connect_one(share[server], ports, options, session_options, ev);
                if (!cli[server][conn]) {
                        DEBUG(0,("Failed to connect to %s\n", share[server]));
                        exit(1);
@@ -354,6 +356,7 @@ static void test_locks(char *share1, char *share2,
                        char *nfspath1, char *nfspath2,
                        const char **ports,
                        struct smbcli_options *options,
+                       struct smbcli_session_options *session_options,
                        struct event_context *ev)
 {
        struct smbcli_state *cli[NSERVERS][NCONNECTIONS];
@@ -383,7 +386,7 @@ static void test_locks(char *share1, char *share2,
                recorded[n].needed = true;
        }
 
-       reconnect(cli, nfs, fnum, ports, options, ev, share1, share2);
+       reconnect(cli, nfs, fnum, ports, options, session_options, ev, share1, share2);
        open_files(cli, nfs, fnum);
        n = retest(cli, nfs, fnum, numops);
 
@@ -394,7 +397,7 @@ static void test_locks(char *share1, char *share2,
                n1 = n;
 
                close_files(cli, nfs, fnum);
-               reconnect(cli, nfs, fnum, ports, options, ev, share1, share2);
+               reconnect(cli, nfs, fnum, ports, options, session_options, ev, share1, share2);
                open_files(cli, nfs, fnum);
 
                for (i=0;i<n-1;i++) {
@@ -421,7 +424,7 @@ static void test_locks(char *share1, char *share2,
        }
 
        close_files(cli, nfs, fnum);
-       reconnect(cli, nfs, fnum, ports, options, ev, share1, share2);
+       reconnect(cli, nfs, fnum, ports, options, session_options, ev, share1, share2);
        open_files(cli, nfs, fnum);
        showall = true;
        n1 = retest(cli, nfs, fnum, n);
@@ -469,6 +472,7 @@ static void usage(void)
        extern char *optarg;
        extern int optind;
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
        int opt;
        char *p;
        int seed;
@@ -554,8 +558,9 @@ static void usage(void)
 
        locking_init(1);
        lp_smbcli_options(lp_ctx, &options);
+       lp_smbcli_session_options(lp_ctx, &session_options);
        test_locks(share1, share2, nfspath1, nfspath2, lp_smb_ports(lp_ctx),
-                  &options, ev);
+                  &options, &session_options, ev);
 
        return(0);
 }
index 35e9a57fe82bd1fcb8956bf142cfbfd65e32e3a2..a739a1e1b5b6baa66ba3196e87ab6d15d6f406dc 100644 (file)
@@ -76,7 +76,8 @@ return a connection to a server
 static struct smbcli_state *connect_one(struct resolve_context *resolve_ctx, 
                                        struct event_context *ev,
                                        char *share, const char **ports,
-                                       struct smbcli_options *options)
+                                       struct smbcli_options *options,
+                                       struct smbcli_session_options *session_options)
 {
        struct smbcli_state *c;
        fstring server;
@@ -95,7 +96,7 @@ static struct smbcli_state *connect_one(struct resolve_context *resolve_ctx,
                                        ports,
                                        share, NULL,
                                        cmdline_credentials, resolve_ctx, ev,
-                                       options);
+                                       options, session_options);
 
        if (!NT_STATUS_IS_OK(status)) {
                return NULL;
@@ -296,6 +297,7 @@ static void usage(poptContext pc)
        struct event_context *ev;
        struct loadparm_context *lp_ctx;
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
        poptContext pc;
        int argc_new, i;
        char **argv_new;
@@ -360,9 +362,10 @@ static void usage(poptContext pc)
        gensec_init(lp_ctx);
 
        lp_smbcli_options(lp_ctx, &options);
+       lp_smbcli_session_options(lp_ctx, &session_options);
 
        cli = connect_one(lp_resolve_context(lp_ctx), ev, share, 
-                         lp_smb_ports(lp_ctx), &options);
+                         lp_smb_ports(lp_ctx), &options, &session_options);
        if (!cli) {
                DEBUG(0,("Failed to connect to %s\n", share));
                exit(1);
index fd8d292980aa48c13eaf735440b1c7bfa31e2560..7e964b4d426ed66f83e1c445233855972da93d6d 100644 (file)
@@ -175,10 +175,11 @@ static bool open_connection_no_level2_oplocks(struct torture_context *tctx,
                                              struct smbcli_state **c)
 {
        NTSTATUS status;
-
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
 
        lp_smbcli_options(tctx->lp_ctx, &options);
+       lp_smbcli_session_options(tctx->lp_ctx, &session_options);
 
        options.use_level2_oplocks = false;
 
@@ -188,7 +189,7 @@ 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);
+                                       tctx->ev, &options, &session_options);
        if (!NT_STATUS_IS_OK(status)) {
                printf("Failed to open connection - %s\n", nt_errstr(status));
                return false;
index 6f0ba0d617e62ce2359563005a3a2fb752577527..66ef2ae2dde8e761a7459b7d635a1995dfc3cf42 100644 (file)
@@ -69,8 +69,10 @@ static int fork_tcon_client(struct torture_context *tctx,
        struct timeval end;
        struct timeval now;
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
 
        lp_smbcli_options(tctx->lp_ctx, &options);
+       lp_smbcli_session_options(tctx->lp_ctx, &session_options);
 
        child = fork();
        if (child == -1) {
@@ -100,7 +102,7 @@ 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);
+                               tctx->ev, &options, &session_options);
 
                if (!NT_STATUS_IS_OK(status)) {
                        printf("failed to connect to //%s/%s: %s\n",
index 77da32d5725ab6a08a63d9cc11854c0bda78f14c..ee0c05360fcd47af039a12c65450edc2c04a0044 100644 (file)
@@ -19,6 +19,7 @@ bool torture_rpc_join(struct torture_context *torture)
        struct smbcli_state *cli;
        const char *host = torture_setting_string(torture, "host", NULL);
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
 
        /* Join domain as a member server. */
        tj = torture_join_domain(torture,
@@ -33,13 +34,14 @@ bool torture_rpc_join(struct torture_context *torture)
        }
 
        lp_smbcli_options(torture->lp_ctx, &options);
+       lp_smbcli_session_options(torture->lp_ctx, &session_options);
 
        status = smbcli_full_connection(tj, &cli, host,
                                        lp_smb_ports(torture->lp_ctx),
                                        "IPC$", NULL,
                                        machine_account,
                                        lp_resolve_context(torture->lp_ctx),
-                                       torture->ev, &options);
+                                       torture->ev, &options, &session_options);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
                          TORTURE_NETBIOS_NAME));
@@ -65,7 +67,7 @@ bool torture_rpc_join(struct torture_context *torture)
                                        "IPC$", NULL,
                                        machine_account,
                                        lp_resolve_context(torture->lp_ctx),
-                                       torture->ev, &options);
+                                       torture->ev, &options, &session_options);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
                          TORTURE_NETBIOS_NAME));
index e030b972f857d115857b21d54354f219b91a47d3..260c1cc1499bc6baeb74f19b8c940352e00e0d49 100644 (file)
@@ -91,7 +91,7 @@ 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);
+                                       torture->ev, &options, &session_options);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("smbcli_full_connection failed: %s\n",
                         nt_errstr(status));
@@ -290,6 +290,7 @@ bool torture_bind_samba3(struct torture_context *torture)
        bool ret = false;
        struct smbcli_state *cli;
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
 
        mem_ctx = talloc_init("torture_bind_authcontext");
 
@@ -299,13 +300,14 @@ bool torture_bind_samba3(struct torture_context *torture)
        }
 
        lp_smbcli_options(torture->lp_ctx, &options);
+       lp_smbcli_session_options(torture->lp_ctx, &session_options);
 
        status = smbcli_full_connection(mem_ctx, &cli,
                                        torture_setting_string(torture, "host", NULL),
                                        lp_smb_ports(torture->lp_ctx),
                                        "IPC$", NULL, cmdline_credentials,
                                        lp_resolve_context(torture->lp_ctx),
-                                       torture->ev, &options);
+                                       torture->ev, &options, &session_options);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("smbcli_full_connection failed: %s\n",
                         nt_errstr(status));
@@ -1197,6 +1199,7 @@ bool torture_netlogon_samba3(struct torture_context *torture)
        const char *wks_name;
        int i;
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
 
        wks_name = torture_setting_string(torture, "wksname", NULL);
        if (wks_name == NULL) {
@@ -1216,13 +1219,14 @@ bool torture_netlogon_samba3(struct torture_context *torture)
        }
 
        lp_smbcli_options(torture->lp_ctx, &options);
+       lp_smbcli_session_options(torture->lp_ctx, &session_options);
 
        status = smbcli_full_connection(mem_ctx, &cli,
                                        torture_setting_string(torture, "host", NULL),
                                        lp_smb_ports(torture->lp_ctx),
                                        "IPC$", NULL, anon_creds, 
                                        lp_resolve_context(torture->lp_ctx),
-                                       torture->ev, &options);
+                                       torture->ev, &options, &session_options);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("smbcli_full_connection failed: %s\n",
                         nt_errstr(status));
@@ -1301,15 +1305,17 @@ static bool test_join3(struct torture_context *tctx,
        struct smbcli_state *cli;
        struct cli_credentials *wks_creds;
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
 
        lp_smbcli_options(tctx->lp_ctx, &options);
+       lp_smbcli_session_options(tctx->lp_ctx, &session_options);
 
        status = smbcli_full_connection(tctx, &cli,
                                        torture_setting_string(tctx, "host", NULL),
                                        lp_smb_ports(tctx->lp_ctx),
                                        "IPC$", NULL, smb_creds, 
                                        lp_resolve_context(tctx->lp_ctx),
-                                       tctx->ev, &options);
+                                       tctx->ev, &options, &session_options);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("smbcli_full_connection failed: %s\n",
                         nt_errstr(status));
@@ -1686,7 +1692,7 @@ 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);
+               torture->ev, &options, &session_options);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("(%s) smbcli_full_connection failed: %s\n",
                         __location__, nt_errstr(status));
@@ -1713,7 +1719,7 @@ 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);
+               torture->ev, &options, &session_options);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("(%s) anon smbcli_full_connection failed: %s\n",
                         __location__, nt_errstr(status));
index d7482ddcf1f5e98b035435dedce835ce2b098da1..3bddde2a97ce5a78565e6f3f559d1c14cb77acdd 100644 (file)
@@ -56,15 +56,17 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx)
        const char *host = torture_setting_string(tctx, "host", NULL);
        const char *share = torture_setting_string(tctx, "share", NULL);
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
 
        lp_smbcli_options(tctx->lp_ctx, &options);
+       lp_smbcli_session_options(tctx->lp_ctx, &session_options);
 
        status = smbcli_full_connection(tctx, &cli, host, 
                                        lp_smb_ports(tctx->lp_ctx),
                                        share, NULL,
                                        cmdline_credentials, 
                                        lp_resolve_context(tctx->lp_ctx),
-                                       tctx->ev, &options);
+                                       tctx->ev, &options, &session_options);
 
        if (!NT_STATUS_IS_OK(status)) {
                printf("failed to connect to //%s/%s: %s\n",
index 39d0a12ab1f640cfc9ab5d7919c9d722bc3789b0..d742e23e829de59e1f1ea09e13edb466b6d8874c 100644 (file)
@@ -77,14 +77,16 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx,
        const char *host = torture_setting_string(tctx, "host", NULL);
        const char *share = torture_setting_string(tctx, "share", NULL);
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
 
        lp_smbcli_options(tctx->lp_ctx, &options);
+       lp_smbcli_session_options(tctx->lp_ctx, &session_options);
 
        status = smbcli_full_connection(tctx, &cli, host, 
                                        lp_smb_ports(tctx->lp_ctx),
                                        share, NULL,
                                        creds, lp_resolve_context(tctx->lp_ctx),
-                                       tctx->ev, &options);
+                                       tctx->ev, &options, &session_options);
 
        if (!NT_STATUS_IS_OK(status)) {
                printf("failed to connect to //%s/%s: %s\n",
index 938e7d6c038f9b9af6a6fadd32fdd7990edaa7c0..32e4453acad9ce81f3c9688587df8dad92299efd 100644 (file)
@@ -475,8 +475,10 @@ _PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx,
        NTSTATUS status;
 
        struct smbcli_options options;
+       struct smbcli_session_options session_options;
 
        lp_smbcli_options(tctx->lp_ctx, &options);
+       lp_smbcli_session_options(tctx->lp_ctx, &session_options);
 
        options.use_oplocks = torture_setting_bool(tctx, "use_oplocks", true);
        options.use_level2_oplocks = torture_setting_bool(tctx, "use_level2_oplocks", true);
@@ -486,7 +488,7 @@ _PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx,
                                        sharename, NULL,
                                        cmdline_credentials, 
                                        lp_resolve_context(tctx->lp_ctx),
-                                       ev, &options);
+                                       ev, &options, &session_options);
        if (!NT_STATUS_IS_OK(status)) {
                printf("Failed to open connection - %s\n", nt_errstr(status));
                return false;