]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Disable use of smb_fn_name without SMB1 in error.c
authorDavid Mulder <dmulder@suse.com>
Mon, 21 Mar 2022 19:50:08 +0000 (13:50 -0600)
committerJeremy Allison <jra@samba.org>
Thu, 7 Apr 2022 17:37:30 +0000 (17:37 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/error.c

index 3f9ecaa2c5cc818b254e9e68f80f7c11a44062f6..542d2ecc9421b21b8e701e4a0b1312af2a5be86c 100644 (file)
@@ -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));
        }