summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/smbsrv/smb_opipe.c
diff options
context:
space:
mode:
authorGordon Ross <gwr@nexenta.com>2016-05-02 13:07:54 -0400
committerGordon Ross <gwr@nexenta.com>2019-07-05 22:37:20 -0400
commit55f0a249fd3511728b02627190771a4ce4ddf20e (patch)
tree4574c0ae31a48977db9de471689ccda22e9d9f33 /usr/src/uts/common/fs/smbsrv/smb_opipe.c
parent7356a1b7ef0e3031dd95591ad0564da26cf959dc (diff)
downloadillumos-gate-55f0a249fd3511728b02627190771a4ce4ddf20e.tar.gz
11020 want SMB2 ioctl FSCTL_SRV_COPYCHUNK
Reviewed by: Evan Layton <evan.layton@nexenta.com> Reviewed by: Matt Barden <matt.barden@nexenta.com> Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com> Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/common/fs/smbsrv/smb_opipe.c')
-rw-r--r--usr/src/uts/common/fs/smbsrv/smb_opipe.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/src/uts/common/fs/smbsrv/smb_opipe.c b/usr/src/uts/common/fs/smbsrv/smb_opipe.c
index 83b74ee075..6742a5c052 100644
--- a/usr/src/uts/common/fs/smbsrv/smb_opipe.c
+++ b/usr/src/uts/common/fs/smbsrv/smb_opipe.c
@@ -37,8 +37,6 @@
#include <smbsrv/smb_xdr.h>
#include <smb/winioctl.h>
-static uint32_t smb_opipe_transceive(smb_request_t *, smb_fsctl_t *);
-
/*
* Allocate a new opipe and return it, or NULL, in which case
* the caller will report "internal error".
@@ -557,7 +555,8 @@ smb_opipe_getname(smb_ofile_t *of, char *buf, size_t buflen)
}
/*
- * Handler for smb2_ioctl
+ * Handle device type FILE_DEVICE_NAMED_PIPE
+ * for smb2_ioctl
*/
/* ARGSUSED */
uint32_t
@@ -565,6 +564,9 @@ smb_opipe_fsctl(smb_request_t *sr, smb_fsctl_t *fsctl)
{
uint32_t status;
+ if (!STYPE_ISIPC(sr->tid_tree->t_res_type))
+ return (NT_STATUS_INVALID_DEVICE_REQUEST);
+
switch (fsctl->CtlCode) {
case FSCTL_PIPE_TRANSCEIVE:
status = smb_opipe_transceive(sr, fsctl);
@@ -585,7 +587,7 @@ smb_opipe_fsctl(smb_request_t *sr, smb_fsctl_t *fsctl)
return (status);
}
-static uint32_t
+uint32_t
smb_opipe_transceive(smb_request_t *sr, smb_fsctl_t *fsctl)
{
smb_vdb_t vdb;