lib: Move "large_file_support()" to the source4 smb server
authorVolker Lendecke <vl@samba.org>
Sun, 14 Sep 2014 16:44:36 +0000 (18:44 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 16 Sep 2014 22:31:21 +0000 (00:31 +0200)
That's the only place where it's used, make it static there.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
ctdb/lib/util/util.h
lib/util/samba_util.h
lib/util/util_file.c
source4/smb_server/smb/negprot.c

index abf5c4647d9fcdf06d7f3311f5ec0587344ff169..8702f2a05aa57a68fc3409d4640203efd639e9f8 100644 (file)
@@ -344,7 +344,6 @@ _PUBLIC_ void file_lines_slashcont(char **lines);
 _PUBLIC_ bool file_save(const char *fname, const void *packet, size_t length);
 _PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
 _PUBLIC_ int fdprintf(int fd, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
-_PUBLIC_ bool large_file_support(const char *path);
 
 /* The following definitions come from lib/util/util.c  */
 
index 528d3737dd2c94b03cd99c60fc044fc2e22996e5..958df88cc69dd93079999f8ca1f09649dae074dc 100644 (file)
@@ -600,7 +600,6 @@ _PUBLIC_ bool file_save_mode(const char *fname, const void *packet,
 _PUBLIC_ bool file_save(const char *fname, const void *packet, size_t length);
 _PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
 _PUBLIC_ int fdprintf(int fd, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
-_PUBLIC_ bool large_file_support(const char *path);
 
 /*
   compare two files, return true if the two files have the same content
index 815cc2bf9e6cda7964cb0ef9f28fa6a29b1d4804..8fd3277e0a754ed689a7d16f78c8ad5200d428c8 100644 (file)
@@ -419,27 +419,6 @@ _PUBLIC_ int fdprintf(int fd, const char *format, ...)
 }
 
 
-/*
-  try to determine if the filesystem supports large files
-*/
-_PUBLIC_ bool large_file_support(const char *path)
-{
-       int fd;
-       ssize_t ret;
-       char c;
-
-       fd = open(path, O_RDWR|O_CREAT, 0600);
-       unlink(path);
-       if (fd == -1) {
-               /* have to assume large files are OK */
-               return true;
-       }
-       ret = pread(fd, &c, 1, ((uint64_t)1)<<32);
-       close(fd);
-       return ret == 0;
-}
-
-
 /*
   compare two files, return true if the two files have the same content
  */
index 339fa7a9e35986d58e9aa5ff26cf9bfd411c0416..cdfa2b4046f7c0596e1131037ae65fdc30482e9d 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "includes.h"
+#include "system/filesys.h"
 #include "auth/credentials/credentials.h"
 #include "auth/gensec/gensec.h"
 #include "auth/auth.h"
@@ -251,6 +252,26 @@ static void reply_nt1_orig(struct smbsrv_request *req)
        DEBUG(3,("not using extended security (SPNEGO or NTLMSSP)\n"));
 }
 
+/*
+  try to determine if the filesystem supports large files
+*/
+static bool large_file_support(const char *path)
+{
+       int fd;
+       ssize_t ret;
+       char c;
+
+       fd = open(path, O_RDWR|O_CREAT, 0600);
+       unlink(path);
+       if (fd == -1) {
+               /* have to assume large files are OK */
+               return true;
+       }
+       ret = pread(fd, &c, 1, ((uint64_t)1)<<32);
+       close(fd);
+       return ret == 0;
+}
+
 /****************************************************************************
  Reply for the nt protocol.
 ****************************************************************************/