summaryrefslogtreecommitdiff
path: root/source3/smbd/vfs.c
AgeCommit message (Collapse)AuthorFilesLines
2002-07-30always include the (void) for void fns ...Andrew Tridgell1-1/+1
(This used to be commit deff1f96232b328fb5f5bb49a23eb4cda11fd330)
2002-07-30OK!Simo Sorce1-36/+111
Finally the cascaded VFS patch is in. Testing is very welcome, specially with layered multiple vfs modules. A big thank to Alexander Bokovoy for his work and patience :) Simo. (This used to be commit 56283601afe1836dafe0580532f014e29593c463)
2002-07-01used findstatic.pl to make some variables static and remove some deadAndrew Tridgell1-3/+3
code (This used to be commit 91ad9041e9507d36eb3f40c23c5d4df61f139ef0)
2002-05-17Get the sco boxes compiling again - use the sys_ intefaces for all the dl*Andrew Bartlett1-1/+1
funcitons. (This used to be commit c37c1e39253d9d21f8ab38ab8d24f7e787008596)
2002-03-27Removed HAVE_LIBDL from most places (except system.c). Added checks forJeremy Allison1-228/+194
dlopen & friends into configure.in. This should help building on *BSD where dl*** calls are in libc. Jeremy (This used to be commit ac1baba35d7a399bf800ced49a4384e39955e3eb)
2002-03-19Sync up vfs changes from 2.2.x.Jeremy Allison1-24/+28
Jeremy. (This used to be commit ad1e858d8e72adf924ff435eab8da3e60842e2e6)
2002-03-12Missing comma from systems that have ACLs.Jim McDonough1-1/+1
(This used to be commit 96e4282dca757e8621d23a54fb7203c93d2d41fc)
2002-03-12Added POSIX ACL layer into the vfs.Jeremy Allison1-1/+24
Jeremy. (This used to be commit 7d59445b6962547a8938928a9371651a09e26516)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-20Attempt to fix bugs in write cache code (yes I know it's going away :-).Jeremy Allison1-0/+2
Jeremy. (This used to be commit ccda82b457b11ec683f404c9059b02c1214a0fd1)
2002-01-10Getting ready to add UNIX extensions in HEAD also.Jeremy Allison1-0/+2
Jeremy (This used to be commit 6210d4aa196c944e47076e316980f76ac9c6b02d)
2002-01-04Re-wrote the guts of the rename_internals code to cope with a reportedJeremy Allison1-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. (This used to be commit e6b27f3d8069ae304baaebe09341c58d46b05fe4)
2001-11-12Don't check space on every extend if strict allocate not set.Jeremy Allison1-5/+3
Jeremy (This used to be commit 9391efb38ef1847ed2c3b2734c1177830d64a247)
2001-11-12Fixed allocation bug in database prog. Some format fixes.Jeremy Allison1-43/+28
Jeremy. (This used to be commit 9ff6b0c20cc88ef0bcd62a596fcb96f898b5b29d)
2001-11-07Added debug in truncate, fixed warning with gcc3.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 970ec14b4ba1ccf66820384ced8442e1878c09cd)
2001-10-24Made default vfs ops static so we can use this symbol in actual modules.Tim Potter1-1/+1
(This used to be commit 398ced6eef7e52441ddc59fef70e4a50a96a73b7)
2001-10-18Renamed vfs_init() to smbd_vfs_init() to allow vfs modules to compile.Tim Potter1-3/+3
(This used to be commit 7c3542ba8764be48b88255dd7f73ea6d87be10ac)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-2/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-09-17move to SAFE_FREE()Simo Sorce1-1/+1
(This used to be commit a95943fde0ad89ae3f2deca2f7ba9cb5ab612b74)
2001-09-04Merge of transfer file code from 2.2, fix for readbraw.Jeremy Allison1-80/+16
Jeremy. (This used to be commit c05e79453655abb67fd47a2d3dba88b4c5377e35)
2001-08-24get rid of compiler warningsHerb Lewis1-1/+1
(This used to be commit 0768991d04ea03e774ca8662c9cae5e1951b88e0)
2001-08-07Correctly report amount written in debug when allocation space.Jeremy Allison1-1/+1
Jeremy. (This used to be commit d1e7cf6073f2dcb91ec468f5f249610dd9f1623a)
2001-08-06Fix for getting allocate_file_space to return the correct errno.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 298595e8cb0ac4f5b5ad9a522cca79d030d7e0fc)
2001-08-04Extra debug to see what errno is on write fail.Jeremy Allison1-0/+2
Jeremy. (This used to be commit 352a02bf5c1b3ab9db92f86fd22f7a781a2c2996)
2001-08-01Added "strict allocate" per share parameter. This causes actual on-disk ↵Jeremy Allison1-2/+79
allocation to be done. Without it just does the ftruncate. Jeremy. (This used to be commit 0b052f103e82369088bc30724b86d8892c395cdb)
2001-07-06Wrapped dlerror() in the same way as the other dlxxx() calls.Jeremy Allison1-1/+1
Jeremy. (This used to be commit ed5a1f70c6d155788b62e9e6e8c5d97a5ca0858d)
2001-07-04strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell1-1/+1
can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
2001-07-04The big character set handling changeover!Andrew Tridgell1-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. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-06-29Ensured all the system calls in msdfs.c go through the vfs layer.Jeremy Allison1-104/+109
Added vfs calls to symlink() and readlink() with appropriate configure checks. Jeremy. (This used to be commit c24e6b41ea60ab4bac2fcd19da947851d6df3c7c)
2001-04-14configure:Jeremy Allison1-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. (This used to be commit 32397e5bc6d995ce7ca37c82d6aedc1e5b1b6fbd)
2001-03-26smbd/posix_acls.c: Sync up with 2.2 changes - don't return deny ACE's.Jeremy Allison1-0/+5
smbd/vfs.c: Don't call [f]chmod_acl if no acl support. Jeremy. (This used to be commit 83f52394e688b4be3ac4cef67d8980a5b8ed3192)
2001-03-19Added sys_dlopen/sys_dlsym/sys_dlclose.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 49f0e7e7143f82bce9dfd8b06e9e515bc0869ab7)
2001-03-11Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison1-2/+0
RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
2001-01-23include/vfs.h:Jeremy Allison1-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. (This used to be commit 2844ec3d511680609d6794b8718001a1bda9e89f)
2000-12-08Added OLD_NTDOMAIN to remove warnings about undefined functions.Jeremy Allison1-0/+2
Jeremy. (This used to be commit f4c32a75e6e60eae6078449478d04ff22373d817)
2000-11-16Ok - fixed a bug in our levelII oplock code. We need to break a level II onJeremy Allison1-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. (This used to be commit 213cd0b5192307cd4b0026cae94b2f52fb1b0c02)
2000-11-14Merge from appliance head of JR's changes for driver versioning.Jeremy Allison1-36/+61
Jeremy. (This used to be commit cdbd2e99775642dc2e92004be9014bf38a92d80f)
2000-11-06Added a VFS version return to init call. Allows smbd to fail an init ifJeremy Allison1-8/+14
versions don't match. Jeremy. (This used to be commit d0fbb4f5d999abade8930cc6fff231a2af6cccfb)
2000-10-19Ok - this is a big patch - and it may break smbd a bit (althoughJeremy Allison1-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. (This used to be commit 66a5c05ec46b641224fbe01b30bd7e83571a2a1b)
2000-10-06Herb's warning fixes. Also the POSIX locking fix.Jeremy Allison1-40/+40
We now use our own vfs layer to do get/set acl calls (hurrah!). Jeremy. (This used to be commit dfe77c7046cbd65ee52aea7439f21503c1eac41d)
2000-10-06Inlined many of the vfs_XXX calls as macros for speed.Jeremy Allison1-63/+0
Jeremy. (This used to be commit 0811d080abd374f47c7c3c8a1ef007e443e5b79c)
2000-10-06Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison1-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. (This used to be commit b07611f8159b0b3f42e7e02611be9f4d56de96f5)
2000-10-05Vector get_nt_acl/set_nt_acl via vfs. POSIX ACL support should be addedJeremy Allison1-5/+38
above this layer. Jeremy. (This used to be commit b90af886a951b7b049ed7a42e6d99c332e43897b)
2000-10-03utf-8 and EUC3 patch from Hiroshi Miura Samba User Group Japan staff.Jeremy Allison1-0/+24
mkdir high bits patch from Robert Dahlem" <Robert.Dahlem@gmx.net>. jeremy. (This used to be commit b40191d27180ab1e59935086073c4d312552f717)
2000-09-27Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector themJeremy Allison1-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. (This used to be commit f96625ec124adb6e110dc54632e006b3620a962b)
2000-08-30Added vfs_unlink call to ensure vfs is used on unlink from client.Jeremy Allison1-0/+9
Jeremy. (This used to be commit 38fc56c8434c427335cf264c4b27420c5ad47566)
2000-07-10Fixes for various compile warnings on Solaris 8.Tim Potter1-1/+3
(This used to be commit 898a483cdab1ed7d8ff902c0dc0e0620440ae4cd)
2000-05-05Fix for dual unix_to_dos conversion in readdir from A.V.Shutko ↵Jeremy Allison1-1/+0
<AVShutko@mail.khstu.ru> Jeremy. (This used to be commit 1152f2ed008dbfa7e2b1cb9719d31575e7d05b89)
2000-05-02Moved uglyness needed in fcntl locking (64->32 bit mapping, NFSJeremy Allison1-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 used to be commit 46092ee1410faa4e3c143d80a960a8adaa19d7fc)
2000-04-22This is a *big* checkin that may break some things, but implements theJeremy Allison1-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. (This used to be commit ab0ecc39d688f16b9692fe90b991f0b89287070a)