diff options
Diffstat (limited to 'source4/smb_server/smb/nttrans.c')
-rw-r--r-- | source4/smb_server/smb/nttrans.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c index b105932386..846cea9796 100644 --- a/source4/smb_server/smb/nttrans.c +++ b/source4/smb_server/smb/nttrans.c @@ -77,7 +77,7 @@ static NTSTATUS nttrans_create_send(struct nttrans_op *op) NT_STATUS_HAVE_NO_MEMORY(params); SSVAL(params, 0, io->ntcreatex.out.oplock_level); - SSVAL(params, 2, io->ntcreatex.out.fnum); + SSVAL(params, 2, io->ntcreatex.file.fnum); SIVAL(params, 4, io->ntcreatex.out.create_action); SIVAL(params, 8, 0); /* ea error offset */ push_nttime(params, 12, io->ntcreatex.out.create_time); @@ -234,8 +234,8 @@ static NTSTATUS nttrans_query_sec_desc(struct smbsrv_request *req, NT_STATUS_HAVE_NO_MEMORY(io); io->query_secdesc.level = RAW_FILEINFO_SEC_DESC; - io->query_secdesc.in.fnum = SVAL(trans->in.params.data, 0); - io->query_secdesc.secinfo_flags = IVAL(trans->in.params.data, 4); + io->query_secdesc.file.fnum = SVAL(trans->in.params.data, 0); + io->query_secdesc.in.secinfo_flags = IVAL(trans->in.params.data, 4); op->op_info = io; op->send_fn = nttrans_query_sec_desc_send; @@ -322,7 +322,7 @@ static NTSTATUS nttrans_ioctl(struct smbsrv_request *req, blob = &trans->in.data; nt->ntioctl.level = RAW_IOCTL_NTIOCTL; - nt->ntioctl.in.fnum = fnum; + nt->ntioctl.file.fnum = fnum; nt->ntioctl.in.function = function; nt->ntioctl.in.fsctl = fsctl; nt->ntioctl.in.filter = filter; @@ -341,7 +341,7 @@ static NTSTATUS nttrans_ioctl(struct smbsrv_request *req, */ static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op) { - struct smb_notify *info = talloc_get_type(op->op_info, struct smb_notify); + union smb_notify *info = talloc_get_type(op->op_info, union smb_notify); size_t size = 0; int i; NTSTATUS status; @@ -350,8 +350,8 @@ static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op) #define MAX_BYTES_PER_CHAR 3 /* work out how big the reply buffer could be */ - for (i=0;i<info->out.num_changes;i++) { - size += 12 + 3 + (1+strlen(info->out.changes[i].name.s)) * MAX_BYTES_PER_CHAR; + for (i=0;i<info->notify.out.num_changes;i++) { + size += 12 + 3 + (1+strlen(info->notify.out.changes[i].name.s)) * MAX_BYTES_PER_CHAR; } status = nttrans_setup_reply(op, op->trans, size, 0, 0); @@ -360,11 +360,11 @@ static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op) p = op->trans->out.params.data; /* construct the changes buffer */ - for (i=0;i<info->out.num_changes;i++) { + for (i=0;i<info->notify.out.num_changes;i++) { ssize_t len; - SIVAL(p, 4, info->out.changes[i].action); - len = push_string(p + 12, info->out.changes[i].name.s, + SIVAL(p, 4, info->notify.out.changes[i].action); + len = push_string(p + 12, info->notify.out.changes[i].name.s, op->trans->out.params.length - (ofs+12), STR_UNICODE); SIVAL(p, 8, len); @@ -393,20 +393,20 @@ static NTSTATUS nttrans_notify_change(struct smbsrv_request *req, struct nttrans_op *op) { struct smb_nttrans *trans = op->trans; - struct smb_notify *info; + union smb_notify *info; /* should have at least 4 setup words */ if (trans->in.setup_count != 4) { return NT_STATUS_INVALID_PARAMETER; } - info = talloc(op, struct smb_notify); + info = talloc(op, union smb_notify); NT_STATUS_HAVE_NO_MEMORY(info); - info->in.completion_filter = IVAL(trans->in.setup, 0); - info->in.fnum = SVAL(trans->in.setup, 4); - info->in.recursive = SVAL(trans->in.setup, 6); - info->in.buffer_size = trans->in.max_param; + info->notify.in.completion_filter = IVAL(trans->in.setup, 0); + info->notify.file.fnum = SVAL(trans->in.setup, 4); + info->notify.in.recursive = SVAL(trans->in.setup, 6); + info->notify.in.buffer_size = trans->in.max_param; op->op_info = info; op->send_fn = nttrans_notify_change_send; |