summaryrefslogtreecommitdiffstats
path: root/source/smbd/vfs.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.
* Attempt to fix bugs in write cache code (yes I know it's going away :-).Jeremy Allison2002-01-201-0/+2
| | | | Jeremy.
* Getting ready to add UNIX extensions in HEAD also.Jeremy Allison2002-01-101-0/+2
| | | | Jeremy
* Re-wrote the guts of the rename_internals code to cope with a reportedJeremy Allison2002-01-041-3/+20
| | | | | | | bug (renaming name -> name was failing, on W2K it succeeds). Simplified the common case, did a lot of work to ensure NT error codes are correctly reported back to client. Jeremy.
* Don't check space on every extend if strict allocate not set.Jeremy Allison2001-11-121-5/+3
| | | | Jeremy
* Fixed allocation bug in database prog. Some format fixes.Jeremy Allison2001-11-121-43/+28
| | | | Jeremy.
* Added debug in truncate, fixed warning with gcc3.Jeremy Allison2001-11-071-0/+1
| | | | Jeremy.
* Made default vfs ops static so we can use this symbol in actual modules.Tim Potter2001-10-241-1/+1
|
* Renamed vfs_init() to smbd_vfs_init() to allow vfs modules to compile.Tim Potter2001-10-181-3/+3
|
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
|
* move to SAFE_FREE()Simo Sorce2001-09-171-1/+1
|
* Merge of transfer file code from 2.2, fix for readbraw.Jeremy Allison2001-09-041-80/+16
| | | | Jeremy.
* get rid of compiler warningsHerb Lewis2001-08-241-1/+1
|
* Correctly report amount written in debug when allocation space.Jeremy Allison2001-08-071-1/+1
| | | | Jeremy.
* Fix for getting allocate_file_space to return the correct errno.Jeremy Allison2001-08-061-2/+2
| | | | Jeremy.
* Extra debug to see what errno is on write fail.Jeremy Allison2001-08-041-0/+2
| | | | Jeremy.
* Added "strict allocate" per share parameter. This causes actual on-disk ↵Jeremy Allison2001-08-011-2/+79
| | | | | | | allocation to be done. Without it just does the ftruncate. Jeremy.
* Wrapped dlerror() in the same way as the other dlxxx() calls.Jeremy Allison2001-07-061-1/+1
| | | | Jeremy.
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-1/+1
| | | | can't redefine them. damn.
* The big character set handling changeover!Andrew Tridgell2001-07-041-163/+39
| | | | | | | 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-104/+109
| | | | | | Added vfs calls to symlink() and readlink() with appropriate configure checks. Jeremy.
* configure:Jeremy Allison2001-04-141-0/+10
| | | | | | | | | | | | | | | | | | | | | | 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: Sync up with 2.2 changes - don't return deny ACE's.Jeremy Allison2001-03-261-0/+5
| | | | | smbd/vfs.c: Don't call [f]chmod_acl if no acl support. Jeremy.
* Added sys_dlopen/sys_dlsym/sys_dlclose.Jeremy Allison2001-03-191-2/+2
| | | | Jeremy.
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-2/+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-1/+11
| | | | | | | | | | | | | 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.
* Added OLD_NTDOMAIN to remove warnings about undefined functions.Jeremy Allison2000-12-081-0/+2
| | | | Jeremy.
* Ok - fixed a bug in our levelII oplock code. We need to break a level II onJeremy Allison2000-11-161-0/+18
| | | | | | | | | 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.
* Merge from appliance head of JR's changes for driver versioning.Jeremy Allison2000-11-141-36/+61
| | | | Jeremy.
* Added a VFS version return to init call. Allows smbd to fail an init ifJeremy Allison2000-11-061-8/+14
| | | | | versions don't match. Jeremy.
* Ok - this is a big patch - and it may break smbd a bit (althoughJeremy Allison2000-10-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | I hope not). If you encounter strange file-serving behavior after this patch then back it out. I analysed our stat() usage and realised we were doing approx. 3 stat calls per open, and 2 per getattr/setattr. This patch should fix all that. It causes the stat struct returned from unix_convert() (which now *must* be passed a valid SMB_STRUCT_STAT pointer) to be passed through into the open code. This should prevent the multiple stats that were being done so as not to violate layer encapsulation in the API's. Herb - if you could run a NetBench test with this code and do a padc/par syscall test and also run with the current 2.2.0 code and test the padc/par syscalls I'd appreciate it - you should find the number of stat calls reduced - not sure by how much. The patch depends on unix_convert() actually finding the file and returning a stat struct, or returning a zero'd out stat struct if the file didn't exist. I believe we can guarentee this to be the case - I just wasn't confident enough to make this an assertion before. Ok ok - I did write this whilst at the Miami conference..... sometimes you get a little free time at these things :-). Jeremy.
* Herb's warning fixes. Also the POSIX locking fix.Jeremy Allison2000-10-061-40/+40
| | | | | We now use our own vfs layer to do get/set acl calls (hurrah!). Jeremy.
* Inlined many of the vfs_XXX calls as macros for speed.Jeremy Allison2000-10-061-63/+0
| | | | Jeremy.
* Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison2000-10-061-30/+32
| | | | | | | | | | | | | | | 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-5/+38
| | | | | above this layer. Jeremy.
* utf-8 and EUC3 patch from Hiroshi Miura Samba User Group Japan staff.Jeremy Allison2000-10-031-0/+24
| | | | | mkdir high bits patch from Robert Dahlem" <Robert.Dahlem@gmx.net>. jeremy.
* Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector themJeremy Allison2000-09-271-25/+388
| | | | | | | 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.
* Added vfs_unlink call to ensure vfs is used on unlink from client.Jeremy Allison2000-08-301-0/+9
| | | | Jeremy.
* Fixes for various compile warnings on Solaris 8.Tim Potter2000-07-101-1/+3
|
* Fix for dual unix_to_dos conversion in readdir from A.V.Shutko ↵Jeremy Allison2000-05-051-1/+0
| | | | | | <AVShutko@mail.khstu.ru> Jeremy.
* Moved uglyness needed in fcntl locking (64->32 bit mapping, NFSJeremy Allison2000-05-021-2/+7
| | | | | | | 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-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* the bulk of the changes to get rid of fd_ptr and move print openAndrew Tridgell2000-04-101-4/+3
| | | | | | | | | handling to printing/printing.c most of this was just replacing things like fsp->fd_ptr->fd with fsp->fd the changes in open.c are quite dramatic. Most of it is removing all the functions that handled the fd multiplexing
* Fix some compile warnings.Tim Potter2000-02-041-0/+7
|
* Put back lots of missing calls to dos_to_unix(). Thanks toTim Potter2000-02-031-2/+2
| | | | aono@cc.osaka-kyoiku.ac.jp (Tomoki AONO)
* Comments to use vfs_* functions instead of dos_* unless reallyTim Potter2000-02-031-0/+450
| | | | accessing files on local disk.
* 2nd phase of head branch sync with SAMBA_2_0 - this delets all the files ↵Andrew Tridgell1999-12-131-379/+0
| | | | that were in the head branch but weren't in SAMBA_2_0
* Pass VFS options defined in smb.conf to vfs_init() function.Tim Potter1999-07-221-4/+7
|
* Rewrite of VFS initialisation routines.Tim Potter1999-04-201-101/+114
|
* Removed unused vfs_read_data() function at the request of tridge.Tim Potter1999-04-141-49/+0
| | | | Removed unnecessary SSL stuff from vfs_write_data().