diff options
author | Gordon Ross <gwr@nexenta.com> | 2013-12-22 15:57:00 -0500 |
---|---|---|
committer | Gordon Ross <gwr@nexenta.com> | 2018-03-03 20:51:22 -0500 |
commit | 94667dd268e884f0b09201a938869bc98f5862bf (patch) | |
tree | 12af192fd577259d1d512fd0e01fb7ffebff7f78 /usr/src | |
parent | 9005860cd203e6b775305e7c8ffea67e92898374 (diff) | |
download | illumos-joyent-94667dd268e884f0b09201a938869bc98f5862bf.tar.gz |
4414 smb client may use large read/write when it should not
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/lib/libsmbfs/smb/ssnsetup.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/usr/src/lib/libsmbfs/smb/ssnsetup.c b/usr/src/lib/libsmbfs/smb/ssnsetup.c index 68e7ce1337..da7640241c 100644 --- a/usr/src/lib/libsmbfs/smb/ssnsetup.c +++ b/usr/src/lib/libsmbfs/smb/ssnsetup.c @@ -441,17 +441,14 @@ smb__ssnsetup(struct smb_ctx *ctx, err = 0; /* - * Windows systems don't suport CAP_LARGE_READX,WRITEX - * when signing is enabled, so adjust sv_caps. + * MS-SMB 2.2.4.5 clarifies that when SMB signing is enabled, + * the client should NOT use "large read/write" even though + * the server might offer those capabilities. */ - if (ctx->ct_srv_OS && - 0 == strncmp(ctx->ct_srv_OS, "Windows ", 8)) { - DPRINT("Server is Windows"); - if (ctx->ct_vcflags & SMBV_WILL_SIGN) { - DPRINT("disable CAP_LARGE_(r/w)"); - ctx->ct_sopt.sv_caps &= - ~(SMB_CAP_LARGE_READX | SMB_CAP_LARGE_WRITEX); - } + if (ctx->ct_vcflags & SMBV_WILL_SIGN) { + DPRINT("signing, so disable CAP_LARGE_(r/w)"); + ctx->ct_sopt.sv_caps &= + ~(SMB_CAP_LARGE_READX | SMB_CAP_LARGE_WRITEX); } out: |