diff options
author | Dan McDonald <danmcd@joyent.com> | 2020-11-30 10:59:13 -0500 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2020-11-30 10:59:13 -0500 |
commit | ae5074194468cd0ea2063a873fe20f520850f371 (patch) | |
tree | 99ce768ec9b63ed014bd8249a195d07060d8f80f | |
parent | 6408772421f05fdd77016a2b8d9a1becf9723fb8 (diff) | |
parent | 4d2aba2f17eed4643aa996841698226ff2673205 (diff) | |
download | illumos-joyent-ae5074194468cd0ea2063a873fe20f520850f371.tar.gz |
[illumos-gate merge]
commit 4d2aba2f17eed4643aa996841698226ff2673205
13330 SMB read hangs on Mac Big Sur
commit 41b57d181d0b4df0badc148a4769e9d0bf008aaa
13337 ctfconvert should skip ssp_ns.c when checking for debug data
-rw-r--r-- | usr/src/lib/libctf/common/ctf_dwarf.c | 1 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb2_read.c | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/usr/src/lib/libctf/common/ctf_dwarf.c b/usr/src/lib/libctf/common/ctf_dwarf.c index d91888d6c1..1618c8add4 100644 --- a/usr/src/lib/libctf/common/ctf_dwarf.c +++ b/usr/src/lib/libctf/common/ctf_dwarf.c @@ -3288,6 +3288,7 @@ c_source_has_debug(const char *file, ctf_cu_t *cus, size_t nr_cus) strcmp(basename, "gmon.c") == 0 || strcmp(basename, "dlink_init.c") == 0 || strcmp(basename, "dlink_common.c") == 0 || + strcmp(basename, "ssp_ns.c") == 0 || strncmp(basename, "crt", strlen("crt")) == 0 || strncmp(basename, "values-", strlen("values-")) == 0) return (B_TRUE); diff --git a/usr/src/uts/common/fs/smbsrv/smb2_read.c b/usr/src/uts/common/fs/smbsrv/smb2_read.c index f8c91c878f..936fa06f6c 100644 --- a/usr/src/uts/common/fs/smbsrv/smb2_read.c +++ b/usr/src/uts/common/fs/smbsrv/smb2_read.c @@ -10,11 +10,12 @@ */ /* - * Copyright 2019 Nexenta Systems, Inc. All rights reserved. + * Copyright 2020 Tintri by DDN, Inc. All rights reserved. */ /* * Dispatch function for SMB2_READ + * MS-SMB2 sec. 3.3.5.12 */ #include <smbsrv/smb2_kproto.h> @@ -160,6 +161,14 @@ smb2_read(smb_request_t *sr) MBC_ATTACH_MBUF(&sr->raw_data, m); /* + * [MS-SMB2] If the read returns fewer bytes than specified by + * the MinimumCount field of the request, the server MUST fail + * the request with STATUS_END_OF_FILE + */ + if (status == 0 && XferCount < MinCount) + status = NT_STATUS_END_OF_FILE; + + /* * Checking the error return _after_ dealing with * the returned data so that if m was allocated, * it will be free'd via sr->raw_data cleanup. |