summaryrefslogtreecommitdiff
path: root/source3/modules
AgeCommit message (Collapse)AuthorFilesLines
2013-10-12s3/time_audit: Add offline and durable functionsChristof Schmitt1-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
2013-10-05shadow_copy2: use stored mount_point instead of recalculating.Michael Adam1-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>
2013-10-05shadow_copy2: improve debug in shadow_copy2_convert() in snapdirseverywhere modeMichael Adam1-1/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: fix shadow_copy2_convert() in the classical case.Michael Adam1-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>
2013-10-05shadow_copy2: add some blank lines for visual separation to ↵Michael Adam1-0/+2
shadow_copy2_convert() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: initialize "converted" string to null in shadow_copy2_convert()Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: fix shadow_copy2_strip_snapshot() in the classical caseMichael Adam1-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>
2013-10-05shadow_copy2: add some debug to shadow_copy2_strip_snapshot()Michael Adam1-1/+11
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add comments explaining decisions in shadow_copy2_strip_snapshot()Michael Adam1-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>
2013-10-05shadow_copy2: introduce shadow_copy2_snapshot_path()Michael Adam1-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>
2013-10-05shadow_copy2: factor shadow_copy2_posix_gmt_string() out of ↵Michael Adam1-21/+47
shadow_copy2_insert_string() for re-use.. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: shadow_copy2_insert_string(): do not prepend a "/" in absolute ↵Michael Adam1-2/+20
mode Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: make shadow_copy2_find_snapdir() return const char *Michael Adam1-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>
2013-10-05shadow_copy2: in the classical case, use configured path in ↵Michael Adam1-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>
2013-10-05shadow_copy2: implement disk_freeMichael Adam1-0/+37
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: log resulting config at the end of shadow_copy2_connect()Michael Adam1-0/+29
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add snapshot_basepath to the config.Michael Adam1-0/+11
This is the absolute version of snapdir. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add rel_connectpath to config.Michael Adam1-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>
2013-10-05shadow_copy2: introduce "shadow:mountpoint" optionMichael Adam1-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>
2013-10-05shadow_copy2: re-add the basedir option.Michael Adam1-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>
2013-10-05shadow_copy2: disable "snapdir:crossmountpoints" if the snapdir is absolute.Michael Adam1-0/+7
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: introduce the bool "snapdir_absolute" in the config.Michael Adam1-0/+10
Not exposed but to be used internally. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: introduce config struct and function shadow_copy2_connect()Michael Adam1-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>
2013-10-05shadow_copy2: add comment block explaining shadow_copy2_convert()Michael Adam1-0/+5
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add comment block explaining shadow_copy2_insert_string()Michael Adam1-0/+5
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add comment block explaining shadow_copy2_find_snapdir()Michael Adam1-0/+4
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add header comment explaining have_snapdir()Michael Adam1-0/+6
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: add comment header describing shadow_copy2_strip_snapshot()Michael Adam1-0/+5
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-05shadow_copy2: break overly long lines in shadow_copy2_snapshot_to_gmt()Michael Adam1-3/+6
According to coding guidelines. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24build: get rid of vars=locals() in source3/modules/wscript_buildMichael Adam1-2/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2013-09-24build: get rid of source file variables in source3/modules/wscript_buildMichael Adam1-116/+59
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2013-09-23s3:modules: vfs_afsacl has the afs_syscall prototype via proto.hMichael Adam1-2/+0
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-09-11smbd: Add brl_fsp access functionVolker Lendecke2-6/+9
2013-09-10s3:smb2_find: Return that timestamps do not exist as directoriesChristof Schmitt1-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
2013-08-30vfs_glusterfs: Fix excessive debug output from vfs_gluster_open().Christopher R. Hertel1-3/+0
The vfs_gluster_open() function generates a debug message (at level 0) for every failed attempt to open a pathname. This includes cases in which attempts are made to open a directory as a file (those attempts are retried calling vfs_gluster_opendir()). The result is that the log file fills with messages about failed attempts to open directories, just because they are directories. This latest version, of the patch completely removes logging from the vfs_gluster_open() function. The error code returned is handled in upper layers, and the open function in the default VFS module does not log any errors. Signed-off-by: Christopher R. Hertel <crh@redhat.com> Reviewed-by: susant palai <spalai@redhat.com> Reviewed-by: raghavendra talur <rtalur@redhat.com> Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Aug 30 02:43:48 CEST 2013 on sn-devel-104
2013-08-28s3: fix missing braces in nfs4_acls.cAbhidnya Joshi1-1/+2
Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Aug 28 20:25:56 CEST 2013 on sn-devel-104
2013-08-16vfs_glusterfs: Implement proper mashalling/unmarshalling of ACLsAnand Avati1-42/+111
Use the primitives available in Samba byteorder.h for implementing proper (un)marshalling of ACL xattrs. - Incorporated Raghavendra Talur's comments on v3 Signed-off-by: Anand Avati <avati@redhat.com> Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christopher R. Hertel <crh@samba.org> Tested-by: Jose A. Rivera <jarrpa@redhat.com> Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Fri Aug 16 20:34:51 CEST 2013 on sn-devel-104
2013-08-12smbd: Fix nonblank line endingsVolker Lendecke1-6/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-09VFS plugin was sending the actual size of the volume instead of the total ↵Susant Kumar Palai1-7/+4
number of block units because of which windows was getting the wrong volume capacity. Signed-off-by: Susant Kumar Palai <spalai@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christopher R. Hertel <crh@samba.org>
2013-08-06FSCTL_GET_SHADOW_COPY_DATA: Don't return 4 extra bytes at endChristof Schmitt1-2/+2
labels_data_count already accounts for the unicode null character at the end of the array. There is no need in adding space for it again. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 6 04:03:17 CEST 2013 on sn-devel-104
2013-08-05FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zeroChristof Schmitt1-1/+1
Otherwise num_volumes and the end marker can return uninitialized data to the client. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-01Ensure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.Ralph Wuerthner1-0/+6
Ensures correct lease owner for signal delivery. Signed-off-by: Ralph Wuerthner <ralphw@de.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Aug 1 03:57:11 CEST 2013 on sn-devel-104
2013-07-16s3: Remove old mode special substitution.Alexander Werth1-13/+2
The mode special substitution now happens in a separate function. The substitution at this point is unnecessary. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Tue Jul 16 00:52:26 CEST 2013 on sn-devel-104
2013-06-24Use existing "acl map full control" parameter to control the adding of the ↵Jeremy Allison1-2/+17
DELETE_CHILD parameter on NFSv4/ZFS/GPFS file ACE's. Windows maps an open request of GENERIC_ALL on files to 0x1FF specific bits, which includes DELETE_CHILD even though this has no meaning on file ACE's. If a returned NFSv4 ACE entry for a file has all other specific bits set except for DELETE (which comes from the containing directory) and DELETE_CHILD (which has no meaning) then optionally add it into the returned ACE entry. This is using the same parameter in the same way as it is currently used in smbd/posix_acls.c. Note that as this parameter is on by default, it is already being tested in the existing raw.acl tests. Fixes issue with Microsoft SMB2 torture test suite found at the interop event in Redmond, WA. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2013-06-21Fix glusterfs backend crash found at the Microsoft interop event.Jeremy Allison1-2/+4
Based on a fix originally from Raghavendra Talur <rtalur@redhat.com>. When a new document is created in explorer, a check for file_exist is made. vfs_gluster_get_real_filename was returning 0 even when the file did not exist. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: "Christopher R. Hertel" <crh@ubiqx.mn.org>
2013-06-19build: Build with system md5.h on OpenIndianaAndrew Bartlett1-1/+1
This changes (again...) our system md5 detection to cope with how OpenIndiana does md5. I'm becoming increasingly convinced this isn't worth our while (we should have just done samba_md5...), but for now this change seems to work on FreeBSD, OpenIndiana and Linux with libbsd. This needs us to rename struct MD5Context -> MD5_CTX, but we provide a config.h define to rename the type bad if MD5_CTX does not exist (it does however exist in the md5.h from libbsd). Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 19 21:32:36 CEST 2013 on sn-devel-104
2013-06-17vfs_catia: use translate direction enum instead of intDavid Disseldorp1-1/+1
Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-06-17vfs_streams_xattr: Do not attempt to write empty attribute twiceChristof Schmitt1-31/+11
The create disposition FILE_OVERWRITE_IF is mapped to the flags O_CREAT|O_TRUNC. In vfs_streams_xattr, this triggers two calls to SMB_VFS_SETXATTR. The second can fail if O_EXCL is also set, resulting in an unnecessary error. Merge the identical code to handle O_CREAT and O_TRUNC to avoid setting an empty attribute twice. Also add the flags parameter to the debug message. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-06-13Initialize the file descriptor in the files_struct before trying to close ↵Christof Schmitt1-0/+1
it. Otherwise, if one of the SETXATTR calls had failed, the close() call will return EBADF. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <rsharpe@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 13 01:43:18 CEST 2013 on sn-devel-104
2013-06-10Optimization on POSIX platforms that have fstatat.Jeremy Allison1-4/+23
Tests show significant speedup in directory listings by using fstatat instead of a full pathname walk. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jun 10 20:14:12 CEST 2013 on sn-devel-104