summaryrefslogtreecommitdiff
path: root/source3/include/vfs_macros.h
AgeCommit message (Collapse)AuthorFilesLines
2010-12-02Move posix_fallocate into the VFS where it belongs.Jeremy Allison1-0/+5
Jeremy.
2010-11-20Move the uglyness of #ifdef REALPATH_TAKES_NULL into the vfs_defaultJeremy Allison1-4/+4
module, change the signature of VFS_REALPATH to always return a malloc'ed string. Needed to make some privileges work I plan on doing shortly easier to code. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Nov 20 02:15:50 CET 2010 on sn-devel-104
2010-03-05Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.Jeremy Allison1-4/+8
Ensure we don't use any of the create_options for Samba private use. Add a new parameter to the VFS_CREATE call (private_flags) which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code). Rev. the VFS interface to version 28. Jeremy.
2009-11-18s3: Do not talloc in readdirVolker Lendecke1-4/+4
This is a hot codepath (called from the stat cache)
2009-10-06s3: Add access_mask to the flock VFS callAbhidnya P Chirmule1-4/+4
2009-09-24vfs catia: Fix the double translation that was happening with createfile and ↵Aravind Srinivasan1-4/+4
open. Since the catia translation is implemented for open, it should not also be done in createfile. By removing createfile from catia, translation is now done correctly for the primary open path. In order to support systems that have custom createfile implementations that don't eventually call SMB_VFS_OPEN, SMB_VFS_TRANSLATE_NAME has been expanded to take an additional argument that specifies direction. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-28s3: Add a new VFS op called SMB_VFS_TRANSLATE_NAMEAravind Srinivasan1-0/+8
This vop is designed to work in tandem with SMB_VFS_READDIR to allow vfs modules to make modifications to arbitrary filenames before they're consumed by callers. Subsequently the core directory enumeration code in smbd is now changed to free the memory that may be allocated in a module. This vop enables the new version of catia in the following patch. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-24Second attempt at fix for bug 6529 - Offline files conflict with Vista and ↵Jeremy Allison1-4/+4
Office 2003. Confirmation from reporter that this fixes the issue in master on ext3/ext4. Back-ports to follow. Jeremy.
2009-07-24add my copyright after the VFS rewriteVolker Lendecke1-0/+1
2009-07-24Make the smbd VFS typesafeVolker Lendecke1-394/+557
2009-06-24s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTATTim Prouty1-6/+6
This patch introduces two new temporary helper functions vfs_stat_smb_fname and vfs_lstat_smb_fname. They basically allowed me to call the new smb_filename version of stat, while avoiding plumbing it through callers that are still too inconvenient. As the conversion moves along, I will be able to remove callers of this, with the goal being to remove all callers. There was also a bug in create_synthetic_smb_fname_split (also a temporary utility function) that caused it to incorrectly handle filenames with ':'s in them when in posix mode. This is now fixed.
2009-06-12s3: Plumb smb_filename through SMB_VFS_CREATE_FILETim Prouty1-3/+3
2009-06-02Add SMB_VFS_CONNECTPATH operationVolker Lendecke1-0/+3
This is required for the shadow_copy2 module and "wide links = no". The file system snapshots by nature are typically outside of share directory. So the REALPATH result fails the wide links = no test.
2009-03-13s3: Add strict lock/unlock calls to the vfs layer to replace is_lockedDave Richards1-0/+6
2009-02-19s3: Modify SMB_VFS_FILE_ID_CREATE to take a stat structTim Prouty1-3/+3
Since file_id_create_dev is incompatible with the concept of file_ids, it is now static and in the one file that needs it.
2009-02-13s3 vfs: Fix SMB_VFS_RECVFILE/SENDFILE macrosTim Prouty1-4/+4
2009-02-13Add VFS ops for Windows BRL: Lock, Unlock and Cancel:Zack Kirsch1-0/+9
This patch adds 3 new VFS OPs for Windows byte range locking: BRL_LOCK_WINDOWS, BRL_UNLOCK_WINDOWS and BRL_CANCEL_WINDOWS. Specifically: * I renamed brl_lock_windows, brl_unlock_windows and brl_lock_cancel to *_default as the default implementations of the VFS ops. * The blocking_lock_record (BLR) is now passed into the brl_lock_windows and brl_cancel_windows paths. The Onefs implementation uses it - future implementations may find it useful too. * Created brl_lock_cancel to do what brl_lock/brl_unlock do: set up a lock_struct and call either the Posix or Windows lock function. These happen to be the same for the default implementation. * Added helper functions: increment_current_lock_count() and decrement_current_lock_count(). * Minor spelling correction in brl_timeout_fn: brl -> blr. * Changed blocking_lock_cancel() to return the BLR that it has cancelled. This allows us to assert its the lock that we wanted to cancel. If this assert ever fires, this path will need to take in the BLR to cancel, rather than choosing on its own. * Adds a small helper function: find_blocking_lock_record_by_id(). Used by the OneFS implementation, but could be useful for others.
2009-02-09s3: Added SMB_VFS_INIT_SEARCH_OP to initialize data at the beginning of SMB ↵Steven Danneman1-0/+3
search requests. By default this VFS call is a NOOP, but the onefs vfs module takes advantage of it to initialize direntry search caches at the beginning of each TRANS2_FIND_FIRST, TRANS2_FIND_NEXT, SMBffirst, SMBsearch, and SMBunique
2009-02-09Add an optional SMB_STRUCT_SMB parameter to VFS_OP_READDIRSteven Danneman1-4/+4
* this allows VFS implementations that prefetch stat information on readdir to return it through one VFS call * backwards compatibility is maintained by passing in NULL * if the system readdir doesn't return stat info, the stat struct is set to invalid
2009-01-29s3: Add a new SMB_VFS_GET_ALLOC_SIZE vfs operationTim Prouty1-0/+3
This allows module implementors to customize what allocation size is returned to the client.
2009-01-05Add create_file to vfs_op_namesVolker Lendecke1-1/+1
2008-12-10Pass the get_real_filename operation through the VFSVolker Lendecke1-0/+3
This is done to help file systems that can tell us about the real upper/lower case combination given a case-insensitive file name. The sample I will soon push is the gpfs module (recent gpfs has a get_real_filename function), others might have a similar function to help alleviate the 1million files in a single directory problem. Jeremy, please comment! Thanks, Volker
2008-12-03s3: Change SMB_VFS_CREATE_FILE to take a create_file_flags argumentTim Prouty1-3/+3
This replaces the is_dos_path bool with a more future-proof argument. The next step is to plumb INTERNAL_OPEN_ONLY through this flag instead of overridding the oplock_request.
2008-12-03s3: Add new "is_dos_path" argument to SMB_VFS_CREATE_FILETim Prouty1-3/+3
Now unix paths can be differentiated from windows paths so the underlying create_file implementations can convert paths correctly.
2008-12-03s3: Add SMB_VFS_CREATE_FILE to the vfs layerTim Prouty1-0/+3
Modify all callers of create_file to go through SMB_VFS_CREATE_FILE
2008-12-01s3:vfs: fix FCHMOD_ACL macrosStefan Metzmacher1-3/+3
metze
2008-06-09Fix the compile on NetBSD -- readlink and read are macros thereVolker Lendecke1-6/+6
(cherry picked from commit 435b80a9a2e9324cc20594d922b3d8d6418c27af) (This used to be commit 055bb54fa646f6de7d7b748deaebd69ddeff33d1)
2008-06-07Add STREAMINFO op to vfs_full_auditVolker Lendecke1-1/+1
Fix Coverity ID 552 and 553 (This used to be commit c46e10d2605b22d31675976e62e5ae61d73c8a0a)
2008-05-08Yay ! Remove a VFS entry. Removed the set_nt_acl() call,Jeremy Allison1-3/+0
this can only be done via fset_nt_acl() using an open file/directory handle. I'd like to do the same with get_nt_acl() but am concerned about efficiency problems with "hide unreadable/hide unwritable" when doing a directory listing (this would mean opening every file in the dir on list). Moving closer to rationalizing the ACL model and maybe moving the POSIX calls into a posix_acl VFS module rather than having them as first class citizens of the VFS. Jeremy. (This used to be commit f487f742cb903a06fbf2be006ddc9ce9063339ed)
2008-04-21Remove redundant parameter fd from SMB_VFS_CLOSE().Michael Adam1-3/+3
Now all those redundant fd's have vanished from the VFS API. Michael (This used to be commit 14294535512a7f191c5008e622b6708e417854ae)
2008-01-21Add SMB_VFS_FS_CAPABILITIESVolker Lendecke1-0/+3
It turns out that this is a necessary operation, separate from statvfs. statvfs can fail during tcon, so conn->fs_capabilities would never see that we support streams on a particular share. James, can you check that I got the darwin variant right? Thanks! (This used to be commit 3ad798d803b3b023533bb48e6993885f22b96095)
2008-01-19Add the STREAMINFO vfs callVolker Lendecke1-0/+3
Based on jpeach's work, modified the streaminfo prototype Make use of it in trans2.c together with marshall_stream_info() (This used to be commit c34d729c7c0600a8f11bf7e489a634a4e37fe88e)
2008-01-17Remove is_remotestorage() call from VFS. We already have statvfs() there to ↵Alexander Bokovoy1-3/+0
handle FS capabilities. As discussed with Volker, it is better to calculate FS capabilities at connection time. We already do this with help of VFS statvfs() call which allows to fill-in system-specific attributes including FS capabilities. So just re-use it if you want to represent additional capabilities in your modules. The only caution is that you need to call underlying statvfs() call to actually get system-specific capabilities (and other fields) added. Then add module-specific ones. (This used to be commit e342ca0d931f9a5c8ec9e472dc9c63f1fe012b3a)
2008-01-17Rework of VFS is_offline() function to only return boolean offline/online ↵Alexander Bokovoy1-3/+3
result for a file. This makes sense as upper levels are only taking returned result of 0 (no error) into consideration when deciding whether to mark file offline/online as returned from is_offline. That means that we simply can move the decision down to VFS module and clean up upper levels so that they always see only file status. If there is an error when trying to identify file status, then VFS module could decide what to return (offline or online) by itself -- after all, it ought to have system-specific knowledge anyway. (This used to be commit 75cc08661473cce62756fa062071bb2bc1fb39ec)
2008-01-16Fix the mess that ab just made of the new VFS code.Jeremy Allison1-19/+19
NEEDS MORE TESTING ! Jeremy. (This used to be commit bcc94aed6f03211866aa85753a90fece87846ba9)
2008-01-16Add support for offline files support, remote storage, and Async I/O force ↵Alexander Bokovoy1-0/+18
operations to VFS Offline files support and remote storage are for allowing communication with backup and archiving tools that mark files moved to a tape library as offline. We translate this info into corresponding CIFS offline file attribute and mark an exported volume as remote storage. Async I/O force is to allow selective redirection of I/O operations to asynchronous processing in case it is viable at VFS module discretion. It is needed for proper handling of offline files as performing regular I/O on offline file will block smbd. Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 875208724e39564fe81385dfe36e6c963e79e101)
2008-01-11Combine fsp and tofd to tofsp in SMB_VFS_RECVFILE().Michael Adam1-3/+3
Michael (This used to be commit 3958abffaf2866c69ad9e13ec345364fde5c78bb)
2008-01-11Combine fsp and fromfd to fromfsp in SMB_VFS_SENDFILE().Michael Adam1-3/+3
Michael (This used to be commit a52cfb7d777157c93c9dc26c67f457be592dd537)
2008-01-10Remove redundant parameter fd from SMB_VFS_WRITE().Michael Adam1-3/+3
Michael (This used to be commit c8ae7d095a2a6a7eac920a68ca7244e3a423e1b1)
2008-01-10Remove redundant parameter fd from SMB_VFS_READ().Michael Adam1-3/+3
Michael (This used to be commit a8fc2ddad8d5f7c6c00cb36c74a32a02d69d1d04)
2008-01-08Remove redundant parameter fd from SMB_VFS_AIO_CANCEL().Michael Adam1-3/+3
Michael (This used to be commit 3c997ae0002d4c50e8899600c17ddf74ac61f6f0)
2008-01-08Remove redundant parameter fd from SMB_VFS_FSETXATTR().Michael Adam1-3/+3
Michael (This used to be commit 0bd2643463a9160c8a1c7e1c2f8cca7b89060e09)
2008-01-08Remove redundant parameter fd from SMB_VFS_FREMOVEXATTR().Michael Adam1-3/+3
Michael (This used to be commit bfc3b5a27f707d3e4b8d5d66192891e22365fbb3)
2008-01-08Remove redundant parameter fd from SMB_VFS_FLISTXATTR().Michael Adam1-3/+3
Michael (This used to be commit 167649b3b8bc293f8434ffc9fb5f80463e4e75be)
2008-01-08Remove redundant parameter fd from SMB_VFS_FGETXATTR().Michael Adam1-3/+3
Michael (This used to be commit 2cb739a82dc6bb194d60718cc74b26ee7c1c46a7)
2008-01-08Remove redundant parameter fd from SMB_VFS_SYS_ACL_SET_FD().Michael Adam1-3/+3
Michael (This used to be commit 9296e93588c0e795cae770765050247ac1474a74)
2008-01-08Remove redundant parameter fd from SMB_VFS_FCHMOD_ACL().Michael Adam1-3/+3
Michael (This used to be commit 7b201c177b3668f54751ba17d6a0b53ed913e7f7)
2008-01-07Remove redundant parameter fd from SMB_VFS_SYS_ACL_GET_FD().Michael Adam1-3/+3
Michael (This used to be commit 42663e8736e1a3dfb57e0aafdcbf5fec880da779)
2008-01-07Remove redundant parameter fd from SMB_VFS_GETLOCK().Michael Adam1-3/+3
Michael (This used to be commit ee5a20becdcdb20d7012732b324c6938fab44f67)
2008-01-07Remove redundant parameter fd from SMB_VFS_LINUX_SETLEASE().Michael Adam1-3/+3
Michael (This used to be commit 8880eb82f16d561a4023ec8426f8ea35c579a7a6)