summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Ross <gwr@racktopsystems.com>2022-02-07 22:33:40 -0500
committerToomas Soome <tsoome@me.com>2022-12-03 00:30:41 +0200
commit5501be744ff52982d35ba1bf3f1369859187de37 (patch)
tree79040dbaaa06efcac326b540b1557387de83577f
parenta7bf1903fa865f16057324ac0561c011bff86eee (diff)
downloadillumos-gate-5501be744ff52982d35ba1bf3f1369859187de37.tar.gz
15183 SMB server debug builds are a bit noisy
Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org> Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Reviewed by: Matt Barden <mbarden@racktopsystems.com> Approved by: Dan McDonald <danmcd@mnx.io>
-rw-r--r--usr/src/uts/common/fs/smbsrv/smb2_create.c18
-rw-r--r--usr/src/uts/common/fs/smbsrv/smb2_negotiate.c5
2 files changed, 19 insertions, 4 deletions
diff --git a/usr/src/uts/common/fs/smbsrv/smb2_create.c b/usr/src/uts/common/fs/smbsrv/smb2_create.c
index 5aa643d7ab..dec65395e3 100644
--- a/usr/src/uts/common/fs/smbsrv/smb2_create.c
+++ b/usr/src/uts/common/fs/smbsrv/smb2_create.c
@@ -11,7 +11,7 @@
/*
* Copyright 2018 Nexenta Systems, Inc. All rights reserved.
- * Copyright 2019 RackTop Systems.
+ * Copyright 2022 RackTop Systems, Inc.
*/
/*
@@ -828,10 +828,22 @@ smb2_decode_create_ctx(smb_request_t *sr, smb2_create_ctx_t *cc)
cc->cc_in_flags |= CCTX_DH_RECONNECT_V2;
cce = &cc->cc_in_dh_reconnect_v2;
break;
+
+ /*
+ * Known but not implemented context IDs.
+ * Here just to silence the debug below.
+ *
+ * Note: all three of these IDs are actually longer,
+ * but we start by decoding just the first 4 bytes.
+ * If/when we recognize these, do another match on
+ * the full ID after we take this switch case.
+ */
+ case 0x45bca66a: /* SMB2_CREATE_APP_INSTANCE_ID */
+ case 0xB982D0B7: /* SMB2_CREATE_APP_INSTANCE_VERSION */
case 0x9ccbcf9e: /* SVHDX_OPEN_DEVICE_CONTEXT */
- /* 9ccbcf9e 04c1e643 980e158d a1f6ec83 */
- /* silently ignore */
+ cce = NULL;
break;
+
default:
/*
* Unknown create context values are normal, and
diff --git a/usr/src/uts/common/fs/smbsrv/smb2_negotiate.c b/usr/src/uts/common/fs/smbsrv/smb2_negotiate.c
index 473115e179..bf99b99cbb 100644
--- a/usr/src/uts/common/fs/smbsrv/smb2_negotiate.c
+++ b/usr/src/uts/common/fs/smbsrv/smb2_negotiate.c
@@ -38,7 +38,10 @@ uint32_t smb2srv_capabilities =
SMB2_CAP_LEASING |
SMB2_CAP_LARGE_MTU |
SMB2_CAP_PERSISTENT_HANDLES |
- SMB2_CAP_ENCRYPTION;
+#ifndef _FAKE_KERNEL
+ SMB2_CAP_ENCRYPTION |
+#endif
+ 0;
/* These are the only capabilities defined for SMB2.X */
#define SMB_2X_CAPS (SMB2_CAP_DFS | SMB2_CAP_LEASING | SMB2_CAP_LARGE_MTU)