From 5501be744ff52982d35ba1bf3f1369859187de37 Mon Sep 17 00:00:00 2001 From: Gordon Ross Date: Mon, 7 Feb 2022 22:33:40 -0500 Subject: 15183 SMB server debug builds are a bit noisy Reviewed by: Robert Mustacchi Reviewed by: Andrew Stormont Reviewed by: Matt Barden Approved by: Dan McDonald --- usr/src/uts/common/fs/smbsrv/smb2_create.c | 18 +++++++++++++++--- usr/src/uts/common/fs/smbsrv/smb2_negotiate.c | 5 ++++- 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) -- cgit v1.2.3