#include "includes.h"
+#include "system/filesys.h"
/* this is the private structure used to keep the state of an open
ipc$ connection. It needs to keep information about all open
pipes */
struct ipc_private {
- void *idtree_fnum;
+ struct idr_context *idtree_fnum;
/* a list of open pipes */
struct pipe_state {
{
struct pipe_state *p;
NTSTATUS status;
- struct dcesrv_ep_description ep_description;
+ struct dcerpc_binding ep_description;
struct auth_session_info *session_info = NULL;
struct ipc_private *private = ntvfs->private_data;
int fnum;
will need to do that once the credentials infrastructure is
finalised for Samba4
*/
- ep_description.type = ENDPOINT_SMB;
- ep_description.info.smb_pipe = p->pipe_name;
+ ep_description.transport = NCACN_NP;
+ ep_description.endpoint = p->pipe_name;
/* tell the RPC layer the session_info */
if (req->session) {
}
fnum = rd->readx.in.fnum;
- data.length = rd->readx.in.maxcnt;
- data.data = rd->readx.out.data;
p = pipe_state_find(private, fnum);
if (!p) {
return NT_STATUS_INVALID_HANDLE;
}
- status = dcesrv_output_blob(p->dce_conn, &data);
- if (NT_STATUS_IS_ERR(status)) {
- return status;
+ data.length = rd->readx.in.maxcnt;
+ data.data = rd->readx.out.data;
+ if (data.length > UINT16_MAX) {
+ data.length = 0;
+ }
+
+ if (data.length != 0) {
+ status = dcesrv_output_blob(p->dce_conn, &data);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
}
rd->readx.out.remaining = 0;
ops.chkpath = ipc_chkpath;
ops.qpathinfo = ipc_qpathinfo;
ops.setpathinfo = ipc_setpathinfo;
- ops.open = ipc_open;
+ ops.openfile = ipc_open;
ops.mkdir = ipc_mkdir;
ops.rmdir = ipc_rmdir;
ops.rename = ipc_rename;