Ignore:
Timestamp:
Jun 16, 2009, 5:52:30 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 to 3.2.12

Location:
branches/samba-3.2.x/source/utils
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/utils/net.c

    r228 r272  
    7373int opt_flags = -1;
    7474int opt_timeout = 0;
     75int opt_request_timeout = 0;
    7576const char *opt_target_workgroup = NULL;
    7677int opt_machine_pass = 0;
     
    572573                          nt_errstr(nt_status));
    573574                cli = NULL;
     575        } else if (opt_request_timeout) {
     576                cli_set_timeout(cli, opt_request_timeout * 1000);
    574577        }
    575578
     
    10431046                {"stdin",       'i', POPT_ARG_NONE,   &opt_stdin},
    10441047                {"timeout",     't', POPT_ARG_INT,    &opt_timeout},
     1048                {"request-timeout",0,POPT_ARG_INT,    &opt_request_timeout},
    10451049                {"machine-pass",'P', POPT_ARG_NONE,   &opt_machine_pass},
    10461050                {"myworkgroup", 'W', POPT_ARG_STRING, &opt_workgroup},
  • branches/samba-3.2.x/source/utils/net.h

    r138 r272  
    101101extern int opt_machine_pass;
    102102extern int opt_timeout;
     103extern int opt_request_timeout;
    103104extern const char *opt_host;
    104105extern const char *opt_user_name;
  • branches/samba-3.2.x/source/utils/net_help.c

    r138 r272  
    4949        d_printf("\t-V or --version\t\t\tPrint samba version information\n");
    5050        d_printf("\t-P or --machine-pass\t\tAuthenticate as machine account\n");
    51         d_printf("\t-e or --encrypt\t\tEncrypt SMB transport (UNIX extended servers only)\n");
     51        d_printf("\t-e or --encrypt\t\t\tEncrypt SMB transport (UNIX extended servers only)\n");
     52        d_printf("\t--request-timeout\t\tThe timeout for smb and rpc requests in seconds\n");
    5253        return -1;
    5354}
  • branches/samba-3.2.x/source/utils/net_rpc.c

    r235 r272  
    119119        DOM_SID *domain_sid;
    120120        const char *domain_name;
     121        int ret = -1;
    121122
    122123        /* make use of cli_state handed over as an argument, if possible */
     
    140141        if (!(mem_ctx = talloc_init("run_rpc_command"))) {
    141142                DEBUG(0, ("talloc_init() failed\n"));
    142                 cli_shutdown(cli);
    143                 return -1;
     143                goto fail;
    144144        }
    145145       
     
    147147                                              &domain_name);
    148148        if (!NT_STATUS_IS_OK(nt_status)) {
    149                 cli_shutdown(cli);
    150                 return -1;
     149                goto fail;
    151150        }
    152151
     
    161160                                DEBUG(0, ("Could not initialise schannel netlogon pipe. Error was %s\n",
    162161                                        nt_errstr(nt_status) ));
    163                                 cli_shutdown(cli);
    164                                 return -1;
     162                                goto fail;
    165163                        }
    166164                } else {
     
    170168                                        cli_get_pipe_name(pipe_idx),
    171169                                        nt_errstr(nt_status) ));
    172                                 cli_shutdown(cli);
    173                                 return -1;
     170                                goto fail;
    174171                        }
    175172                }
     
    181178                DEBUG(1, ("rpc command function failed! (%s)\n", nt_errstr(nt_status)));
    182179        } else {
     180                ret = 0;
    183181                DEBUG(5, ("rpc command function succedded\n"));
    184182        }
     
    190188        }
    191189
     190fail:
    192191        /* close the connection only if it was opened here */
    193192        if (!cli_arg) {
     
    196195       
    197196        talloc_destroy(mem_ctx);
    198         return (!NT_STATUS_IS_OK(nt_status));
     197        return ret;
    199198}
    200199
Note: See TracChangeset for help on using the changeset viewer.