From 9cd2b012f3bf9f21f321d44c43eb5a8a781d68fc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 28 Oct 2006 06:06:15 +0000 Subject: r19504: - fixed a free error in file_lines_parse - added a function to test for large file support - enable CAP_LARGE_FILES only if the test passes - don't test at large offsets if the server doesn't set CAP_LARGE_FILES (This used to be commit c5423ea22bdaa055807d4e6f7ac4be934194fe45) --- source4/smb_server/smb/negprot.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source4/smb_server') diff --git a/source4/smb_server/smb/negprot.c b/source4/smb_server/smb/negprot.c index 25684bee27..4aecca53ba 100644 --- a/source4/smb_server/smb/negprot.c +++ b/source4/smb_server/smb/negprot.c @@ -250,6 +250,7 @@ static void reply_nt1(struct smbsrv_request *req, uint16_t choice) time_t t = req->request_time.tv_sec; NTTIME nttime; BOOL negotiate_spnego = False; + char *large_test_path; unix_to_nt_time(&nttime, t); @@ -277,8 +278,11 @@ static void reply_nt1(struct smbsrv_request *req, uint16_t choice) if (lp_large_readwrite()) { capabilities |= CAP_LARGE_READX | CAP_LARGE_WRITEX | CAP_W2K_SMBS; } - - capabilities |= CAP_LARGE_FILES; + + large_test_path = lock_path(req, "large_test.dat"); + if (large_file_support(large_test_path)) { + capabilities |= CAP_LARGE_FILES; + } if (lp_readraw() && lp_writeraw()) { capabilities |= CAP_RAW_MODE; -- cgit