Changeset 272 for branches/samba-3.2.x/source/utils
- Timestamp:
- Jun 16, 2009, 5:52:30 PM (16 years ago)
- 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 73 73 int opt_flags = -1; 74 74 int opt_timeout = 0; 75 int opt_request_timeout = 0; 75 76 const char *opt_target_workgroup = NULL; 76 77 int opt_machine_pass = 0; … … 572 573 nt_errstr(nt_status)); 573 574 cli = NULL; 575 } else if (opt_request_timeout) { 576 cli_set_timeout(cli, opt_request_timeout * 1000); 574 577 } 575 578 … … 1043 1046 {"stdin", 'i', POPT_ARG_NONE, &opt_stdin}, 1044 1047 {"timeout", 't', POPT_ARG_INT, &opt_timeout}, 1048 {"request-timeout",0,POPT_ARG_INT, &opt_request_timeout}, 1045 1049 {"machine-pass",'P', POPT_ARG_NONE, &opt_machine_pass}, 1046 1050 {"myworkgroup", 'W', POPT_ARG_STRING, &opt_workgroup}, -
branches/samba-3.2.x/source/utils/net.h
r138 r272 101 101 extern int opt_machine_pass; 102 102 extern int opt_timeout; 103 extern int opt_request_timeout; 103 104 extern const char *opt_host; 104 105 extern const char *opt_user_name; -
branches/samba-3.2.x/source/utils/net_help.c
r138 r272 49 49 d_printf("\t-V or --version\t\t\tPrint samba version information\n"); 50 50 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"); 52 53 return -1; 53 54 } -
branches/samba-3.2.x/source/utils/net_rpc.c
r235 r272 119 119 DOM_SID *domain_sid; 120 120 const char *domain_name; 121 int ret = -1; 121 122 122 123 /* make use of cli_state handed over as an argument, if possible */ … … 140 141 if (!(mem_ctx = talloc_init("run_rpc_command"))) { 141 142 DEBUG(0, ("talloc_init() failed\n")); 142 cli_shutdown(cli); 143 return -1; 143 goto fail; 144 144 } 145 145 … … 147 147 &domain_name); 148 148 if (!NT_STATUS_IS_OK(nt_status)) { 149 cli_shutdown(cli); 150 return -1; 149 goto fail; 151 150 } 152 151 … … 161 160 DEBUG(0, ("Could not initialise schannel netlogon pipe. Error was %s\n", 162 161 nt_errstr(nt_status) )); 163 cli_shutdown(cli); 164 return -1; 162 goto fail; 165 163 } 166 164 } else { … … 170 168 cli_get_pipe_name(pipe_idx), 171 169 nt_errstr(nt_status) )); 172 cli_shutdown(cli); 173 return -1; 170 goto fail; 174 171 } 175 172 } … … 181 178 DEBUG(1, ("rpc command function failed! (%s)\n", nt_errstr(nt_status))); 182 179 } else { 180 ret = 0; 183 181 DEBUG(5, ("rpc command function succedded\n")); 184 182 } … … 190 188 } 191 189 190 fail: 192 191 /* close the connection only if it was opened here */ 193 192 if (!cli_arg) { … … 196 195 197 196 talloc_destroy(mem_ctx); 198 return (!NT_STATUS_IS_OK(nt_status));197 return ret; 199 198 } 200 199
Note:
See TracChangeset
for help on using the changeset viewer.