]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libsmb: Remove force_encrypt from cli_cm_open()
authorAndreas Schneider <asn@samba.org>
Thu, 27 Aug 2020 13:24:27 +0000 (15:24 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 9 Oct 2020 19:16:45 +0000 (19:16 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/client/client.c
source3/lib/netapi/cm.c
source3/libsmb/clidfs.c
source3/libsmb/proto.h

index a68a4663491de4f329e1e4ff9b99343eb38f0591..d5d5e157b29d2b041bbd3a6fb31f1e2a010f9b01 100644 (file)
@@ -5545,9 +5545,6 @@ static int process_command_string(const char *cmd_in)
        TALLOC_CTX *ctx = talloc_tos();
        char *cmd = talloc_strdup(ctx, cmd_in);
        int rc = 0;
-       bool smb_encrypt =
-               get_cmdline_auth_info_smb_encrypt(
-                               popt_get_cmdline_auth_info());
 
        if (!cmd) {
                return 1;
@@ -5560,7 +5557,6 @@ static int process_command_string(const char *cmd_in)
                status = cli_cm_open(talloc_tos(), NULL,
                                     desthost,
                                     service, popt_get_cmdline_auth_info(),
-                                    smb_encrypt,
                                     max_protocol,
                                     have_ip ? &dest_ss : NULL, port,
                                     name_type,
@@ -6001,14 +5997,11 @@ static int process(const char *base_directory)
 {
        int rc = 0;
        NTSTATUS status;
-       bool smb_encrypt =
-               get_cmdline_auth_info_smb_encrypt(
-                               popt_get_cmdline_auth_info());
 
        status = cli_cm_open(talloc_tos(), NULL,
                             desthost,
                             service, popt_get_cmdline_auth_info(),
-                            smb_encrypt, max_protocol,
+                            max_protocol,
                             have_ip ? &dest_ss : NULL, port,
                             name_type, &cli);
        if (!NT_STATUS_IS_OK(status)) {
@@ -6042,14 +6035,11 @@ static int process(const char *base_directory)
 static int do_host_query(const char *query_host)
 {
        NTSTATUS status;
-       bool smb_encrypt =
-               get_cmdline_auth_info_smb_encrypt(
-                               popt_get_cmdline_auth_info());
 
        status = cli_cm_open(talloc_tos(), NULL,
                             query_host,
                             "IPC$", popt_get_cmdline_auth_info(),
-                            smb_encrypt, max_protocol,
+                            max_protocol,
                             have_ip ? &dest_ss : NULL, port,
                             name_type, &cli);
        if (!NT_STATUS_IS_OK(status)) {
@@ -6096,7 +6086,7 @@ static int do_host_query(const char *query_host)
                status = cli_cm_open(talloc_tos(), NULL,
                                     query_host,
                                     "IPC$", popt_get_cmdline_auth_info(),
-                                    smb_encrypt, max_proto,
+                                    max_proto,
                                     have_ip ? &dest_ss : NULL, NBT_SMB_PORT,
                                     name_type, &cli);
                if (!NT_STATUS_IS_OK(status)) {
@@ -6122,9 +6112,6 @@ static int do_tar_op(const char *base_directory)
 {
        struct tar *tar_ctx = tar_get_ctx();
        int ret = 0;
-       bool smb_encrypt =
-               get_cmdline_auth_info_smb_encrypt(
-                               popt_get_cmdline_auth_info());
 
        /* do we already have a connection? */
        if (!cli) {
@@ -6133,7 +6120,7 @@ static int do_tar_op(const char *base_directory)
                status = cli_cm_open(talloc_tos(), NULL,
                                     desthost,
                                     service, popt_get_cmdline_auth_info(),
-                                    smb_encrypt, max_protocol,
+                                    max_protocol,
                                     have_ip ? &dest_ss : NULL, port,
                                     name_type, &cli);
                if (!NT_STATUS_IS_OK(status)) {
index 1b8f2a4e97aed22e1f7ddd50a1821b966f3bd17e..0fd31ef3d5a3adf1a4c9eab777423f27d4dbb3ca 100644 (file)
@@ -110,7 +110,6 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx,
        status = cli_cm_open(ctx, NULL,
                             server_name, "IPC$",
                             auth_info,
-                            false,
                             lp_client_ipc_max_protocol(),
                             NULL, 0, 0x20, &cli_ipc);
        if (!NT_STATUS_IS_OK(status)) {
index aff998f61874316075f4136c67afa5c3546b0484..4825b8f3fae33bf118c32e97a803df46b9a2c36f 100644 (file)
@@ -383,7 +383,6 @@ NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
                                const char *server,
                                const char *share,
                                const struct user_auth_info *auth_info,
-                               bool force_encrypt,
                                int max_protocol,
                                const struct sockaddr_storage *dest_ss,
                                int port,
@@ -393,6 +392,8 @@ NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
        /* Try to reuse an existing connection in this list. */
        struct cli_state *c = cli_cm_find(referring_cli, server, share);
        NTSTATUS status;
+       bool force_encrypt =
+               get_cmdline_auth_info_smb_encrypt(auth_info);
 
        if (c) {
                *pcli = c;
@@ -962,7 +963,6 @@ NTSTATUS cli_resolve_path(TALLOC_CTX *ctx,
                             smbXcli_conn_remote_name(rootcli->conn),
                             "IPC$",
                             dfs_auth_info,
-                            cli_state_is_encryption_on(rootcli),
                             smbXcli_conn_protocol(rootcli->conn),
                             NULL, /* dest_ss not needed, we reuse the transport */
                             0,
index cb42df88426094b2659cd5bb3db5ee4a0c6c000c..360a39b9a540b05d66cd240a57014196e5b67bfe 100644 (file)
@@ -128,7 +128,6 @@ NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
                                const char *server,
                                const char *share,
                                const struct user_auth_info *auth_info,
-                               bool force_encrypt,
                                int max_protocol,
                                const struct sockaddr_storage *dest_ss,
                                int port,