Remove use of global_loadparm for SMB2 client connections.
[samba.git] / source4 / client / cifsdd.c
index 3e0ab7af78263820b3d8872df3700ebccc0b9571..8d0b87d722b3296382710fad91c209b82027314d 100644 (file)
@@ -360,7 +360,8 @@ static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx,
                                      struct smbcli_options *smb_options,
                                      const char *socket_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)
 {
        int                     options = 0;
        const char *            path = NULL;
@@ -384,7 +385,8 @@ static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx,
                                      check_arg_numeric("ibs"), options,
                                      socket_options,
                                      smb_options, smb_session_options,
-                                     iconv_convenience);
+                                     iconv_convenience,
+                                     gensec_settings);
        } else if (strcmp(which, "of") == 0) {
                options |= DD_WRITE;
                path = check_arg_pathname("of");
@@ -392,7 +394,8 @@ static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx,
                                      check_arg_numeric("obs"), options,
                                      socket_options,
                                      smb_options, smb_session_options,
-                                     iconv_convenience);
+                                     iconv_convenience,
+                                     gensec_settings);
        } else {
                SMB_ASSERT(0);
                return(NULL);
@@ -447,7 +450,8 @@ 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,
                                lp_socket_options(lp_ctx),
-                               &session_options, lp_iconv_convenience(lp_ctx)))) {
+                               &session_options, lp_iconv_convenience(lp_ctx),
+                               lp_gensec_settings(lp_ctx, lp_ctx)))) {
                return(FILESYS_EXIT_CODE);
        }
 
@@ -455,7 +459,8 @@ static int copy_files(struct event_context *ev, struct loadparm_context *lp_ctx)
                                lp_smb_ports(lp_ctx), &options,
                                lp_socket_options(lp_ctx),
                                &session_options,
-                               lp_iconv_convenience(lp_ctx)))) {
+                               lp_iconv_convenience(lp_ctx),
+                               lp_gensec_settings(lp_ctx, lp_ctx)))) {
                return(FILESYS_EXIT_CODE);
        }