summaryrefslogtreecommitdiff
path: root/source3/smbd/files.c
AgeCommit message (Collapse)AuthorFilesLines
2010-03-28s3: Use bitmap_talloc in files.cVolker Lendecke1-1/+2
2010-03-22s3: file_walk_table -> files_forallVolker Lendecke1-1/+1
This is more in line with the rest of the Samba code, like connections_forall etc.
2010-03-22s3: Fix some nonempty blank linesVolker Lendecke1-6/+6
2009-12-02Fix bug #6837 - "Too many open files" when trying to access large number of ↵Jeremy Allison1-2/+0
files from Windows 7. Original patch by me fixed up with the correct open files number by jmaggard10@hotmail.com. Jeremy.
2009-10-07Oops. Don't break the build..Jeremy Allison1-3/+2
Jeremy.
2009-10-07Make the logic a lot clearer and fix the comment to match.Jeremy Allison1-15/+10
Jeremy
2009-10-07Correct fix for bug 6781 - Cannot rename subfolders in Explorer view with ↵Jeremy Allison1-3/+1
recent versions of Samba. Without this fix, renaming a directory ./a to ./b, whilst a directory ./aa was already open would fail. Jeremy.
2009-08-06s3: Fix a bug in renames of directoriesTim Prouty1-6/+19
Recently code was added to match windows semantics of denying the rename of a directory if there are open files underneath it. This does partly match windows semantics, but it turns out the rename should be allowed if the open file handle is for the directory being renamed, or for a stream on the directory being renamed. This patch refines the check to better follow these rename semantics.
2009-07-20s3: Separate out a new file: filename_utils.cTim Prouty1-9/+0
This is to ease the linking pain of everything that links LOCKING_OBJ
2009-07-20s3: Change fsp->fsp_name to be an smb_filename struct!Tim Prouty1-15/+58
2009-07-20s3: Change file_structs to be allocated with talloc instead of mallocTim Prouty1-10/+15
2009-05-18Add "file_walk_table" to do stuff with all open filesVolker Lendecke1-0/+22
2009-04-16Add notify_onelevel.tdbVolker Lendecke1-0/+4
This optimizes non-recursive notifys. For non-recursive notifies we can use a per-directory file-id indexed notify record. This matters for the Windows Explorer and IIS cases which do not use recursive notifies. In these cases, we do not have to shuffle around the whole notify record on every change. For the cluster case, this improves correctness of the notifies, ctdb only distributes the tdb seqnum once a second, so we can lose notifies.
2009-02-26Make us pass the RAW-RENAME torture test I just added.Jeremy Allison1-0/+43
Inside a directory, keep a file open and then renaming the directory should fail with ACCESS_DENIED. Jeremy.
2009-01-08s3:smbd: move all globals and static variables in globals.[ch]Stefan Metzmacher1-17/+1
The goal is to move all this variables into a big context structure. metze
2008-11-21First part of fix for bug #5903 - vfs_streams_xattr breaks contents of the file.Jeremy Allison1-41/+33
Restructures parts of open code so that fsp must be allocated before calling open_file_ntcreate(_internal). Also fix up file ref-counting inside files.c. Jeremy.
2008-10-25Remove "pipe_handle_offset" -- pipes now use "struct files_struct"Volker Lendecke1-5/+0
2008-10-13Remove the chain_fsp globalVolker Lendecke1-19/+9
2008-10-13Pass struct smb_request to file_freeVolker Lendecke1-4/+4
on the way to get rid of chain_fsp
2008-10-13Pass struct smb_request to file_newVolker Lendecke1-7/+6
Goal is to remove the chain_fsp global variable
2008-10-13Pass struct smb_request to file_fspVolker Lendecke1-1/+1
The goal is to get rid of the chain_fsp global variable
2008-10-09Remove a pointless level of indirectionVolker Lendecke1-3/+1
2008-09-26Second part of the fix for bug #5790 - samba returns ↵Jeremy Allison1-4/+6
STATUS_OBJECT_NAME_NOT_FOUND on set file disposition call. This was my fault. I use a singleton cache (positive and negative) to speed up pathname based qfileinfo/setfileinfo lookups for alternate fsp's open on the same path. I only invalidated the negative cache on adding a new file fsp, as I incorrectly imagined the new fsp was put at the *end* of the open files list. DLIST_ADD puts it at the start, meaning any subsequent open wasn't seen once the cache was set. Doh ! Jeremy.
2008-09-24Fix bug #5790 samba returns STATUS_OBJECT_NAME_NOT_FOUND on set file ↵Jeremy Allison1-4/+2
disposition. We were checking that fd != -1 in file_find_di_XXX calls which is no longer needed due to a change in internal semantics. Jeremy.
2008-05-02Remove the "stat_open()" function, flag, and all associated code. It was onlyJeremy Allison1-1/+0
being (correctly) used in the can_read/can_write checks for hide unreadable/unwritable and this is more properly done using the functions in smbd/file_access.c. Preparing to do NT access checks on all file access. Jeremy. (This used to be commit 6bfb06ad95963ae2acb67c4694a98282d3b29faa)
2008-04-07smbd: implement the strange write time update logicStefan Metzmacher1-26/+3
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 (This used to be commit 2eab212ea2e1bfd8fa716c2c89b2c042f7ba12ea)
2007-12-19Release per-fsp data on file closure.James Peach1-0/+5
(This used to be commit 9fead46b54519b3df78a869dbc99207046587d6a)
2007-10-10[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter1-0/+1
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
2007-10-10r25055: Add file_id_string_tosVolker Lendecke1-2/+2
This removes file_id_string_static and file_id_string_static2 (This used to be commit 638c848c9afe374feb30e34c494f89b2a6c64f7b)
2007-10-10r24102: Pass the fid instead of inbuf and an offset to file_fsp.Volker Lendecke1-6/+2
This removes the buf==NULL condition in file_fsp(), but wherever it is called we do have a buffer anyway. Volker (This used to be commit d70a1f82fed64fa332f16407bea7c6671f48c59a)
2007-10-10r23996: One more constVolker Lendecke1-1/+1
(This used to be commit a54fa551a4b9ffe3f29b339a54e563cdfe924959)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23589: Ensure we will always release any timeout handlerJeremy Allison1-0/+3
on fsp close or removal of oplock. Mulitple removals are safe. Jeremy. (This used to be commit 6de0970704b3eff2b71e6bf499c6dda45d4d5e2d)
2007-10-10r23510: Tidy calls to smb_panic by removing trailing newlines. Print theJames Peach1-1/+1
failed expression in SMB_ASSERT. (This used to be commit 171dc060e2a576d724eed1ca65636bdafffd7713)
2007-10-10r23183: Check in a change made by Tridge:Volker Lendecke1-27/+21
This replaces the internal explicit dev/ino file id representation by a "struct file_id". This is necessary as cluster file systems and NFS don't necessarily assign the same device number to the shared file system. With this structure in place we can now easily add different schemes to map a file to a unique 64-bit device node. Jeremy, you might note that I did not change the external interface of smb_share_modes.c. Volker (This used to be commit 9b10dbbd5de8813fc15ebbb6be9b18010ffe8139)
2007-10-10r21714: Change the VFS interface to use struct timespecJeremy Allison1-3/+3
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. (This used to be commit 8f3d530c5a748ea90f42ed8fbe68ae92178d4875)
2007-10-10r21319: Remove functions not needed anymoreVolker Lendecke1-44/+0
(This used to be commit 0c8a364aec68bc7338d034b6f8223ec4085c9e07)
2007-10-10r21279: Get rid of 'aio write behind', this is broken.Volker Lendecke1-1/+0
It should probably better be integrated with our write cache. Volker (This used to be commit 58bfd168b046a97a895aaa3384fd7af8d077a1d5)
2007-10-10r21092: Ok, that's the one that activates the Samba4 notify backend.Volker Lendecke1-1/+4
Now to clean up / fix lots of stuff. Volker (This used to be commit 9e7443fa1417c01be903b15073825dc4def78d99)
2007-10-10r20854: Ok, now I think we're at a point where looking at notify starts to ↵Volker Lendecke1-0/+46
make sense again :-) Volker (This used to be commit 5533cdeec1b0cdee39b1d89e2320587dc9281ee6)
2007-10-10r20634: A *LOT* more work is necessary before touching notify remotely ↵Volker Lendecke1-46/+0
starts to make sense. Until then, remove it from the tree to keep the diff between 3_0_24 and 3_0 small. Volker (This used to be commit f146a85e74c84e78a11e616a1cbeaeef4693a0e0)
2007-10-10r20442: Slight rewrite of the change notify infrastructure. This now ↵Volker Lendecke1-24/+33
survives the first of the raw-notify subtests, the one-level test_notify_dir without any flags around yet. The tricky part was getting the data structures right, I hope the next tests don't let that fall over. fsp->notify is now by default NULL, meaning that nobody has issued a changenotify call. This means nobody is interested in changes for this directory. If that has happened, notify_change_buf collects the changes if no current request is outstanding, and it collects the requests if no change has happened since the last request. Happy New Year, somewhere on this planet it's already 2007 :-) Volker P.S: Jeremy, there's a question for you in smbd/files.c line 367. (This used to be commit ce0ad24988075465addcac0b9afc872e909135af)
2007-10-10r20394: This is a *VERY* early start of my work on notify.Volker Lendecke1-0/+37
Checking in because Jeremy was bugging me. Potentially this becomes quite intrusive, I'm not sure if I should open a temporary branch for this. Jeremy, Jerry, do you think 3_0 is the right place for this? Volker (This used to be commit bcf5c751cbe203c00814642e26440cf88f300bce)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-26/+44
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r15817: Remove some unused codeVolker Lendecke1-20/+0
(This used to be commit 72f103708d17aa86e09fa7a02699f969f7ee9190)
2007-10-10r15668: DOS or FCB opens share one share mode entry from differentJeremy Allison1-4/+4
fsp pointers. Ensure we cope with this to pass Samba4 DENY tests (we used to pass these, there must have been a regression with newer code). We now pass them. Jeremy (This used to be commit fd6fa1d4eaf61783df74ee2da50d331477f06998)
2007-10-10r14460: SMBexit closes by pid and vuid. Tested with smbtorture.Jeremy Allison1-3/+3
Jeremy. (This used to be commit 71e81580421225d5b35a25d46a7b6064a826685c)
2007-10-10r13293: Rather a big patch I'm afraid, but this should fix bug #3347Jeremy Allison1-3/+3
by saving the UNIX token used to set a delete on close flag, and using it when doing the delete. libsmbsharemodes.so still needs updating to cope with this change. Samba4 torture tests to follow. Jeremy. (This used to be commit 23f16cbc2e8cde97c486831e26bcafd4ab4a9654)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-21/+12
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)