Changeset 224 for branches/samba-3.3.x/source/utils/net_rpc.c
- Timestamp:
- May 24, 2009, 7:55:48 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/utils/net_rpc.c
r221 r224 121 121 DOM_SID *domain_sid; 122 122 const char *domain_name; 123 int ret = -1; 123 124 124 125 /* make use of cli_state handed over as an argument, if possible */ … … 142 143 if (!(mem_ctx = talloc_init("run_rpc_command"))) { 143 144 DEBUG(0, ("talloc_init() failed\n")); 144 cli_shutdown(cli); 145 return -1; 145 goto fail; 146 146 } 147 147 … … 149 149 &domain_name); 150 150 if (!NT_STATUS_IS_OK(nt_status)) { 151 cli_shutdown(cli); 152 return -1; 151 goto fail; 153 152 } 154 153 … … 165 164 DEBUG(0, ("Could not initialise schannel netlogon pipe. Error was %s\n", 166 165 nt_errstr(nt_status) )); 167 cli_shutdown(cli); 168 return -1; 166 goto fail; 169 167 } 170 168 } else { … … 185 183 debug_ctx(), cli, interface), 186 184 nt_errstr(nt_status) )); 187 cli_shutdown(cli); 188 return -1; 185 goto fail; 189 186 } 190 187 } … … 196 193 DEBUG(1, ("rpc command function failed! (%s)\n", nt_errstr(nt_status))); 197 194 } else { 195 ret = 0; 198 196 DEBUG(5, ("rpc command function succedded\n")); 199 197 } … … 205 203 } 206 204 205 fail: 207 206 /* close the connection only if it was opened here */ 208 207 if (!cli_arg) { … … 211 210 212 211 talloc_destroy(mem_ctx); 213 return (!NT_STATUS_IS_OK(nt_status));212 return ret; 214 213 } 215 214 … … 6128 6127 nt_status = rpccli_samr_Connect2(pipe_hnd, mem_ctx, 6129 6128 pipe_hnd->desthost, 6130 SAMR_ACCESS_ OPEN_DOMAIN,6129 SAMR_ACCESS_LOOKUP_DOMAIN, 6131 6130 &connect_hnd); 6132 6131 if (!NT_STATUS_IS_OK(nt_status)) {
Note:
See TracChangeset
for help on using the changeset viewer.