summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb/negprot.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/smb_server/smb/negprot.c b/source4/smb_server/smb/negprot.c
index 339fa7a9e35..cdfa2b4046f 100644
--- a/source4/smb_server/smb/negprot.c
+++ b/source4/smb_server/smb/negprot.c
@@ -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.
****************************************************************************/