Changeset 745 for trunk/server/source4/libcli/smb_composite
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source4/libcli/smb_composite/appendacl.c
r414 r745 255 255 256 256 state->io_open->ntcreatex.level = RAW_OPEN_NTCREATEX; 257 state->io_open->ntcreatex.in.root_fid = 0;257 state->io_open->ntcreatex.in.root_fid.fnum = 0; 258 258 state->io_open->ntcreatex.in.flags = 0; 259 259 state->io_open->ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; -
trunk/server/source4/libcli/smb_composite/connect.c
r414 r745 31 31 #include "librpc/gen_ndr/ndr_nbt.h" 32 32 #include "param/param.h" 33 #include "lib/util/util_net.h" 33 34 34 35 /* the stages of this call */ 35 enum connect_stage {CONNECT_RESOLVE, 36 CONNECT_SOCKET, 36 enum connect_stage {CONNECT_SOCKET, 37 37 CONNECT_SESSION_REQUEST, 38 38 CONNECT_NEGPROT, … … 324 324 /* the socket is up - we can initialise the smbcli transport layer */ 325 325 state->transport = smbcli_transport_init(state->sock, state, true, 326 &io->in.options , io->in.iconv_convenience);326 &io->in.options); 327 327 NT_STATUS_HAVE_NO_MEMORY(state->transport); 328 328 … … 363 363 364 364 /* 365 called when name resolution is finished366 */367 static NTSTATUS connect_resolve(struct composite_context *c,368 struct smb_composite_connect *io)369 {370 struct connect_state *state = talloc_get_type(c->private_data, struct connect_state);371 NTSTATUS status;372 const char *address;373 374 status = resolve_name_recv(state->creq, state, &address);375 NT_STATUS_NOT_OK_RETURN(status);376 377 state->creq = smbcli_sock_connect_send(state, address,378 io->in.dest_ports,379 io->in.dest_host,380 NULL, c->event_ctx,381 io->in.socket_options);382 NT_STATUS_HAVE_NO_MEMORY(state->creq);383 384 state->stage = CONNECT_SOCKET;385 state->creq->async.private_data = c;386 state->creq->async.fn = composite_handler;387 388 return NT_STATUS_OK;389 }390 391 392 /*393 365 handle and dispatch state transitions 394 366 */ … … 398 370 399 371 switch (state->stage) { 400 case CONNECT_RESOLVE:401 c->status = connect_resolve(c, state->io);402 break;403 372 case CONNECT_SOCKET: 404 373 c->status = connect_socket(c, state->io); … … 462 431 struct composite_context *c; 463 432 struct connect_state *state; 464 struct nbt_name name;465 433 466 434 c = talloc_zero(mem_ctx, struct composite_context); … … 479 447 c->private_data = state; 480 448 481 state->stage = CONNECT_RESOLVE; 482 make_nbt_name_server(&name, io->in.dest_host); 483 state->creq = resolve_name_send(resolve_ctx, state, &name, c->event_ctx); 484 449 state->creq = smbcli_sock_connect_send(state, 450 NULL, 451 io->in.dest_ports, 452 io->in.dest_host, 453 resolve_ctx, c->event_ctx, 454 io->in.socket_options); 485 455 if (state->creq == NULL) goto failed; 456 457 state->stage = CONNECT_SOCKET; 486 458 state->creq->async.private_data = c; 487 459 state->creq->async.fn = composite_handler; -
trunk/server/source4/libcli/smb_composite/fetchfile.c
r414 r745 147 147 state->connect->in.workgroup = io->in.workgroup; 148 148 state->connect->in.gensec_settings = io->in.gensec_settings; 149 state->connect->in.iconv_convenience = io->in.iconv_convenience;150 149 151 150 state->connect->in.options = io->in.options; -
trunk/server/source4/libcli/smb_composite/fsinfo.c
r414 r745 154 154 state->connect->in.fallback_to_anonymous = false; 155 155 state->connect->in.workgroup = io->in.workgroup; 156 state->connect->in.iconv_convenience = io->in.iconv_convenience;157 156 state->connect->in.gensec_settings = io->in.gensec_settings; 158 157 -
trunk/server/source4/libcli/smb_composite/smb_composite.h
r414 r745 61 61 struct smbcli_session_options session_options; 62 62 struct resolve_context *resolve_ctx; 63 struct smb_iconv_convenience *iconv_convenience;64 63 struct gensec_settings *gensec_settings; 65 64 } in; … … 105 104 struct smbcli_options options; 106 105 struct smbcli_session_options session_options; 107 struct smb_iconv_convenience *iconv_convenience;108 106 struct gensec_settings *gensec_settings; 109 107 } in; … … 146 144 const char *workgroup; 147 145 enum smb_fsinfo_level level; 148 struct smb_iconv_convenience *iconv_convenience;149 146 struct gensec_settings *gensec_settings; 150 147 } in; … … 182 179 const char **hostnames; 183 180 const char **addresses; 184 int *ports; /* Either NULL for lp _smb_ports() per181 int *ports; /* Either NULL for lpcfg_smb_ports() per 185 182 * destination or a list of explicit ports */ 186 183 } in;
Note:
See TracChangeset
for help on using the changeset viewer.