The branch, master has been updated
       via  bfc4fe4 s3: Remove unused "retry" from cli_start_connection
       via  d096de5 s3: Remove unused "retry" from cli_full_connection
       via  6601906 s3: Always retry the DC connection in auth_domain
       via  09cccee s3: Remove some unused variables
      from  9dce43a s4-smbtorture: run the winreg tests also against an added 
driver.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit bfc4fe401259085f9e17c75a7ec171be0bc5f35f
Author: Volker Lendecke <v...@samba.org>
Date:   Mon Dec 20 16:43:39 2010 +0100

    s3: Remove unused "retry" from cli_start_connection
    
    Autobuild-User: Volker Lendecke <vlen...@samba.org>
    Autobuild-Date: Mon Dec 20 17:58:33 CET 2010 on sn-devel-104

commit d096de56b16c50c7cc22df08895dc29567ee15d7
Author: Volker Lendecke <v...@samba.org>
Date:   Mon Dec 20 16:37:23 2010 +0100

    s3: Remove unused "retry" from cli_full_connection

commit 660190632e4f8ace65f4944f4686ea42444056c0
Author: Volker Lendecke <v...@samba.org>
Date:   Mon Dec 20 16:22:02 2010 +0100

    s3: Always retry the DC connection in auth_domain
    
    The only condition that cli_full_connection marks as non-retryable is the 
basic
    name lookup and TCP connect. To me this is pretty fishy. For example if the
    negprot fails, this is supposed to be more retryable than a NetBIOS name 
lookup
    failure? I'd rather think the opposite is true.
    
    Jeremy, this is code from 2002, 389a16d9d533. If you have any comments from
    back then, let me know :-)
    
    Volker

commit 09cccee27302044dd2fa3e94c60bf7854c4d2e45
Author: Volker Lendecke <v...@samba.org>
Date:   Mon Dec 20 15:58:55 2010 +0100

    s3: Remove some unused variables

-----------------------------------------------------------------------

Summary of changes:
 libgpo/gpo_fetch.c                  |    2 +-
 source3/auth/auth_domain.c          |   12 ++++--------
 source3/client/smbspool.c           |    2 +-
 source3/include/proto.h             |    6 ++----
 source3/libnet/libnet_join.c        |    6 +++---
 source3/libsmb/cliconnect.c         |   19 ++++---------------
 source3/libsmb/libsmb_server.c      |    2 +-
 source3/libsmb/trusts_util.c        |    5 ++---
 source3/rpc_server/srv_spoolss_nt.c |    2 +-
 source3/rpcclient/cmd_spoolss.c     |    2 +-
 source3/rpcclient/rpcclient.c       |    3 +--
 source3/torture/locktest2.c         |    2 +-
 source3/torture/torture.c           |    8 +++-----
 source3/utils/net_ads.c             |    2 +-
 source3/utils/net_util.c            |    6 +++---
 source3/utils/netlookup.c           |    3 +--
 source3/utils/smbcacls.c            |    3 +--
 source3/utils/smbcquotas.c          |    3 +--
 18 files changed, 32 insertions(+), 56 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libgpo/gpo_fetch.c b/libgpo/gpo_fetch.c
index ad6c2a8..00f9b5c 100644
--- a/libgpo/gpo_fetch.c
+++ b/libgpo/gpo_fetch.c
@@ -150,7 +150,7 @@ static NTSTATUS gpo_connect_server(ADS_STRUCT *ads, struct 
loadparm_context *lp_
                        ads->auth.password,
                        CLI_FULL_CONNECTION_USE_KERBEROS |
                        CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS,
-                       Undefined, NULL);
+                       Undefined);
        if (!NT_STATUS_IS_OK(result)) {
                DEBUG(10,("check_refresh_gpo: "
                                "failed to connect: %s\n",
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index cac482c..0f541cd 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -113,8 +113,7 @@ static NTSTATUS connect_to_domain_password_server(struct 
cli_state **cli,
                                                const char *domain,
                                                const char *dc_name,
                                                struct sockaddr_storage *dc_ss, 
-                                               struct rpc_pipe_client 
**pipe_ret,
-                                               bool *retry)
+                                               struct rpc_pipe_client 
**pipe_ret)
 {
         NTSTATUS result;
        struct rpc_pipe_client *netlogon_pipe = NULL;
@@ -143,9 +142,8 @@ static NTSTATUS connect_to_domain_password_server(struct 
cli_state **cli,
        }
 
        /* Attempt connection */
-       *retry = True;
        result = cli_full_connection(cli, global_myname(), dc_name, dc_ss, 0, 
-               "IPC$", "IPC", "", "", "", 0, Undefined, retry);
+               "IPC$", "IPC", "", "", "", 0, Undefined);
 
        if (!NT_STATUS_IS_OK(result)) {
                /* map to something more useful */
@@ -267,7 +265,6 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
        struct rpc_pipe_client *netlogon_pipe = NULL;
        NTSTATUS nt_status = NT_STATUS_NO_LOGON_SERVERS;
        int i;
-       bool retry = True;
 
        /*
         * At this point, smb_apasswd points to the lanman response to
@@ -279,13 +276,12 @@ static NTSTATUS domain_client_validate(TALLOC_CTX 
*mem_ctx,
 
        /* rety loop for robustness */
 
-       for (i = 0; !NT_STATUS_IS_OK(nt_status) && retry && (i < 3); i++) {
+       for (i = 0; !NT_STATUS_IS_OK(nt_status) && (i < 3); i++) {
                nt_status = connect_to_domain_password_server(&cli,
                                                        domain,
                                                        dc_name,
                                                        dc_ss,
-                                                       &netlogon_pipe,
-                                                       &retry);
+                                                       &netlogon_pipe);
        }
 
        if ( !NT_STATUS_IS_OK(nt_status) ) {
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
index 1dc5487..0804eb5 100644
--- a/source3/client/smbspool.c
+++ b/source3/client/smbspool.c
@@ -401,7 +401,7 @@ smb_complete_connection(const char *myname,
        /* Start the SMB connection */
        *need_auth = false;
        nt_status = cli_start_connection(&cli, myname, server, NULL, port,
-                                        Undefined, flags, NULL);
+                                        Undefined, flags);
        if (!NT_STATUS_IS_OK(nt_status)) {
                fprintf(stderr, "ERROR: Connection failed: %s\n", 
nt_errstr(nt_status));
                return NULL;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 11060aa..dabb315 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1651,8 +1651,7 @@ NTSTATUS cli_start_connection(struct cli_state 
**output_cli,
                              const char *my_name, 
                              const char *dest_host, 
                              struct sockaddr_storage *dest_ss, int port,
-                             int signing_state, int flags,
-                             bool *retry) ;
+                             int signing_state, int flags);
 NTSTATUS cli_full_connection(struct cli_state **output_cli, 
                             const char *my_name, 
                             const char *dest_host, 
@@ -1660,8 +1659,7 @@ NTSTATUS cli_full_connection(struct cli_state 
**output_cli,
                             const char *service, const char *service_type,
                             const char *user, const char *domain, 
                             const char *password, int flags,
-                            int signing_state,
-                            bool *retry) ;
+                            int signing_state);
 bool attempt_netbios_session_request(struct cli_state **ppcli, const char 
*srchost, const char *desthost,
                                      struct sockaddr_storage *pdest_ss);
 NTSTATUS cli_raw_tcon(struct cli_state *cli, 
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 4249451..18986d9 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -697,7 +697,7 @@ static NTSTATUS libnet_join_connect_dc_ipc(const char *dc,
                                   NULL,
                                   pass,
                                   flags,
-                                  Undefined, NULL);
+                                  Undefined);
 }
 
 /****************************************************************
@@ -1111,7 +1111,7 @@ NTSTATUS libnet_join_ok(const char *netbios_domain_name,
                                     NULL,
                                     machine_password,
                                     0,
-                                    Undefined, NULL);
+                                    Undefined);
        free(machine_account);
        free(machine_password);
 
@@ -1124,7 +1124,7 @@ NTSTATUS libnet_join_ok(const char *netbios_domain_name,
                                             NULL,
                                             "",
                                             0,
-                                            Undefined, NULL);
+                                            Undefined);
        }
 
        if (!NT_STATUS_IS_OK(status)) {
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index ec9ff58..25df2b2 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2498,15 +2498,12 @@ NTSTATUS cli_connect(struct cli_state *cli,
    @param dest_host The netbios name of the remote host
    @param dest_ss (optional) The the destination IP, NULL for name based lookup
    @param port (optional) The destination port (0 for default)
-   @param retry bool. Did this connection fail with a retryable error ?
-
 */
 NTSTATUS cli_start_connection(struct cli_state **output_cli, 
                              const char *my_name, 
                              const char *dest_host, 
                              struct sockaddr_storage *dest_ss, int port,
-                             int signing_state, int flags,
-                             bool *retry) 
+                             int signing_state, int flags)
 {
        NTSTATUS nt_status;
        struct nmb_name calling;
@@ -2514,9 +2511,6 @@ NTSTATUS cli_start_connection(struct cli_state 
**output_cli,
        struct cli_state *cli;
        struct sockaddr_storage ss;
 
-       if (retry)
-               *retry = False;
-
        if (!my_name) 
                my_name = global_myname();
 
@@ -2550,9 +2544,6 @@ again:
                return nt_status;
        }
 
-       if (retry)
-               *retry = True;
-
        if (!cli_session_request(cli, &calling, &called)) {
                char *p;
                DEBUG(1,("session request to %s failed (%s)\n",
@@ -2604,7 +2595,6 @@ again:
    @param user Username, unix string
    @param domain User's domain
    @param password User's password, unencrypted unix string.
-   @param retry bool. Did this connection fail with a retryable error ?
 */
 
 NTSTATUS cli_full_connection(struct cli_state **output_cli, 
@@ -2614,8 +2604,7 @@ NTSTATUS cli_full_connection(struct cli_state 
**output_cli,
                             const char *service, const char *service_type,
                             const char *user, const char *domain, 
                             const char *password, int flags,
-                            int signing_state,
-                            bool *retry) 
+                            int signing_state)
 {
        NTSTATUS nt_status;
        struct cli_state *cli = NULL;
@@ -2629,7 +2618,7 @@ NTSTATUS cli_full_connection(struct cli_state 
**output_cli,
 
        nt_status = cli_start_connection(&cli, my_name, dest_host,
                                         dest_ss, port, signing_state,
-                                        flags, retry);
+                                        flags);
 
        if (!NT_STATUS_IS_OK(nt_status)) {
                return nt_status;
@@ -2810,7 +2799,7 @@ struct cli_state *get_ipc_connect(char *server,
                                        lp_workgroup(),
                                        user_info->password ? 
user_info->password : "",
                                        flags,
-                                       Undefined, NULL);
+                                       Undefined);
 
        if (NT_STATUS_IS_OK(nt_status)) {
                return cli;
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index 369e037..4284802 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -777,7 +777,7 @@ SMBC_attr_server(TALLOC_CTX *ctx,
                                                *pp_workgroup,
                                                *pp_password,
                                                flags,
-                                               Undefined, NULL);
+                                               Undefined);
                 if (! NT_STATUS_IS_OK(nt_status)) {
                         DEBUG(1,("cli_full_connection failed! (%s)\n",
                                  nt_errstr(nt_status)));
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index e122937..c7db679 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -148,7 +148,6 @@ bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const 
char *domain,
        uint32          enum_ctx = 0;
        struct cli_state *cli = NULL;
        struct rpc_pipe_client *lsa_pipe = NULL;
-       bool            retry;
        struct lsa_DomainList dom_list;
        int i;
 
@@ -167,7 +166,7 @@ bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const 
char *domain,
        /* setup the anonymous connection */
 
        result = cli_full_connection( &cli, global_myname(), dc_name, &dc_ss, 
0, "IPC$", "IPC",
-               "", "", "", 0, Undefined, &retry);
+               "", "", "", 0, Undefined);
        if ( !NT_STATUS_IS_OK(result) )
                goto done;
 
@@ -258,7 +257,7 @@ NTSTATUS change_trust_account_password( const char *domain, 
const char *remote_m
                                           NULL, 0,
                                           "IPC$", "IPC",
                                           "", "",
-                                          "", 0, Undefined, NULL))) {
+                                          "", 0, Undefined))) {
                DEBUG(0,("modify_trust_password: Connection to %s failed!\n", 
dc_name));
                nt_status = NT_STATUS_UNSUCCESSFUL;
                goto failed;
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 65314df..6f28ece 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -2504,7 +2504,7 @@ static bool spoolss_connect_to_client(struct 
rpc_pipe_client **pp_pipe,
                "", /* username */
                "", /* domain */
                "", /* password */
-               0, lp_client_signing(), NULL );
+               0, lp_client_signing());
 
        if ( !NT_STATUS_IS_OK( ret ) ) {
                DEBUG(2,("spoolss_connect_to_client: connection to [%s] 
failed!\n",
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 1bb3a71..50f1209 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -3313,7 +3313,7 @@ static WERROR cmd_spoolss_printercmp(struct 
rpc_pipe_client *cli,
                                        lp_workgroup(),
                                        
get_cmdline_auth_info_password(rpcclient_auth_info),
                                        
get_cmdline_auth_info_use_kerberos(rpcclient_auth_info) ? 
CLI_FULL_CONNECTION_USE_KERBEROS : 0,
-                                       
get_cmdline_auth_info_signing_state(rpcclient_auth_info), NULL);
+                                       
get_cmdline_auth_info_signing_state(rpcclient_auth_info));
 
        if ( !NT_STATUS_IS_OK(nt_status) )
                return WERR_GENERAL_FAILURE;
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 707889a..cd77a94 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -1088,8 +1088,7 @@ out_free:
                                        
get_cmdline_auth_info_domain(rpcclient_auth_info),
                                        
get_cmdline_auth_info_password(rpcclient_auth_info),
                                        flags,
-                                       
get_cmdline_auth_info_signing_state(rpcclient_auth_info),
-                                       NULL);
+                                       
get_cmdline_auth_info_signing_state(rpcclient_auth_info));
 
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("Cannot connect to server.  Error was %s\n", 
nt_errstr(nt_status)));
diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c
index 033fe12..782427b 100644
--- a/source3/torture/locktest2.c
+++ b/source3/torture/locktest2.c
@@ -190,7 +190,7 @@ static struct cli_state *connect_one(char *share)
 
        nt_status = cli_full_connection(&c, myname, server_n, NULL, 0, share, 
"?????", 
                                        username, lp_workgroup(), password, 0,
-                                       Undefined, NULL);
+                                       Undefined);
 
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("cli_full_connection failed with error %s\n", 
nt_errstr(nt_status)));
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 7821f0e..f1f2e99 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -398,7 +398,6 @@ static bool torture_open_connection_share(struct cli_state 
**c,
                                   const char *hostname, 
                                   const char *sharename)
 {
-       bool retry;
        int flags = 0;
        NTSTATUS status;
 
@@ -413,7 +412,7 @@ static bool torture_open_connection_share(struct cli_state 
**c,
                                     hostname, NULL, port_to_use, 
                                     sharename, "?????", 
                                     username, workgroup, 
-                                    password, flags, signing_state, &retry);
+                                    password, flags, signing_state);
        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));
@@ -1454,7 +1453,6 @@ static bool tcon_devtest(struct cli_state *cli,
 static bool run_tcon_devtype_test(int dummy)
 {
        static struct cli_state *cli1 = NULL;
-       bool retry;
        int flags = 0;
        NTSTATUS status;
        bool ret = True;
@@ -1463,7 +1461,7 @@ static bool run_tcon_devtype_test(int dummy)
                                     host, NULL, port_to_use,
                                     NULL, NULL,
                                     username, workgroup,
-                                    password, flags, signing_state, &retry);
+                                    password, flags, signing_state);
 
        if (!NT_STATUS_IS_OK(status)) {
                printf("could not open connection\n");
@@ -5675,7 +5673,7 @@ static bool run_chain2(int dummy)
 
        printf("starting chain2 test\n");
        status = cli_start_connection(&cli1, global_myname(), host, NULL,
-                                     port_to_use, Undefined, 0, NULL);
+                                     port_to_use, Undefined, 0);
        if (!NT_STATUS_IS_OK(status)) {
                return False;
        }
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index daf2602..ec5ecab 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1810,7 +1810,7 @@ static int net_ads_printer_publish(struct net_context *c, 
int argc, const char *
                                        c->opt_user_name, c->opt_workgroup,
                                        c->opt_password ? c->opt_password : "",
                                        CLI_FULL_CONNECTION_USE_KERBEROS,
-                                       Undefined, NULL);
+                                       Undefined);
 
        if (NT_STATUS_IS_ERR(nt_status)) {
                d_fprintf(stderr, _("Unable to open a connnection to %s to "
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index 6badf94..2f031c4 100644
--- a/source3/utils/net_util.c
+++ b/source3/utils/net_util.c
@@ -120,7 +120,7 @@ NTSTATUS connect_to_service(struct net_context *c,
                                        server_ss, c->opt_port,
                                        service_name, service_type,
                                        c->opt_user_name, c->opt_workgroup,
-                                       c->opt_password, flags, Undefined, 
NULL);
+                                       c->opt_password, flags, Undefined);
        if (!NT_STATUS_IS_OK(nt_status)) {
                d_fprintf(stderr, _("Could not connect to server %s\n"),
                          server_name);
@@ -204,7 +204,7 @@ NTSTATUS connect_to_ipc_anonymous(struct net_context *c,
                                        server_name, server_ss, c->opt_port,
                                        "IPC$", "IPC",
                                        "", "",
-                                       "", 0, Undefined, NULL);
+                                       "", 0, Undefined);
 
        if (NT_STATUS_IS_OK(nt_status)) {
                return nt_status;
@@ -264,7 +264,7 @@ NTSTATUS connect_to_ipc_krb5(struct net_context *c,
                                        user_and_realm, c->opt_workgroup,
                                        c->opt_password,
                                        CLI_FULL_CONNECTION_USE_KERBEROS,
-                                       Undefined, NULL);
+                                       Undefined);
 
        SAFE_FREE(user_and_realm);
 
diff --git a/source3/utils/netlookup.c b/source3/utils/netlookup.c
index ef254be..fa63131 100644
--- a/source3/utils/netlookup.c
+++ b/source3/utils/netlookup.c
@@ -109,8 +109,7 @@ static struct con_struct *create_cs(struct net_context *c,
                                        "",
 #endif
                                        0,
-                                       Undefined,
-                                       NULL);
+                                       Undefined);
 
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(2,("create_cs: Connect failed. Error was %s\n", 
nt_errstr(nt_status)));
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 9f740f7..2800ed9 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -1137,8 +1137,7 @@ static struct cli_state *connect_one(struct 
user_auth_info *auth_info,
                                lp_workgroup(),
                                get_cmdline_auth_info_password(auth_info),
                                flags,
-                               get_cmdline_auth_info_signing_state(auth_info),
-                               NULL);
+                               get_cmdline_auth_info_signing_state(auth_info));
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("cli_full_connection failed! (%s)\n", 
nt_errstr(nt_status)));
                return NULL;
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index 63ea269..522af17 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -404,8 +404,7 @@ static struct cli_state *connect_one(const char *share)
                                            lp_workgroup(),
                                            
get_cmdline_auth_info_password(smbcquotas_auth_info),
                                            flags,
-                                           
get_cmdline_auth_info_signing_state(smbcquotas_auth_info),
-                                           NULL);
+                                           
get_cmdline_auth_info_signing_state(smbcquotas_auth_info));
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("cli_full_connection failed! (%s)\n", 
nt_errstr(nt_status)));
                return NULL;


-- 
Samba Shared Repository

Reply via email to