]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Make lp_use_sendfile() static to reply.c
authorVolker Lendecke <vl@samba.org>
Fri, 6 Dec 2019 12:25:21 +0000 (13:25 +0100)
committerJeremy Allison <jra@samba.org>
Sun, 8 Dec 2019 20:24:31 +0000 (20:24 +0000)
This is the only place where it's used. Also, via
smb_signing_is_active it pulls in the dependency on
'cli_smb_common' (which pulls in all of gensec) into the 'smbconf'
library. Without this, 'smbconf' is happy with just 'samba-hostconfig'
instead of 'cli_smb_common'

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/proto.h
source3/param/loadparm.c
source3/smbd/reply.c

index 583814ea1bc4acdbc66a61fedb7d06ffadbb6737..d543dc6695552d039dbbcae6955b5e2e422dbb77 100644 (file)
@@ -873,7 +873,6 @@ bool lp_disable_spoolss( void );
 void lp_set_spoolss_state( uint32_t state );
 uint32_t lp_get_spoolss_state( void );
 struct smb_signing_state;
-bool lp_use_sendfile(int snum, struct smb_signing_state *signing_state);
 void set_use_sendfile(int snum, bool val);
 void lp_set_mangling_method(const char *new_method);
 bool lp_posix_pathnames(void);
index fd5d90569cc3bc8614acaa6a17437f8eec62d361..bef24b6821b7f1254439cbcf1d92553dc594cca8 100644 (file)
@@ -4496,26 +4496,6 @@ uint32_t lp_get_spoolss_state( void )
        return lp_disable_spoolss() ? SVCCTL_STOPPED : SVCCTL_RUNNING;
 }
 
-/*******************************************************************
- Ensure we don't use sendfile if server smb signing is active.
-********************************************************************/
-
-bool lp_use_sendfile(int snum, struct smb_signing_state *signing_state)
-{
-       bool sign_active = false;
-
-       /* Using sendfile blows the brains out of any DOS or Win9x TCP stack... JRA. */
-       if (get_Protocol() < PROTOCOL_NT1) {
-               return false;
-       }
-       if (signing_state) {
-               sign_active = smb_signing_is_active(signing_state);
-       }
-       return (lp__use_sendfile(snum) &&
-                       (get_remote_arch() != RA_WIN95) &&
-                       !sign_active);
-}
-
 /*******************************************************************
  Turn off sendfile if we find the underlying OS doesn't support it.
 ********************************************************************/
index f2d0b878e202146995352b19dca51acea65118e3..3c0c7dbb631d0697ecf026a2f8f9ecfc8e669426 100644 (file)
@@ -3626,6 +3626,25 @@ static void reply_readbraw_error(struct smbXsrv_connection *xconn)
        smbd_unlock_socket(xconn);
 }
 
+/*******************************************************************
+ Ensure we don't use sendfile if server smb signing is active.
+********************************************************************/
+
+static bool lp_use_sendfile(int snum, struct smb_signing_state *signing_state)
+{
+       bool sign_active = false;
+
+       /* Using sendfile blows the brains out of any DOS or Win9x TCP stack... JRA. */
+       if (get_Protocol() < PROTOCOL_NT1) {
+               return false;
+       }
+       if (signing_state) {
+               sign_active = smb_signing_is_active(signing_state);
+       }
+       return (lp__use_sendfile(snum) &&
+                       (get_remote_arch() != RA_WIN95) &&
+                       !sign_active);
+}
 /****************************************************************************
  Use sendfile in readbraw.
 ****************************************************************************/