From: Matthias Dieter Wallnöfer Date: Wed, 3 Mar 2010 17:26:15 +0000 (+0100) Subject: s4:srvsvc RPC - fix up the "ntvfs_connect" in "srvsvc_create_ntvfs_connect" X-Git-Tag: samba-3.6.0pre1~4811 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b4d208ce8482e63a56fff3447179ff786062c48;p=thirdparty%2Fsamba.git s4:srvsvc RPC - fix up the "ntvfs_connect" in "srvsvc_create_ntvfs_connect" This should be the right fix (set the service name in the tcon union to the share name/path). That should be the solution for bug #6784. --- diff --git a/source4/rpc_server/srvsvc/srvsvc_ntvfs.c b/source4/rpc_server/srvsvc/srvsvc_ntvfs.c index 7b337063af1..17c5f81e65f 100644 --- a/source4/rpc_server/srvsvc/srvsvc_ntvfs.c +++ b/source4/rpc_server/srvsvc/srvsvc_ntvfs.c @@ -57,6 +57,7 @@ NTSTATUS srvsvc_create_ntvfs_context(struct dcesrv_call_state *dce_call, struct share_context *sctx; struct share_config *scfg; const char *sharetype; + union smb_tcon tcon; status = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx); if (!NT_STATUS_IS_OK(status)) { @@ -124,9 +125,10 @@ NTSTATUS srvsvc_create_ntvfs_context(struct dcesrv_call_state *dce_call, NT_STATUS_HAVE_NO_MEMORY(ntvfs_req); /* Invoke NTVFS connection hook */ - /* FIXME: Here is the right parameter missing! - * status = ntvfs_connect(ntvfs_req, ); */ - status = NT_STATUS_UNSUCCESSFUL; /* return this for now */ + tcon.tcon.level = RAW_TCON_TCON; + ZERO_STRUCT(tcon.tcon.in); + tcon.tcon.in.service = share; + status = ntvfs_connect(ntvfs_req, &tcon); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("srvsvc_create_ntvfs_context: NTVFS ntvfs_connect() failed!\n")); return status;