summaryrefslogtreecommitdiff
path: root/examples/VFS
Commit message (Collapse)AuthorAgeFilesLines
* s3/vfs: remove now unused is_offline/set_offline VFS functionsRalph Boehme2016-10-112-36/+0
| | | | | | | | | | The previous commit removed all callers of this, so lets remove it. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Oct 11 14:44:03 CEST 2016 on sn-devel-144
* s3: vfs: Add VFS functions for setting and getting DOS attributes.Richard Sharpe2016-03-272-0/+76
| | | | | | | | | This will make it easier to support those systems and file systems that can store DOS attributes. It should retain the original functionality if VFS functions providing these things are not provided. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* s3: smbd: Change open_streams_for_delete() to take a struct smb_filename *.Jeremy Allison2016-03-072-4/+7
| | | | | | | | | | Prepare for changing vfs_streaminfo to do the same. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Mar 7 21:12:56 CET 2016 on sn-devel-144
* VFS: Modify lchown to take a const struct smb_filename * instead of const char *Jeremy Allison2016-03-052-5/+9
| | | | | | | Preparing to reduce use of lp_posix_pathnames(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* VFS: Modify chown to take a const struct smb_filename * instead of const char *Jeremy Allison2016-03-052-5/+9
| | | | | | | Preparing to reduce use of lp_posix_pathnames(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* VFS: Modify chmod_acl to take a const struct smb_filename * instead of const ↵Jeremy Allison2016-03-032-5/+7
| | | | | | | | | char * Preparing to reduce use of lp_posix_pathnames(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* VFS: Modify chmod to take a const struct smb_filename * instead of const char *Jeremy Allison2016-03-032-3/+7
| | | | | | | Preparing to reduce use of lp_posix_pathnames(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3/vfs: wrap async io function args inside struct vfs_aio_stateRalph Boehme2016-03-022-21/+27
| | | | | | | | Subsequent commits that are going to track aio request duration in the aio backends will use this. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* VFS: Modify opendir to take a const struct smb_filename * instead of const ↵Jeremy Allison2016-03-012-5/+9
| | | | | | | | | | | | | char * Preparing to reduce use of lp_posix_pathnames(). Uses the same techniques as commit 616d068f0cebb8e50a855b6e30f36fccb7f5a3c8 (synthetic_smb_fname()) to cope with modules that modify the incoming pathname. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* VFS: Modify rmdir to take a const struct smb_filename * instead of const char *Jeremy Allison2016-02-252-3/+5
| | | | | | | | | | | | | | Preparing to reduce use of lp_posix_pathnames(). Uses the same techniques as commit 616d068f0cebb8e50a855b6e30f36fccb7f5a3c8 (synthetic_smb_fname()) to cope with modules that modify the incoming pathname. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Feb 25 20:46:49 CET 2016 on sn-devel-144
* s3: VFS: Modify mkdir to take a const struct smb_filename * instead of const ↵Jeremy Allison2016-02-242-3/+7
| | | | | | | | | | | | | | | | char * Preparing to reduce use of lp_posix_pathnames(). Uses the same techniques as commit 616d068f0cebb8e50a855b6e30f36fccb7f5a3c8 (synthetic_smb_fname()) to cope with modules that modify the incoming pathname. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Autobuild-User(master): Uri Simchoni <uri@samba.org> Autobuild-Date(master): Wed Feb 24 16:05:55 CET 2016 on sn-devel-144
* s3: VFS: Modify SMB_VFS_GET_NT_ACL to take a const struct smb_filename * ↵Jeremy Allison2016-02-162-4/+9
| | | | | | | | | | | | | | | | | | | | | | | instead of const char * Bumps VFS version to 35. Preparing to reduce use of lp_posix_pathnames(). Most of this is boilerplate, the only subtleties are in the modules: vfs_catia.c vfs_media_harmony.c vfs_shadow_copy2.c vfs_unityed_media.c Where the path is modified then passed to SMB_VFS_NEXT_GET_NT_ACL(). In these cases the change uses synthetic_smb_fname() to create a new struct smb_filename from the modified path. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <rb@sernet.de>
* vfs: add path parameter to get_quotaUri Simchoni2016-01-262-5/+7
| | | | | | | | | Adding a path parameter would allow the VFS get_quota function to be used for determining the quota/usage when calculating size and free spacei. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* examples/VFS: make function prototypes available via static_decl_vfs;Stefan Metzmacher2015-08-203-0/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* smbd: Remove SMB_VFS_NOTIFY_WATCHVolker Lendecke2015-07-072-30/+0
| | | | | | | No longer needed Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Convert all uint32/16/8 to _t in a grab-bag of remaining files.Richard Sharpe2015-05-143-15/+15
| | | | | | | | | | I still need to fix the rpc stuff, but we are almost there. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 14 22:16:56 CEST 2015 on sn-devel-104
* vfs: add snapshot create/delete hooksDavid Disseldorp2015-03-312-0/+62
| | | | | | | | | | | | | | | | | | | | | | | This change adds three new VFS hooks covering snapshot manipulation: - snap_check_path Check whether a path supports snapshots. - snap_create Request the creation of a snapshot of the provided path. - snap_delete Request the deletion of a snapshot. These VFS call-outs will be used in future by Samba's File Server Remote VSS Protocol (FSRVP) server. MS-FSVRP states: At any given time, Windows servers allow only one shadow copy set to be going through the creation process. Therefore, only provide synchronous hooks for now, which can be converted to asynchronous _send/_recv functions when the corresponding DCE/RPC server infrastructure is in place. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/vfs: change fallocate mode flags from enum->uint32_tDavid Disseldorp2015-03-092-2/+2
| | | | | | | | | | | | | | | | | | | | The Linux fallocate syscall offers a mode parameter which can take the following flags: FALLOC_FL_KEEP_SIZE FALLOC_FL_PUNCH_HOLE (since 2.6.38) FALLOC_FL_COLLAPSE_RANGE (since 3.15) FALLOC_FL_ZERO_RANGE (since 3.14) The flags are not exclusive, e.g. FALLOC_FL_PUNCH_HOLE must be specified alongside FALLOC_FL_KEEP_SIZE. Samba currently takes a vfs_fallocate_mode enum parameter for the VFS fallocate hook, taking either an EXTEND_SIZE or KEEP_SIZE value. This commit changes the fallocate hook such that it accepts a uint32_t flags parameter, in preparation for PUNCH_HOLE and ZERO_RANGE support. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/vfs: remove unused SMB_VFS_DISK_FREE() small_query parameterDavid Disseldorp2015-02-172-4/+3
| | | | | | | | | | | | | | | The small_query parameter for SMB_VFS_DISK_FREE() was, prior to the previous commit, used to obtain 16-bit wide free-space information for the deprecated dskattr SMB_COM_QUERY_INFORMATION_DISK command. With the dskattr handler now performing the 16-bit collapse directly, the small_query parameter can be removed from the entire code path. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Feb 17 05:37:20 CET 2015 on sn-devel-104
* s3:vfs: add create tags to SMB_VFS_CREATEFILERalph Boehme2014-12-042-3/+8
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:vfs: add SMB_VFS_READDIR_ATTR()Ralph Boehme2014-12-042-0/+18
| | | | | | | | | | | | SMB_VFS_READDIR_ATTR is a last minute hook to fetch additional metadata for a directory entry when we're already marshalling the SMB reply buffer. This would be used, when there's a need to repurpose some fields in the the reply, like it's done with Apple's SMB2 extension "AAPL". Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs3: Pass "lease" through SMB_VFS_CREATE_FILEVolker Lendecke2014-08-112-0/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove unused blocking_lock_record* from VFS_BRL_CANCEL_WINDOWSVolker Lendecke2014-07-042-5/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove unused blocking_lock_record* from VFS_BRL_LOCK_WINDOWSVolker Lendecke2014-07-042-5/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: add [GET/SET]_COMPRESSION hooksDavid Disseldorp2013-11-222-0/+40
| | | | | | | | | | | | | | | The VFS interfaces are sychronous, as the operations only modify meta-data. These hooks are dependent on support for transparent compression by the underlying filesystem - vfs_default returns INVALID_DEVICE_REQUEST. Support for other filesystems providing transparent comression, such as Btrfs and ZFS, can be added in future. The get_compression function takes fsp and smb_fname arguments. The smb_fname argument is needed due to the current dosmode() code-path. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* build: Remove autoconf build system from examples/VFSAndrew Bartlett2013-05-286-3977/+0
| | | | | | Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-vfs: add copy_chunk vfs hooksDavid Disseldorp2013-01-162-0/+117
| | | | | | | | | | | | | | | | | | copy_chunk copies n bytes from a source file at a specific offset to a destination file at a given offset. This interface will be used in handling smb2 FSCTL_SRV_COPYCHUNK ioctl requests. Use a pread/pwrite loop in vfs_default, so that requests referring to the same src and dest file are possible. Provide send and receive hooks for copy chunk VFS interface, allowing asynchronous behaviour. Check whether the request source offset + length exceeds the current size. Return STATUS_INVALID_VIEW_SIZE under such a condition, matching Windows server behaviour. Reviewed by: Jeremy Allison <jra@samba.org>
* examples: Re-indent and reformat skel VFS modulesAndrew Bartlett2012-10-112-348/+436
| | | | | | This avoids some of the poor style here from propogating to new VFS modules. Andrew Bartlett
* vfs: Remove type parameter from sys_acl_blob_get_{fd,file}Andrew Bartlett2012-10-112-3/+3
| | | | | | | | | This interface actually needs to match the get_nt_acl interface in that the system ACL implmenetation may not be posix ACLs, and the blob is not meant to be enforced to be of a particular system ACL structure. Andrew Bartlett
* smbd: Add mem_ctx to {f,}get_nt_acl VFS callAndrew Bartlett2012-10-112-6/+14
| | | | | | | | | | | This makes it clear which context the returned SD is allocated on, as a number of callers do not want it on talloc_tos(). As the ACL transformation allocates and then no longer needs a great deal of memory, a talloc_stackframe() call is used to contain the memory that is not returned further up the stack. Andrew Bartlett
* smbd: Add mem_ctx to sys_acl_init() and all callersAndrew Bartlett2012-10-112-6/+16
| | | | | | | | | | This changes from allocation on NULL to allocation on the supplied memory context. Currently that supplied context is talloc_tos() at the the final consumer of the ACL. Andrew Bartlett
* smbd: Add extra VFS hooks to get the posix ACL as a blobAndrew Bartlett2012-09-122-0/+33
| | | | | | | | | | | This will allow us to hash this, rather than the NT ACL it maps to. This will in turn allow us to know if the NT ACL is valid even if we have to change the mapping code. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Sep 12 07:06:01 CEST 2012 on sn-devel-104
* s3-smbd: Remove sys_acl_*() VFS wrapper functionsAndrew Bartlett2012-08-152-221/+0
| | | | | | | | | | | | | | | | | | | | | | | We no longer do struct smb_acl_t manipuations via the VFS layer, which is now reduced to handling the get/set functions. The only backend that implemented these functions (aside from audit) was the vfs_default module calling the sys_acl code. The various ACL implementation modules either worked on the fully initilaised smb_acl_t object or on NT ACLs. This not only makes the operation of the posix ACL code more efficient (as allocation and free is not put via the VFS), it makes it easier to test and removes the fantasy that a module could safely redefine this structure or the behaviour here. The smb_acls.idl now defines the structure, and it is now allocated with talloc. These operations were originally added to the VFS in commit 3bb219161a270f12c27c3bc7e1220829c6e9f284. Andrew Bartlett
* Make it possible to build under Solaris make as well as FreeBSD and Linux. ↵Richard Sharpe2012-07-311-4/+17
| | | | Also add comments on changes that might be needed
* s3-vfs: async fsyncVolker Lendecke2012-07-182-0/+69
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3-aio: Remove unused VFS functions and moreVolker Lendecke2012-07-182-91/+0
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3-vfs: Add pwrite_send/recv to vfs modulesVolker Lendecke2012-07-182-0/+74
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3-vfs: Add pread_send/recv to vfs modulesVolker Lendecke2012-07-182-0/+73
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* examples/VFS: don't use smbd/proto.hStefan Metzmacher2012-06-063-3/+0
| | | | metze
* build: Move generated files out of the normal build treeAndrew Bartlett2012-05-181-0/+1
| | | | | | This avoids some dual-build-system interactions. Andrew Bartlett
* Improve the VFS Makefile so that it is easier for use out of tree but still ↵Richard Sharpe2012-04-161-13/+9
| | | | | | | works with FreeBSD. Autobuild-User: Richard Sharpe <sharpe@samba.org> Autobuild-Date: Mon Apr 16 19:51:14 CEST 2012 on sn-devel-104
* build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett2012-04-062-20/+20
| | | | | | | | | Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
* s3-vfs: Remove unused lremovexattr call from VFS modules, system.c and configureAndrew Bartlett2012-04-052-13/+0
| | | | | | | If this is ever needed again, it would be more appropriate as an options argument to removexattr. Andrew Bartlett
* s3-vfs: Remove unused lsetxattr call from VFS modules, system.c and configureAndrew Bartlett2012-04-052-13/+0
| | | | | | | If this is ever needed again, it would be more appropriate as an options argument to listxattr. Andrew Bartlett
* s3-vfs: Remove unused llistxattr call from VFS modules, system.c and configureAndrew Bartlett2012-04-052-13/+0
| | | | | | | If this is ever needed again, it would be more appropriate as an options argument to listxattr. Andrew Bartlett
* s3-vfs: Remove unused lgetxattr call from VFS modules, system.c and configureAndrew Bartlett2012-04-052-15/+0
|
* build: Remove SMB_STRUCT_DIR defineAndrew Bartlett2012-04-052-16/+16
|
* build: Remove SMB_STRUCT_DIRENT defineAndrew Bartlett2012-04-052-2/+2
|
* s3: Pass filters explicitly through vfs notify watchVolker Lendecke2012-03-262-3/+8
| | | | | | | | | This removes a dependency on "struct notify_entry" and makes the nature of the API more explicit. We depend upon the VFS module to mask out elements from e->filter and e->subdir_filter that it took over to handle. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Mar 26 17:45:44 CEST 2012 on sn-devel-104
* Improve the Makefile. Use a standard make macro, not a shell command.Richard Sharpe2012-03-241-1/+1
| | | | | Autobuild-User: Richard Sharpe <sharpe@samba.org> Autobuild-Date: Sat Mar 24 07:09:44 CET 2012 on sn-devel-104