Changeset 989 for vendor/current/source3/libsmb
- Timestamp:
- Nov 25, 2016, 8:04:54 PM (9 years ago)
- Location:
- vendor/current/source3/libsmb
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/libsmb/cli_smb2_fnum.c
r988 r989 177 177 struct tevent_req *req, *subreq; 178 178 struct cli_smb2_create_fnum_state *state; 179 size_t fname_len = 0; 179 180 180 181 req = tevent_req_create(mem_ctx, &state, … … 198 199 if (*fname == '\\') { 199 200 fname++; 201 } 202 203 /* Or end in a '\' */ 204 fname_len = strlen(fname); 205 if (fname_len > 0 && fname[fname_len-1] == '\\') { 206 char *new_fname = talloc_strdup(state, fname); 207 if (tevent_req_nomem(new_fname, req)) { 208 return tevent_req_post(req, ev); 209 } 210 new_fname[fname_len-1] = '\0'; 211 fname = new_fname; 200 212 } 201 213 … … 263 275 264 276 if (tevent_req_is_nterror(req, &status)) { 277 state->cli->raw_status = status; 265 278 return status; 266 279 } … … 271 284 *cr = state->cr; 272 285 } 286 state->cli->raw_status = NT_STATUS_OK; 273 287 return NT_STATUS_OK; 274 288 } … … 391 405 NTSTATUS cli_smb2_close_fnum_recv(struct tevent_req *req) 392 406 { 393 return tevent_req_simple_recv_ntstatus(req); 407 struct cli_smb2_close_fnum_state *state = tevent_req_data( 408 req, struct cli_smb2_close_fnum_state); 409 NTSTATUS status = tevent_req_simple_recv_ntstatus(req); 410 state->cli->raw_status = status; 411 return status; 394 412 } 395 413 … … 2303 2321 2304 2322 if (tevent_req_is_nterror(req, &status)) { 2323 state->cli->raw_status = status; 2305 2324 return status; 2306 2325 } … … 2312 2331 *received = (ssize_t)state->received; 2313 2332 *rcvbuf = state->buf; 2333 state->cli->raw_status = NT_STATUS_OK; 2314 2334 return NT_STATUS_OK; 2315 2335 } … … 2410 2430 2411 2431 if (tevent_req_is_nterror(req, &status)) { 2432 state->cli->raw_status = status; 2412 2433 tevent_req_received(req); 2413 2434 return status; … … 2417 2438 *pwritten = (size_t)state->written; 2418 2439 } 2440 state->cli->raw_status = NT_STATUS_OK; 2419 2441 tevent_req_received(req); 2420 2442 return NT_STATUS_OK; … … 2574 2596 2575 2597 if (tevent_req_is_nterror(req, &status)) { 2598 state->cli->raw_status = status; 2576 2599 return status; 2577 2600 } … … 2579 2602 *pwritten = (size_t)state->written; 2580 2603 } 2604 state->cli->raw_status = NT_STATUS_OK; 2581 2605 return NT_STATUS_OK; 2582 2606 } … … 2839 2863 2840 2864 if (tevent_req_is_nterror(req, &status)) { 2865 state->cli->raw_status = status; 2841 2866 tevent_req_received(req); 2842 2867 return status; … … 2845 2870 *written = state->written; 2846 2871 } 2872 state->cli->raw_status = NT_STATUS_OK; 2847 2873 tevent_req_received(req); 2848 2874 return NT_STATUS_OK; -
vendor/current/source3/libsmb/cliconnect.c
r988 r989 1589 1589 * 1590 1590 * So just pretend we are completely done. 1591 * 1592 * Note that smbXcli_session_is_guest() 1593 * always returns false if we require signing. 1591 1594 */ 1592 1595 state->blob_in = data_blob_null; … … 3106 3109 3107 3110 state->desthost = host; 3108 } else {3111 } else if (dest_ss != NULL) { 3109 3112 state->desthost = print_canonical_sockaddr(state, dest_ss); 3110 3113 if (tevent_req_nomem(state->desthost, req)) { 3111 3114 return tevent_req_post(req, ev); 3112 3115 } 3116 } else { 3117 /* No host or dest_ss given. Error out. */ 3118 tevent_req_error(req, EINVAL); 3119 return tevent_req_post(req, ev); 3113 3120 } 3114 3121 -
vendor/current/source3/libsmb/clifile.c
r988 r989 4594 4594 setup, 1, 0, 4595 4595 param, param_len, 2, 4596 data, data_len, CLI_BUFFER_SIZE,4596 data, data_len, 0, 4597 4597 NULL, 4598 4598 NULL, 0, NULL, /* rsetup */
Note:
See TracChangeset
for help on using the changeset viewer.