summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McDonald <danmcd@mnx.io>2022-12-05 09:55:47 -0500
committerDan McDonald <danmcd@mnx.io>2022-12-05 09:55:47 -0500
commit91d202bd4a855f8603d27f0cd32ed6d63525ff23 (patch)
tree0e715c630dd21f5fd64148e3005e4f7e10573d95
parent0e4170cbfc0c43d112cb2b4be70c5a2d1bed30e0 (diff)
parent5501be744ff52982d35ba1bf3f1369859187de37 (diff)
downloadillumos-joyent-91d202bd4a855f8603d27f0cd32ed6d63525ff23.tar.gz
[illumos-gate merge]
commit 5501be744ff52982d35ba1bf3f1369859187de37 15183 SMB server debug builds are a bit noisy
-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)