summaryrefslogtreecommitdiff
path: root/source3/smbd/vfs-wrap.c
AgeCommit message (Collapse)AuthorFilesLines
2000-05-02Moved uglyness needed in fcntl locking (64->32 bit mapping, NFSJeremy Allison1-0/+5
errors etc.) into locking/posix.c, where it is needed. fcntl_lock in lib/util.c is now very small and clean. Added (*lock) op to vfs layer. Jeremy. (This used to be commit 46092ee1410faa4e3c143d80a960a8adaa19d7fc)
2000-04-22This is a *big* checkin that may break some things, but implements theJeremy Allison1-0/+8
new open mechanism Andrew & I discussed. config.sub: configure: Included the QNX patch. include/vfs.h: smbd/vfs-wrap.c: smbd/vfs.c: Added ftruncate vfs call (needed). Note that we will also need locking calls in the vfs (to be added). lib/util_unistr.c: nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump. Also fix for sidsize DOS bug. locking/locking.c: Check value of ret before using it for memdup. printing/printing.c: Convert print_fsp_open to return an allocated fsp. rpc_server/srv_lsa.c: Fix for NT domain logons. I have removed all use of lp_share_modes() from the code (although I left the parameter in the table for backwards compatibility). It no longer makes sense for this to exist. smbd/close.c: Removed lp_share_modes(). smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code. smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail. smbd/nttrans.c: smbd/reply.c: smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. smbd/open.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. In addition I have fixed a long standing race condition in the deny mode processing w.r.t. two smbd's creating a file. Andrew, please note that your original idea of using open with O_EXCL in this case would not work (I went over the races very carefully) and so we must re-check deny modes *after* the open() call returns. This is because there is a race between the open with O_EXCL and the lock of the share mode entry. Imagine the case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL, but is pre-empted before it locks the share modes and creates the deny mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY and a deny mode of DENY_NONE and the two opens would be allowed. The *only* way to fix this race is to lock the share modes after the open and then do the deny mode checks *after* this lock in the case where the file did not originally exist. This code will need extensive testing but seems to initially work. Jeremy. (This used to be commit ab0ecc39d688f16b9692fe90b991f0b89287070a)
2000-04-04Change to vfs API. POSIX states fsync should return an int, not a void.Jeremy Allison1-2/+6
Jeremy. (This used to be commit 6c442d68afae4140e28b770343a900b5ce510b4a)
2000-02-03Comments to use vfs_* functions instead of dos_* unless reallyTim Potter1-0/+295
accessing files on local disk. (This used to be commit b55f63da7e6a3c306ce668c77ed63a41d33240db)
1999-12-132nd phase of head branch sync with SAMBA_2_0 - this delets all the files ↵Andrew Tridgell1-304/+0
that were in the head branch but weren't in SAMBA_2_0 (This used to be commit d7b208786590b5a28618590172b8d523627dda09)
1999-05-06Fix compiler warning.Tim Potter1-3/+104
Added checks to panic if VFS functions are passed NULL pointers. This may expose some bugs that have been lurking about. Checks can be easily removed later. (This used to be commit c33c6330e3a2025f2fda0234635dfdd3acd04890)
1999-04-20Added dummy connect and disconnect VFS operations to avoid theTim Potter1-2/+17
possibilty of NULL function pointers being called. Changed arguments to fsync() function to break dependency on connection_struct. (This used to be commit f6d0b55e92cc5250dc65f65c8689bf96cf7001df)
1999-04-08Always do a compile before CVS commit! )-:Tim Potter1-1/+1
(This used to be commit 0f37e900fa0744573754796916abf967fee05ea2)
1999-04-08Forgot about closedir() function for VFS. Hoo embarassing.Tim Potter1-0/+8
(This used to be commit c1cbe07c0391c36066b068fdd42bf1aa40259a5c)
1999-04-05Under IRIX, a void function may return a value, even if that value isTim Potter1-1/+1
void! (This used to be commit e15da6882426edd39ff7fdcd47f1be30c053d4ec)
1999-04-04Wrapped up all VFS disk I/O functions for portability. I rememberTim Potter1-0/+180
tridge telling me why this needed to be done but I have since forgotten. (-: (This used to be commit 6e607ef760bd2c0eb3ac31252601ab30de626270)