From: Jeremy Allison Date: Tue, 8 Mar 2022 03:06:34 +0000 (-0800) Subject: s3: smbd: Look at the correct signing state for the debug messages in make_connection... X-Git-Tag: tevent-0.12.0~531 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b879d475bfde86d4f7c73ef17cedd91d03ecfeed;p=thirdparty%2Fsamba.git s3: smbd: Look at the correct signing state for the debug messages in make_connection_snum(). The rest of the changes should now be just renaming the SMB1 signing functions to make it clear they are SMB1 specific. Signed-off-by: Jeremy Allison Signed-off-by: David Mulder --- diff --git a/source3/smbd/service.c b/source3/smbd/service.c index ef7c14d92d0..2a527234e98 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -852,10 +852,18 @@ static NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn, */ if( DEBUGLVL( IS_IPC(conn) ? 3 : 2 ) ) { + bool signing_active; + dbgtext( "%s (%s) ", get_remote_machine_name(), tsocket_address_string(conn->sconn->remote_address, talloc_tos()) ); - dbgtext( "%s", srv_is_signing_active(xconn) ? "signed " : ""); + if (sconn->using_smb2) { + signing_active = smb2_signing_key_valid( + session->global->encryption_key); + } else { + signing_active = srv_is_signing_active(xconn); + } + dbgtext( "%s", signing_active ? "signed " : ""); dbgtext( "connect to service %s ", lp_const_servicename(snum) ); dbgtext( "initially as user %s ",