summaryrefslogtreecommitdiffstats
path: root/source3/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* s3:modules:shadow_copy2: improve headline commentMichael Adam2013-12-071-1/+1
| | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:module:shadow_copy2: add my (C)Michael Adam2013-12-071-0/+1
| | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* vfs_btrfs: advertise per-file compression capabilityDavid Disseldorp2013-11-221-0/+15
| | | | | | | | | | Plumb into the get_fs_capabilities code path to advertise the FILE_FILE_COMPRESSION attribute. Also, document file compression support in the VFS btrfs man page. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_btrfs: fix copy-chunk dest unlock argsDavid Disseldorp2013-11-221-1/+1
| | | | | | | src_fsp used instead of dest_fsp for unlock. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_btrfs: add [GET/SET]_COMPRESSION handlersDavid Disseldorp2013-11-221-2/+117
| | | | | | | | | Translate such requests into FS_IOC_GETFLAGS and FS_IOC_SETFLAGS ioctls respectively. The module makes no distinction between compression types, only whether or not compression is enabled. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: add [GET/SET]_COMPRESSION hooksDavid Disseldorp2013-11-223-0/+112
| | | | | | | | | | | | | | | 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>
* s3-vfs: Make glfs_set_preopened() static.Andreas Schneider2013-11-151-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-vfs: Remove unused variable in vfs_glusterfs.Andreas Schneider2013-11-151-1/+0
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-vfs: Fix stream_depot vfs module on btrfs.Andreas Schneider2013-11-121-6/+4
| | | | | | | | | | | | Checking if the directory is empty using 'nlink == 2' only checks if there are no subdirectories. It doesn't indicate if there are files in the directory. However checking link count for no subdirectories is wrong and applications shouldn't rely on it, see: https://lkml.org/lkml/2012/2/1/756 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* Revert "s3-vfs: Fix stream_depot vfs module on btrfs."David Disseldorp2013-11-121-8/+8
| | | | | | | | | | | | | | | | This reverts commit 29f12e7d5960906935e3af1405e9759a07d64750. The wrong patch was pushed, according to Andreas: I sent a second version cause the first was not complete. I've discussed with Volker after I sent the patch and then sent a new patch which a) also does the right thin in the unlink case b) only tried to remove the server is the deletion of the file was successful. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* smbd: Fix CID 1035478 Negative array index readVolker Lendecke2013-11-111-6/+19
| | | | | | | lp_parm_enum can return -1. Add error checking. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* s3-vfs: Fix stream_depot vfs module on btrfs.Andreas Schneider2013-11-081-8/+8
| | | | | | | | | | | | Checking if the directory is empty using 'nlink == 2' only checks if there are no subdirectories. It doesn't indicate if there are files in the directory. However checking link count for no subdirectories is wrong and applications shouldn't rely on it, see: https://lkml.org/lkml/2012/2/1/756 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: Fix some build warnings in glusterfs.Andreas Schneider2013-11-041-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* vfs: Fix building the glusterfs module.Andreas Schneider2013-11-041-2/+2
| | | | | | | | Using calloc directly throws an error. This fixes building the glusterfs module. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3:modules: nfs4_acls ACLs with zero entries are fine.Alexander Werth2013-10-301-6/+6
| | | | | | | | Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Oct 30 20:31:42 CET 2013 on sn-devel-104
* s3:modules: Fix realloc with zero sized ACLsAlexander Werth2013-10-301-5/+7
| | | | | | | | A realloc with size zero is similar to a free. Since we return the number of acls that's not an error. Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3/time_audit: Add offline and durable functionsChristof Schmitt2013-10-121-0/+111
| | | | | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sat Oct 12 13:00:02 CEST 2013 on sn-devel-104
* shadow_copy2: use stored mount_point instead of recalculating.Michael Adam2013-10-051-9/+1
| | | | | | | | | | | | In the case of snapdirseverywhere but NOT crossmountpoints. This spares stat calls. And is the only correct thing to do if the mount point was specified in the configuration. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: improve debug in shadow_copy2_convert() in snapdirseverywhere modeMichael Adam2013-10-051-1/+2
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: fix shadow_copy2_convert() in the classical case.Michael Adam2013-10-051-2/+45
| | | | | | | | | | I.e. the non-snapdirseverywhere case. This in particular fixes the case of a snapdir hierarchy that is parallel to the share or mountpoint and not subordinate. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add some blank lines for visual separation to ↵Michael Adam2013-10-051-0/+2
| | | | | | | | shadow_copy2_convert() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: initialize "converted" string to null in shadow_copy2_convert()Michael Adam2013-10-051-1/+1
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: fix shadow_copy2_strip_snapshot() in the classical caseMichael Adam2013-10-051-0/+30
| | | | | | | | | | | I.e., fix detection of already converted names. This is done by using the shadow_copy2_snapshot_path() function and comparing if the input string starts with that. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add some debug to shadow_copy2_strip_snapshot()Michael Adam2013-10-051-1/+11
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add comments explaining decisions in shadow_copy2_strip_snapshot()Michael Adam2013-10-051-0/+10
| | | | | | | | This should make it more easy to understand what the cases are. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: introduce shadow_copy2_snapshot_path()Michael Adam2013-10-051-0/+37
| | | | | | | | | This builds the posix snapshot path for the connection at the provided timestamp. For the non-snapdirseverywhere case. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: factor shadow_copy2_posix_gmt_string() out of ↵Michael Adam2013-10-051-21/+47
| | | | | | | | | | shadow_copy2_insert_string() for re-use.. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: shadow_copy2_insert_string(): do not prepend a "/" in absolute ↵Michael Adam2013-10-051-2/+20
| | | | | | | | mode Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: make shadow_copy2_find_snapdir() return const char *Michael Adam2013-10-051-4/+4
| | | | | | | | | instead of char *. This eliminates compiler warnings. snapdir is a const string in all occasions. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: in the classical case, use configured path in ↵Michael Adam2013-10-051-0/+7
| | | | | | | | | | shadow_copy2_find_snapdir() There is no point in searching for snapdir if not in snapdirseverywhere mode. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: implement disk_freeMichael Adam2013-10-051-0/+37
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: log resulting config at the end of shadow_copy2_connect()Michael Adam2013-10-051-0/+29
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add snapshot_basepath to the config.Michael Adam2013-10-051-0/+11
| | | | | | | | This is the absolute version of snapdir. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add rel_connectpath to config.Michael Adam2013-10-051-0/+12
| | | | | | | | This is the share root, relative to the basedir. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: introduce "shadow:mountpoint" optionMichael Adam2013-10-051-5/+38
| | | | | | | | | Possiblity to explicitly set the share's mount point. This is useful mainly for debugging and testing purposes. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: re-add the basedir option.Michael Adam2013-10-051-0/+56
| | | | | | | | | | | | Disable basedir if it is not an absolute path or if snapdirseverywhere or crossmountpoints is enabled. Pair-Programmed-With: Björn Baumbach <bb@sernet.de> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: disable "snapdir:crossmountpoints" if the snapdir is absolute.Michael Adam2013-10-051-0/+7
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: introduce the bool "snapdir_absolute" in the config.Michael Adam2013-10-051-0/+10
| | | | | | | | Not exposed but to be used internally. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: introduce config struct and function shadow_copy2_connect()Michael Adam2013-10-051-28/+145
| | | | | | | | | This moves the parsing of the config to a central place. So users of configuation don't need to call lp_parm_... all the time. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add comment block explaining shadow_copy2_convert()Michael Adam2013-10-051-0/+5
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add comment block explaining shadow_copy2_insert_string()Michael Adam2013-10-051-0/+5
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add comment block explaining shadow_copy2_find_snapdir()Michael Adam2013-10-051-0/+4
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add header comment explaining have_snapdir()Michael Adam2013-10-051-0/+6
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: add comment header describing shadow_copy2_strip_snapshot()Michael Adam2013-10-051-0/+5
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* shadow_copy2: break overly long lines in shadow_copy2_snapshot_to_gmt()Michael Adam2013-10-051-3/+6
| | | | | | | | According to coding guidelines. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: get rid of vars=locals() in source3/modules/wscript_buildMichael Adam2013-09-241-2/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* build: get rid of source file variables in source3/modules/wscript_buildMichael Adam2013-09-241-116/+59
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s3:modules: vfs_afsacl has the afs_syscall prototype via proto.hMichael Adam2013-09-231-2/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd: Add brl_fsp access functionVolker Lendecke2013-09-112-6/+9
|
* s3:smb2_find: Return that timestamps do not exist as directoriesChristof Schmitt2013-09-101-3/+0
| | | | | | | | | | | | | | | When a Windows client receives a large directory listing while querying snapshots, it sends a find request asking for the timestamp as a directory. A Windows server returns NO_SUCH_FILE, so make sure Samba returns the same. Otherwise the client will get confused and display timestamps in the 'previous versions' dialog. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Sep 10 22:38:51 CEST 2013 on sn-devel-104