summaryrefslogtreecommitdiffstats
path: root/source/smbd/vfs-wrap.c
Commit message (Collapse)AuthorAgeFilesLines
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Fix "strict allocate" to write the data out on ftruncate with extend.Jeremy Allison2002-01-291-8/+70
| | | | Jeremy.
* Getting ready to add UNIX extensions in HEAD also.Jeremy Allison2002-01-101-0/+30
| | | | Jeremy
* merge profile data changes from 2.2Herb Lewis2001-09-051-6/+36
|
* Merge of transfer file code from 2.2, fix for readbraw.Jeremy Allison2001-09-041-2/+2
| | | | Jeremy.
* this fixes the failure of MS office on VFAT partitions on LinuxAndrew Tridgell2001-07-051-30/+29
| | | | | | | | The problem is that ftruncate can't expand on VFAT, but it can on ext2. That means our autoconf test is useless. I have recoded it to use the alternative to ftruncate when then sys_ftruncate fails. Jeremy, do you want this for 2.2.1?
* The big character set handling changeover!Andrew Tridgell2001-07-041-18/+18
| | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation.
* Ensured all the system calls in msdfs.c go through the vfs layer.Jeremy Allison2001-06-291-0/+32
| | | | | | Added vfs calls to symlink() and readlink() with appropriate configure checks. Jeremy.
* configure:Jeremy Allison2001-04-141-1/+40
| | | | | | | | | | | | | | | | | | | | | | configure.in: include/config.h.in: include/profile.h: smbd/vfs-wrap.c: smbd/vfs.c: Added fchmod and fchown to VFS (sorry Gerald - but we needed them anyway). smbd/dosmode.c: smbd/files.c: printing/printfsp.c: smbd/close.c: smbd/open.c: Fixed "dos filemode" correctly so there are no race conditions. Forces test of open of file O_WRONLY before allowing fchmod as root. Afterwards, calls standard close function that preserves POSIX locks due to POSIX-me-harder braindamage. :-). Andrew please review this code. Also - in removing the tmpdir param in smbrun an extra NULL parameter was missed in each print_run_command() call (which is a varargs fn.). Now fixed. Jeremy.
* smbd/posix_acls.c: Saving and restoring errno here is the wrong place. Moved itJeremy Allison2001-03-261-1/+7
| | | | | to the places where [f]chmod_acl is called instead. Jeremy.
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-3/+0
| | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy.
* include/vfs.h:Jeremy Allison2001-01-231-0/+38
| | | | | | | | | | | | | smbd/vfs-wrap.c: smbd/vfs.c: Added fchmod_acl and chmod_acl. lib/substitute.c: smbd/lanman.c: smbd/open.c: smbd/process.c: smbd/reply.c: smbd/service.c: Removed sessetup_user variable. Added current_user_info struct which conatins domain info etc. Added '%D' for client domain parameter. Jeremy.
* Fixed compiler warning.Jeremy Allison2000-12-081-2/+2
| | | | Jeremy.
* Added OLD_NTDOMAIN to remove warnings about undefined functions.Jeremy Allison2000-12-081-0/+2
| | | | Jeremy.
* Fixed compiler warning.Tim Potter2000-12-061-2/+2
|
* Ok - fixed a bug in our levelII oplock code. We need to break a level II onJeremy Allison2000-11-161-4/+64
| | | | | | | | | a byte range lock (write lock only, but Win2k breaks on read lock also so I do the same) - if you think about why, this is obvious. Also fixed our client code to do level II oplocks, if requested, and fixed the code where we would assume the client wanted level II if it advertised itself as being level II capable - it may not want that. Jeremy.
* Herb's warning fixes. Also the POSIX locking fix.Jeremy Allison2000-10-061-5/+106
| | | | | We now use our own vfs layer to do get/set acl calls (hurrah!). Jeremy.
* Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison2000-10-061-27/+25
| | | | | | | | | | | | | | | a conn struct depending on the call. We need this to have a clean NT ACL call interface. This will break any existing VFS libraries (that's why this is pre-release code). Andrew gets credit for this one :-) :-). In addition - added Herb's WITH_PROFILE changes - Herb - please examine the changes I've made to the smbd/reply.c code you added. The original code was very ugly and I have replaced it with a START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor. Please check this compiles ok with the --with-profile switch. Jeremy.
* Vector get_nt_acl/set_nt_acl via vfs. POSIX ACL support should be addedJeremy Allison2000-10-051-11/+1
| | | | | above this layer. Jeremy.
* Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector themJeremy Allison2000-09-271-0/+46
| | | | | | | through the VFS. All file access/directory access code in smbd should now go via the vfs. Added vfs_chown/vfs_chmod calls. Still looking at vfs_get_nt_acl() vfs_set_nt_acl() call API design. Jeremy.
* Moved uglyness needed in fcntl locking (64->32 bit mapping, NFSJeremy Allison2000-05-021-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 is a *big* checkin that may break some things, but implements theJeremy Allison2000-04-221-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.
* Change to vfs API. POSIX states fsync should return an int, not a void.Jeremy Allison2000-04-041-2/+6
| | | | Jeremy.
* Comments to use vfs_* functions instead of dos_* unless reallyTim Potter2000-02-031-0/+295
| | | | accessing files on local disk.
* 2nd phase of head branch sync with SAMBA_2_0 - this delets all the files ↵Andrew Tridgell1999-12-131-304/+0
| | | | that were in the head branch but weren't in SAMBA_2_0
* Fix compiler warning.Tim Potter1999-05-061-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.
* Added dummy connect and disconnect VFS operations to avoid theTim Potter1999-04-201-2/+17
| | | | | | | possibilty of NULL function pointers being called. Changed arguments to fsync() function to break dependency on connection_struct.
* Always do a compile before CVS commit! )-:Tim Potter1999-04-081-1/+1
|
* Forgot about closedir() function for VFS. Hoo embarassing.Tim Potter1999-04-081-0/+8
|
* Under IRIX, a void function may return a value, even if that value isTim Potter1999-04-051-1/+1
| | | | void!
* Wrapped up all VFS disk I/O functions for portability. I rememberTim Potter1999-04-041-0/+180
tridge telling me why this needed to be done but I have since forgotten. (-: