summaryrefslogtreecommitdiffstats
path: root/source/smbd/fileio.c
Commit message (Collapse)AuthorAgeFilesLines
* Modify a comment to make things clearer.Jeremy Allison2008-09-121-1/+3
| | | | Jeremy.
* smbd: some write time fixesStefan Metzmacher2008-09-081-8/+7
| | | | | | | | | | | | | | - only the first non truncating write causes the write time update with 2 seconds delay. It's not enough to check for an existing update event as it will be NULL after the event was triggered. - SMBwrite truncates always update the write time unless the sticky write time is set. - SMBwrite truncates don't trigger a write time update on close. metze
* Write times code update.Jeremy Allison2008-09-051-8/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ok, here's the fix for the write times breakage with the new tests in S4 smbtorture. The key is keeping in the share mode struct the "old_file_time" as the real write time, set by all the write and allocation calls, and the "changed_write_time" as the "sticky" write time - set by the SET_FILE_TIME calls. We can set them independently (although I kept the optimization of not setting the "old_file_time" is a "changed_write_time" was already set, as we'll never see it. This allows us to update the write time immediately on the SMBwrite truncate case, SET_END_OF_FILE and SET_ALLOCATION_SIZE calls, whilst still have the 2 second delay on the "normal" SMBwrite, SMBwriteX calls. I think in a subsequent patch I'd like to change the name of these from "old_file_time" to "write_time" and "changed_write_time" to "sticky_write_time" to make this clearer. I think I also fixed a bug in Metze's original code in that once a write timestamp had been set from a "normal" SMBwriteX call the fsp->update_write_time_triggered variable was set and then never reset - thus meaning the write timestamp would never get updated again on subsequent SMBwriteX's. The new code checks the update_write_time_event event instead, and doesn't update is there's an event already scheduled. Metze especially, please check this over for your understanding. Jeremy.
* smbd: make it possible to change the write time delay for testingStefan Metzmacher2008-04-071-1/+7
| | | | metze
* smbd: implement the strange write time update logicStefan Metzmacher2008-04-071-22/+38
| | | | | | | | | | | | | | | | | | | | We now never call file_ntimes() directly, every update is done via smb_set_file_time(). This let samba3 pass the BASE-DELAYWRITE test. The write time is only updated 2 seconds after the first write() on any open handle to the current time (not the time of the first write). Each handle which had write requests updates the write time to the current time on close(). If the write time is set explicit via setfileinfo or setpathinfo the write time is visible directly and a following close on the same handle doesn't update the write time. metze
* Remove redundant parameter fd from SMB_VFS_FTRUNCATE().Michael Adam2008-01-071-1/+1
| | | | Michael
* Remove redundant parameter fd from SMB_VFS_FSTAT().Michael Adam2008-01-071-2/+2
| | | | Michael
* Remove redundant parameter fd from SMB_VFS_FSYNC().Michael Adam2008-01-071-1/+1
| | | | Michael
* Remove unneeded parameter fd from SMB_VFS_PREAD().Michael Adam2008-01-071-2/+2
| | | | Michael
* Note when we're setting change time, not write time, and sendJeremy Allison2007-10-311-1/+2
| | | | | | message accordingly. Apart from not supporting create time we now pass the S4 RAW-NOTIFY torture. Jeremy.
* Fix some cases where file_set_dosmode was being passedJeremy Allison2007-10-311-2/+7
| | | | | | | False instead of NULL. Fix more of the notifications to be correct for Samba4 RAW-NOTIFY torture (we had missed one when calling set_ea_dos_attribute(). Jeremy.
* Add new parameter, "min receivefile size" (by default setJeremy Allison2007-10-301-12/+29
| | | | | | | | | to zero). If non-zero, writeX calls greater than this value will be left in the socket buffer for later handling with recvfile (or userspace equivalent). Definition of recvfile for your system is left as an exercise for the reader (I'm working on getting splice working :-). Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-5/+5
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r24164: Fix for write cache corruption bug reported by Jean-Francois ↵Jeremy Allison2007-10-101-10/+20
| | | | | | | Panisset <panisset@A52.com>. Awaiting confirmation from reporter. Jeremy.
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r23773: One pstring a day...Volker Lendecke2007-10-101-3/+5
|
* r23508: Fix sync_file() to return NTSTATUS and return thisJeremy Allison2007-10-101-4/+11
| | | | | on failure in the write path. Jeremy.
* r21714: Change the VFS interface to use struct timespecJeremy Allison2007-10-101-2/+2
| | | | | | | | | | for utimes - change the call to ntimes. This preserves nsec timestamps we get from stat (if the system supports it) and only maps back down to usec or sec resolution on time set. Looks bigger than it is as I had to move lots of internal code from using time_t and struct utimebuf to struct timespec. Jeremy.
* r17220: If we're going to fail a write with an errno, makeJeremy Allison2007-10-101-1/+1
| | | | | sure we return -1. Jeremy.
* r9985: Move the all the strict sync logic into file_sync().James Peach2007-10-101-3/+6
|
* r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the tortureJeremy Allison2007-10-101-21/+21
| | | | | | | | | tests on this as it's very late NY time (just wanted to get this work into the tree). I'll test this over the weekend.... Jerry - in looking at the difference between the two trees there seem to be some printing/ntprinting.c and registry changes we might want to examine to try keep in sync. Jeremy.
* r7882: Looks like a large patch - but what it actually does is make SambaJeremy Allison2007-10-101-1/+1
| | | | | | safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy
* r6949: Back-port Volker's cache fix, plus my change.Jeremy Allison2007-10-101-0/+38
| | | | Jeremy.
* r6890: Refactor printing interface to take offset into job. Fixes bugJeremy Allison2007-10-101-3/+3
| | | | | | where large print jobs can have out-of-order offsets. Bug found by Arcady Chernyak <Arcady.Chernyak@efi.com> Jeremy.
* r6841: Attempt to fix buf #2681. With "strict allocate = yes" we now zeroJeremy Allison2007-10-101-0/+5
| | | | | | fill when a file is extended. Should catch disk full errors on write from MS-Office. Jeremy.
* r6673: Fix the write cache based on some VERY good detective workJeremy Allison2007-10-101-59/+80
| | | | | | from Ingo Kilian <ikilian@web.de>. You must do a make clean after updating this. Jeremy.
* r5731: Get delayed write semantics closer to W2K3. We need to store 2 times.Jeremy Allison2007-10-101-0/+6
| | | | | This may fix bug #2382. Jeremy.
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-2/+2
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r4007: Fix bug #2088 - ensure inherit permissions is only applied on a new file,Jeremy Allison2007-10-101-1/+1
| | | | | not an existing one. Jeremy.
* r3895: Fix for bug #2045. May also fix other timestamp bugs with ExcelJeremy Allison2007-10-101-0/+14
| | | | | | | | (Volker please test). Setting a last write timestamp from Windows overrides any subsequent write timestamp changes and must be immediately seen by and findfirst/findnexts. This is a racy solution, but should work most of the time. This may also fix #1061, not sure. Jeremy.
* r3067: patch based on volker's initial work in trunk that fixes the queu ↵Gerald Carter2007-10-101-2/+2
| | | | update problem when using the background daemon
* Added per-share parameter "store dos attributes". When set, will storeJeremy Allison2004-04-021-2/+3
| | | | | | dos attributes in an EA. Based on an original patch from tridge, but modified somewhat to cover all cases. Jeremy.
* remove unused seek_file(); don't hardcode '\' when printing the auth-userGerald Carter2004-01-061-25/+0
|
* Patch based on work from James Peach <jpeach@sgi.com> to convert over toJeremy Allison2004-01-061-11/+12
| | | | | | using pread/pwrite. Modified a little to ensure fsp->pos is correct. Fix for #889. Jeremy.
* Printf fixes for 64-bit size_t.Tim Potter2003-11-021-3/+3
|
* Fix SMBseek and get/set position information SMBs. Works againstJeremy Allison2003-08-141-2/+20
| | | | | Samba4 tester. You will need a make clean; make all after this ! Jeremy.
* Prefix VFS API macros with SMB_ for consistency and to avoid problems with ↵Alexander Bokovoy2003-05-141-7/+7
| | | | VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out
* Fix VFS layer:Alexander Bokovoy2003-05-111-7/+7
| | | | | | | | | 1. Finally work with cascaded modules with private data storage per module 2. Convert VFS API to macro calls to simplify cascading 3. Add quota support to VFS layer (prepare to NT quota support) Patch by Stefan (metze) Metzemacher, with review of Jelmer and me Tested in past few weeks. Documentation to new VFS API for third-party developers to follow
* The element in fsp->print_job should be a RAP jobid, not a uint32 RPCJeremy Allison2002-12-051-2/+13
| | | | | | jobid. This was causing Win9x client "set name" calls to fail. Still need one cleanup fix to finish. Jeremy.
* Fix for 64 bit issues with oplocks and allocation size.Jeremy Allison2002-12-041-20/+36
| | | | Jeremy.
* removed the following parametersGerald Carter2002-10-211-7/+3
| | | | | | | | | * postscript * printer driver * printer driver location * printer driver file also removed the get_a_printer_driver_9x_compatible() function
* Added ASCII art to make this clearer.Jeremy Allison2002-10-031-1/+73
| | | | Jeremy.
* Write cache bugfix from Rasmus Borup Hansen, system adm. Email: ↵Jeremy Allison2002-10-031-0/+13
| | | | | | rbh@math.ku.dk Jeremy.
* Sync 3.0 branch with headJelmer Vernooij2002-08-171-1/+1
|
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-384/+395
|
* Remove the "stat open" code - make it inline. This should fix theJeremy Allison2002-03-201-0/+12
| | | | | | | | bugs with opening and renaming mp3 files, also the word rename problems that people have had for a while. Needs a make clean :-) make. Also added JohnR's printing fix. Jeremy.
* Fix lseek-on-pipe problem in VFS (where it belongs IMHO).Jeremy Allison2002-03-021-13/+1
| | | | Jeremy.
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Ensure fsp->size is correct so readraw's return correct data.Jeremy Allison2002-01-221-9/+14
| | | | Jeremy.