summaryrefslogtreecommitdiff
path: root/source3/smbd/vfs-wrap.c
AgeCommit message (Collapse)AuthorFilesLines
2004-01-06Patch based on work from James Peach <jpeach@sgi.com> to convert over toJeremy Allison1-120/+200
using pread/pwrite. Modified a little to ensure fsp->pos is correct. Fix for #889. Jeremy. (This used to be commit 019aaaf0df091c3f67048f591e70d4353a02bb9b)
2003-11-21Fix for rename across filesystems. Noticed by Rainer Link ↵Jeremy Allison1-5/+95
<link@foo.fh-furtwangen.de>. Jeremy. (This used to be commit 598d9d3e5f612133e0528a1a8907745d715b61ed)
2003-08-07Shadow copy API - Original work by "Ken Cross" <kcross@nssolutions.com>, adaptedJeremy Allison1-30/+36
into a patch by "Stefan (metze) Metzmacher" <metze@metzemix.de>. Jeremy. (This used to be commit ce5c91d35dabc5ff6fb3df2b259ed186d6a7e0da)
2003-06-06Added EA operations to VFS layer.Jeremy Allison1-0/+64
Jeremy. (This used to be commit 024de9213e414659296cb518a6753e510c64f614)
2003-05-29Change get_nt_acl() to include security_info wanted. Only return this.Jeremy Allison1-4/+4
This gets us closer to W2k+ in what we return for file ACLs. Fix horribly broken make_sec_desc() that screwed up the size when given a SD with no owner or group (how did it get this bad... ?). Jeremy. (This used to be commit 183c9ed4052ab14e269ed1234ca557053f77e77a)
2003-05-14Evolve quotas configure check more. Patch from Stefan (metze) Metzemacher. ↵Alexander Bokovoy1-2/+12
Now we are defaulting to --with-quotas=no but anyway trying to test them in configure. This is done to get information about as much quota API variations as possible -- when --with-quotas=no this does not affect build but provides us with more detailed information on build farm. (This used to be commit 3786695c72e6ff6a52a527382ac77142e236971b)
2003-05-14Prefix VFS API macros with SMB_ for consistency and to avoid problems with ↵Alexander Bokovoy1-13/+13
VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out (This used to be commit c2689ed118b490e49497a76ed6a2251262018769)
2003-05-12Fix obvious compiler warnings.Jeremy Allison1-1/+0
Jeremy. (This used to be commit 2a6d0c2481c3c34351e57c30a85004babdbf99b0)
2003-05-12Eliminate NULL pointers from VFS interface. All hooks now really callable, ↵Alexander Bokovoy1-6/+14
producing either correct result or returning error if the feature isn't supported in the configuration (This used to be commit af0a17349e6986eef2e2fd07b4b9f0bcd33bbe1f)
2003-05-12Add NT quota support. Patch from Stefan (metze) MetzemacherAlexander Bokovoy1-6/+14
1. Allows to change quota settings for shared mount points from Win2K and WinXP from Explorer properties tab 2. Disabled by default and when requested, will be probed and enabled only on Linux where it works 3. Was tested for approx. two weeks now on Linux by two independent QA teams, have not found any bugs so far Documentation to follow (This used to be commit 4bf022ce9e45be85609426762ba2644ac2031326)
2003-05-11Fix VFS layer:Alexander Bokovoy1-83/+93
1. Finally work with cascaded modules with private data storage per module 2. Convert VFS API to macro calls to simplify cascading 3. Add quota support to VFS layer (prepare to NT quota support) Patch by Stefan (metze) Metzemacher, with review of Jelmer and me Tested in past few weeks. Documentation to new VFS API for third-party developers to follow (This used to be commit 91984ef5caa2d13c5d52e1f535bd3bbbae1ec978)
2003-05-07Make fchown, fchmod conditional for systems that don't have them.Jeremy Allison1-5/+16
Jeremy. (This used to be commit cf78b1e7fe72aec72d03c86c46a8ca49df539c11)
2002-09-25sync'ing up for 3.0alpha20 releaseGerald Carter1-0/+15
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-2/+2
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-03-20Remove the "stat open" code - make it inline. This should fix theJeremy Allison1-2/+4
bugs with opening and renaming mp3 files, also the word rename problems that people have had for a while. Needs a make clean :-) make. Also added JohnR's printing fix. Jeremy. (This used to be commit 504e5ef0494c54efbd0357e334cb2aa5a9eb9c14)
2002-03-19Sync up vfs changes from 2.2.x.Jeremy Allison1-156/+10
Jeremy. (This used to be commit ad1e858d8e72adf924ff435eab8da3e60842e2e6)
2002-03-12Added POSIX ACL layer into the vfs.Jeremy Allison1-3/+113
Jeremy. (This used to be commit 7d59445b6962547a8938928a9371651a09e26516)
2002-03-11Implemented default ACL patch (set inherit acls = true on a per share basis).Jeremy Allison1-7/+11
Based on code donated by Olaf Fr±czyk <olaf@cbk.poznan.pl>. Further commit will change to sending via vfs interface. Jeremy. (This used to be commit d85133e2697eb22f1573c78447b57791ae63dd6b)
2002-03-02Fix lseek-on-pipe problem in VFS (where it belongs IMHO).Jeremy Allison1-5/+18
Jeremy. (This used to be commit ebef2e7bc87fcbae794426c39044a7d23f43722d)
2002-02-27Fixed usage of uninitialised variable in strict_allocate_ftruncate()Tim Potter1-1/+3
(This used to be commit b1d56956fec0de0e8591d85eb5eeec939494e6d4)
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-29Fix "strict allocate" to write the data out on ftruncate with extend.Jeremy Allison1-8/+70
Jeremy. (This used to be commit 48fc42c7104d118bd43c80c801866ebd03be1638)
2002-01-10Getting ready to add UNIX extensions in HEAD also.Jeremy Allison1-0/+30
Jeremy (This used to be commit 6210d4aa196c944e47076e316980f76ac9c6b02d)
2001-09-05merge profile data changes from 2.2Herb Lewis1-6/+36
(This used to be commit c105859304e93297fa29f346e9cbd1af0c95048b)
2001-09-04Merge of transfer file code from 2.2, fix for readbraw.Jeremy Allison1-2/+2
Jeremy. (This used to be commit c05e79453655abb67fd47a2d3dba88b4c5377e35)
2001-07-05this fixes the failure of MS office on VFAT partitions on LinuxAndrew Tridgell1-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? (This used to be commit 970236ee9926b64c0b39bd8a36b2a9317206873c)
2001-07-04The big character set handling changeover!Andrew Tridgell1-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. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-06-29Ensured all the system calls in msdfs.c go through the vfs layer.Jeremy Allison1-0/+32
Added vfs calls to symlink() and readlink() with appropriate configure checks. Jeremy. (This used to be commit c24e6b41ea60ab4bac2fcd19da947851d6df3c7c)
2001-04-14configure:Jeremy Allison1-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. (This used to be commit 32397e5bc6d995ce7ca37c82d6aedc1e5b1b6fbd)
2001-03-26smbd/posix_acls.c: Saving and restoring errno here is the wrong place. Moved itJeremy Allison1-1/+7
to the places where [f]chmod_acl is called instead. Jeremy. (This used to be commit 641ada44ae6429761c1fd0dbcafabc69f897fac7)
2001-03-11Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison1-3/+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-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. (This used to be commit 2844ec3d511680609d6794b8718001a1bda9e89f)
2000-12-08Fixed compiler warning.Jeremy Allison1-2/+2
Jeremy. (This used to be commit e6a1a1e444631f0d674f33b5b8d1d71435de0511)
2000-12-08Added OLD_NTDOMAIN to remove warnings about undefined functions.Jeremy Allison1-0/+2
Jeremy. (This used to be commit f4c32a75e6e60eae6078449478d04ff22373d817)
2000-12-06Fixed compiler warning.Tim Potter1-2/+2
(This used to be commit 5e81151e53300a8c58adca09d02d0b075a13c322)
2000-11-16Ok - fixed a bug in our levelII oplock code. We need to break a level II onJeremy Allison1-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. (This used to be commit 213cd0b5192307cd4b0026cae94b2f52fb1b0c02)
2000-10-06Herb's warning fixes. Also the POSIX locking fix.Jeremy Allison1-5/+106
We now use our own vfs layer to do get/set acl calls (hurrah!). Jeremy. (This used to be commit dfe77c7046cbd65ee52aea7439f21503c1eac41d)
2000-10-06Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison1-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. (This used to be commit b07611f8159b0b3f42e7e02611be9f4d56de96f5)
2000-10-05Vector get_nt_acl/set_nt_acl via vfs. POSIX ACL support should be addedJeremy Allison1-11/+1
above this layer. Jeremy. (This used to be commit b90af886a951b7b049ed7a42e6d99c332e43897b)
2000-09-27Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector themJeremy Allison1-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. (This used to be commit f96625ec124adb6e110dc54632e006b3620a962b)
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)