]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libsmb: Remove signing_state from cli_full_connection_creds()
authorAndreas Schneider <asn@samba.org>
Thu, 4 Jun 2020 12:59:14 +0000 (14:59 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 19 Aug 2020 16:22:42 +0000 (16:22 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
17 files changed:
examples/fuse/smb2mount.c
examples/winexe/winexe.c
source3/libnet/libnet_join.c
source3/libsmb/cliconnect.c
source3/libsmb/libsmb_server.c
source3/libsmb/proto.h
source3/rpc_server/spoolss/srv_spoolss_nt.c
source3/rpcclient/cmd_spoolss.c
source3/rpcclient/rpcclient.c
source3/torture/locktest2.c
source3/torture/torture.c
source3/utils/mdfind.c
source3/utils/net_ads.c
source3/utils/net_util.c
source3/utils/netlookup.c
source3/utils/smbcacls.c
source3/utils/smbcquotas.c

index ea1d9a11e0b00c83b6536549561907b84acc2f04..6206c3a9701dc616679b4349b3c851b4f7ff4da7 100644 (file)
@@ -37,8 +37,7 @@ static struct cli_state *connect_one(const struct user_auth_info *auth_info,
                                NULL, port,
                                share, "?????",
                                get_cmdline_auth_info_creds(auth_info),
-                               flags,
-                               get_cmdline_auth_info_signing_state(auth_info));
+                               flags);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DBG_ERR("cli_full_connection failed! (%s)\n",
                        nt_errstr(nt_status));
index bb9c27e2e6dcb266c2411bd40c0f80a4cbf3e8de..03e7ec85198de0b3cb9d4b8f3b12a4676bd22e64 100644 (file)
@@ -360,7 +360,6 @@ static NTSTATUS winexe_svc_upload(
                "ADMIN$",
                "?????",
                credentials,
-               0,
                0);
        if (!NT_STATUS_IS_OK(status)) {
                DBG_WARNING("cli_full_connection_creds failed: %s\n",
@@ -1919,8 +1918,7 @@ int main(int argc, const char *argv[])
                "IPC$",
                "?????",
                options.credentials,
-               CLI_FULL_CONNECTION_IPC,
-               0);
+               CLI_FULL_CONNECTION_IPC);
 
        if (!NT_STATUS_IS_OK(status)) {
                DBG_WARNING("cli_full_connection_creds failed: %s\n",
index 392e3eff74f295de9791202b7db51d5eb5dd7e39..f3bf27e6c003d91f1347cd56c87e0e3fe80e7f19 100644 (file)
@@ -1095,8 +1095,7 @@ static NTSTATUS libnet_join_connect_dc_ipc(const char *dc,
                                           NULL, 0,
                                           "IPC$", "IPC",
                                           creds,
-                                          flags,
-                                          SMB_SIGNING_IPC_DEFAULT);
+                                          flags);
        if (!NT_STATUS_IS_OK(status)) {
                TALLOC_FREE(frame);
                return status;
@@ -1716,8 +1715,7 @@ NTSTATUS libnet_join_ok(struct messaging_context *msg_ctx,
                                           NULL, 0,
                                           "IPC$", "IPC",
                                           cli_creds,
-                                          flags,
-                                          SMB_SIGNING_IPC_DEFAULT);
+                                          flags);
 
        if (!NT_STATUS_IS_OK(status)) {
                struct cli_credentials *anon_creds = NULL;
@@ -1734,8 +1732,7 @@ NTSTATUS libnet_join_ok(struct messaging_context *msg_ctx,
                                                   NULL, 0,
                                                   "IPC$", "IPC",
                                                   anon_creds,
-                                                  flags,
-                                                  SMB_SIGNING_OFF);
+                                                  flags);
        }
 
        if (!NT_STATUS_IS_OK(status)) {
index 0ff9c283e399d8b88f4d8b7fb8c735344f2fd332..b24743d789bd05e79c99f451b4dfb4326974fdbe 100644 (file)
@@ -3526,8 +3526,7 @@ NTSTATUS cli_full_connection_creds(struct cli_state **output_cli,
                                   const struct sockaddr_storage *dest_ss, int port,
                                   const char *service, const char *service_type,
                                   struct cli_credentials *creds,
-                                  int flags,
-                                  enum smb_signing_setting signing_state)
+                                  int flags)
 {
        struct tevent_context *ev;
        struct tevent_req *req;
@@ -3684,8 +3683,7 @@ struct cli_state *get_ipc_connect(char *server,
 
        nt_status = cli_full_connection_creds(&cli, NULL, server, server_ss, 0, "IPC$", "IPC",
                                        get_cmdline_auth_info_creds(user_info),
-                                       flags,
-                                       SMB_SIGNING_DEFAULT);
+                                       flags);
 
        if (NT_STATUS_IS_OK(nt_status)) {
                return cli;
index 3d1cd602f6c052c7d0c82e3a99b2548137602f59..33dc8419debd22eb7e86cee35639ac1d206d187e 100644 (file)
@@ -785,7 +785,6 @@ SMBC_attr_server(TALLOC_CTX *ctx,
                                    pp_workgroup, pp_username, pp_password);
         if (!ipc_srv) {
                struct cli_credentials *creds = NULL;
-               int signing_state = SMB_SIGNING_DEFAULT;
 
                 /* We didn't find a cached connection.  Get the password */
                if (!*pp_password || (*pp_password)[0] == '\0') {
@@ -812,16 +811,11 @@ SMBC_attr_server(TALLOC_CTX *ctx,
                        return NULL;
                }
 
-               if (context->internal->smb_encryption_level != SMBC_ENCRYPTLEVEL_NONE) {
-                       signing_state = SMB_SIGNING_REQUIRED;
-               }
-
                nt_status = cli_full_connection_creds(&ipc_cli,
                                                lp_netbios_name(), server,
                                                NULL, 0, "IPC$", "?????",
                                                creds,
-                                               flags,
-                                               signing_state);
+                                               flags);
                 if (! NT_STATUS_IS_OK(nt_status)) {
                        TALLOC_FREE(creds);
                         DEBUG(1,("cli_full_connection failed! (%s)\n",
index bef04d32638fcd42b24d370c9da9e17f211aedd2..850cf12c8a6cc51b624779bbcfd9f0e1d36353cd 100644 (file)
@@ -109,8 +109,7 @@ NTSTATUS cli_full_connection_creds(struct cli_state **output_cli,
                                   const struct sockaddr_storage *dest_ss, int port,
                                   const char *service, const char *service_type,
                                   struct cli_credentials *creds,
-                                  int flags,
-                                  enum smb_signing_setting signing_state);
+                                  int flags);
 NTSTATUS cli_raw_tcon(struct cli_state *cli,
                      const char *service, const char *pass, const char *dev,
                      uint16_t *max_xmit, uint16_t *tid);
index 16e3ee485f0d19431ee5728a46a30e81afe05cf1..e98401a4365a24d6c2b18ebd59cdda95cae6c965 100644 (file)
@@ -2482,8 +2482,7 @@ static bool spoolss_connect_to_client(struct rpc_pipe_client **pp_pipe, struct c
        ret = cli_full_connection_creds( pp_cli, lp_netbios_name(), remote_machine,
                &rm_addr, 0, "IPC$", "IPC",
                anon_creds,
-               CLI_FULL_CONNECTION_IPC,
-               SMB_SIGNING_OFF);
+               CLI_FULL_CONNECTION_IPC);
        TALLOC_FREE(anon_creds);
        if ( !NT_STATUS_IS_OK( ret ) ) {
                DEBUG(2,("spoolss_connect_to_client: connection to [%s] failed!\n",
index 3de126f54cddd590dcd33fd2835dbeba20d29127..85062541da222b8236ccf8e70d49f140c40d6760 100644 (file)
@@ -3538,10 +3538,7 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
                                "IPC$", "IPC",
                                get_cmdline_auth_info_creds(
                                        popt_get_cmdline_auth_info()),
-                               CLI_FULL_CONNECTION_IPC,
-                               get_cmdline_auth_info_signing_state(
-                                       popt_get_cmdline_auth_info()));
-
+                               CLI_FULL_CONNECTION_IPC);
        if ( !NT_STATUS_IS_OK(nt_status) )
                return WERR_GEN_FAILURE;
 
index c86474d08f1801ee1d4d1d4c7c43279db554ba74..2ead6cc7ba52118c0a7e6d974915473010f36400 100644 (file)
@@ -1206,8 +1206,7 @@ out_free:
                                        "IPC$", "IPC",
                                        get_cmdline_auth_info_creds(
                                                popt_get_cmdline_auth_info()),
-                                       flags,
-                                       SMB_SIGNING_IPC_DEFAULT);
+                                       flags);
 
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("Cannot connect to server.  Error was %s\n", nt_errstr(nt_status)));
index 84c335f959f8d609cad30bc27fde76ac2c89d728..92ddb7629b9ec77ef982d3bf9713fe3e69612c9c 100644 (file)
@@ -217,8 +217,15 @@ static struct cli_state *connect_one(char *share)
 
        slprintf(myname,sizeof(myname), "lock-%lu-%u", (unsigned long)getpid(), count++);
 
-       nt_status = cli_full_connection_creds(&c, myname, server_n, NULL, 0, share, "?????",
-                                             creds, 0, SMB_SIGNING_DEFAULT);
+       nt_status = cli_full_connection_creds(&c,
+                                             myname,
+                                             server_n,
+                                             NULL,
+                                             0,
+                                             share,
+                                             "?????",
+                                             creds,
+                                             0);
        TALLOC_FREE(creds);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("cli_full_connection failed with error %s\n", nt_errstr(nt_status)));
index 2a3133373e95ceabd495e4a1cb47e0fa5285f0a0..a4edeefd62884510c46c8334aaa0f026cf87eb94 100644 (file)
@@ -345,8 +345,7 @@ static bool torture_open_connection_share(struct cli_state **c,
                                           sharename,
                                           "?????",
                                           torture_creds,
-                                          flags,
-                                          signing_state);
+                                          flags);
        if (!NT_STATUS_IS_OK(status)) {
                printf("failed to open share connection: //%s/%s port:%d - %s\n",
                        hostname, sharename, port_to_use, nt_errstr(status));
@@ -1523,8 +1522,7 @@ static bool run_tcon_devtype_test(int dummy)
                                           NULL, /* service */
                                           NULL, /* service_type */
                                           torture_creds,
-                                          flags,
-                                          signing_state);
+                                          flags);
 
        if (!NT_STATUS_IS_OK(status)) {
                printf("could not open connection\n");
index a3c879e75fb263686d7ed1c45dad3cf604405850..2ac4fde7daf3153eb4effec9533879ff9c306dc6 100644 (file)
@@ -153,8 +153,7 @@ int main(int argc, char **argv)
                                           "IPC$",
                                           "IPC",
                                           creds,
-                                          flags,
-                                          SMB_SIGNING_IPC_DEFAULT);
+                                          flags);
        if (!NT_STATUS_IS_OK(status)) {
                DBG_ERR("Cannot connect to server: %s\n", nt_errstr(status));
                goto fail;
index ce4810e3e649672da21746003b40f5cee3ea7922..b615095c7e1c7efec24ace9bc94ec66f00053f6d 100644 (file)
@@ -2520,8 +2520,7 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char *
                                        &server_ss, 0,
                                        "IPC$", "IPC",
                                        creds,
-                                       CLI_FULL_CONNECTION_IPC,
-                                       SMB_SIGNING_IPC_DEFAULT);
+                                       CLI_FULL_CONNECTION_IPC);
 
        if (NT_STATUS_IS_ERR(nt_status)) {
                d_fprintf(stderr, _("Unable to open a connection to %s to "
index d01b2d8c7717e77be3949ecd9187866bbb21926b..b139fb2d0da42e2091cd1214ad308405535473a7 100644 (file)
@@ -108,7 +108,6 @@ NTSTATUS connect_to_service(struct net_context *c,
                            const char *service_type)
 {
        NTSTATUS nt_status;
-       enum smb_signing_setting signing_setting = SMB_SIGNING_DEFAULT;
        struct cli_credentials *creds = NULL;
        int flags = 0;
 
@@ -119,7 +118,6 @@ NTSTATUS connect_to_service(struct net_context *c,
        }
 
        if (strequal(service_type, "IPC")) {
-               signing_setting = SMB_SIGNING_IPC_DEFAULT;
                flags |= CLI_FULL_CONNECTION_IPC;
        }
 
@@ -127,8 +125,7 @@ NTSTATUS connect_to_service(struct net_context *c,
                                        server_ss, c->opt_port,
                                        service_name, service_type,
                                        creds,
-                                       flags,
-                                       signing_setting);
+                                       flags);
        if (!NT_STATUS_IS_OK(nt_status)) {
                d_fprintf(stderr, _("Could not connect to server %s\n"),
                          server_name);
@@ -199,8 +196,7 @@ NTSTATUS connect_to_ipc_anonymous(struct net_context *c,
                                        server_name, server_ss, c->opt_port,
                                        "IPC$", "IPC",
                                        anon_creds,
-                                       CLI_FULL_CONNECTION_IPC,
-                                       SMB_SIGNING_OFF);
+                                       CLI_FULL_CONNECTION_IPC);
 
        if (NT_STATUS_IS_OK(nt_status)) {
                return nt_status;
index 2241beb331f138fcbf7406e923dc616627f56df0..aaf78b0977aff562c8c029770d5fba63167b9fbf 100644 (file)
@@ -99,8 +99,7 @@ static struct con_struct *create_cs(struct net_context *c,
                                        &loopback_ss, 0,
                                        "IPC$", "IPC",
                                        anon_creds,
-                                       CLI_FULL_CONNECTION_IPC,
-                                       SMB_SIGNING_OFF);
+                                       CLI_FULL_CONNECTION_IPC);
 
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(2,("create_cs: Connect failed. Error was %s\n", nt_errstr(nt_status)));
index f3209c31877efd3f6ca33aee16777817d31005d6..5983ebbd0a5bb8a4f96a5906a81fa1e6dcbe4187 100644 (file)
@@ -778,8 +778,7 @@ static struct cli_state *connect_one(const struct user_auth_info *auth_info,
                                NULL, 0,
                                share, "?????",
                                get_cmdline_auth_info_creds(auth_info),
-                               flags,
-                               get_cmdline_auth_info_signing_state(auth_info));
+                               flags);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("cli_full_connection failed! (%s)\n", nt_errstr(nt_status)));
                return NULL;
index 954d6eba804304a9becb6283b5c150d1e526c964..fea066ce468db941e1cd014b935d838cffb8f3ba 100644 (file)
@@ -527,9 +527,7 @@ static struct cli_state *connect_one(const char *share)
                                            share, "?????",
                                            get_cmdline_auth_info_creds(
                                                popt_get_cmdline_auth_info()),
-                                           flags,
-                                           get_cmdline_auth_info_signing_state(
-                                               popt_get_cmdline_auth_info()));
+                                           flags);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("cli_full_connection failed! (%s)\n", nt_errstr(nt_status)));
                return NULL;