From: David Mulder Date: Mon, 21 Mar 2022 19:50:08 +0000 (-0600) Subject: smbd: Disable use of smb_fn_name without SMB1 in error.c X-Git-Tag: tevent-0.12.0~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b70c88fb0bca8c9614239e05cb495fded5c76a67;p=thirdparty%2Fsamba.git smbd: Disable use of smb_fn_name without SMB1 in error.c Signed-off-by: David Mulder Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/error.c b/source3/smbd/error.c index 3f9ecaa2c5c..542d2ecc942 100644 --- a/source3/smbd/error.c +++ b/source3/smbd/error.c @@ -78,7 +78,11 @@ void error_packet_set(char *outbuf, uint8_t eclass, uint32_t ecode, NTSTATUS nts DEBUG(3,("NT error packet at %s(%d) cmd=%d (%s) %s\n", file, line, (int)CVAL(outbuf,smb_com), +#if defined(WITH_SMB1SERVER) smb_fn_name(CVAL(outbuf,smb_com)), +#else + "", +#endif nt_errstr(ntstatus))); } else { /* We're returning a DOS error only, @@ -99,7 +103,11 @@ void error_packet_set(char *outbuf, uint8_t eclass, uint32_t ecode, NTSTATUS nts DEBUG(3,("DOS error packet at %s(%d) cmd=%d (%s) eclass=%d ecode=%d\n", file, line, (int)CVAL(outbuf,smb_com), +#if defined(WITH_SMB1SERVER) smb_fn_name(CVAL(outbuf,smb_com)), +#else + "", +#endif eclass, ecode)); }