summaryrefslogtreecommitdiffstats
path: root/source3/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* vfs_glusterfs: Fix excessive debug output from vfs_gluster_open().Christopher R. Hertel2013-08-301-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
* s3: fix missing braces in nfs4_acls.cAbhidnya Joshi2013-08-281-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
* vfs_glusterfs: Implement proper mashalling/unmarshalling of ACLsAnand Avati2013-08-161-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
* smbd: Fix nonblank line endingsVolker Lendecke2013-08-121-6/+6
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* VFS plugin was sending the actual size of the volume instead of the total ↵Susant Kumar Palai2013-08-091-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>
* FSCTL_GET_SHADOW_COPY_DATA: Don't return 4 extra bytes at endChristof Schmitt2013-08-061-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
* FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zeroChristof Schmitt2013-08-051-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>
* Ensure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.Ralph Wuerthner2013-08-011-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
* s3: Remove old mode special substitution.Alexander Werth2013-07-161-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
* Use existing "acl map full control" parameter to control the adding of the ↵Jeremy Allison2013-06-241-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>
* Fix glusterfs backend crash found at the Microsoft interop event.Jeremy Allison2013-06-211-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>
* build: Build with system md5.h on OpenIndianaAndrew Bartlett2013-06-191-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
* vfs_catia: use translate direction enum instead of intDavid Disseldorp2013-06-171-1/+1
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_streams_xattr: Do not attempt to write empty attribute twiceChristof Schmitt2013-06-171-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>
* Initialize the file descriptor in the files_struct before trying to close ↵Christof Schmitt2013-06-131-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
* Optimization on POSIX platforms that have fstatat.Jeremy Allison2013-06-101-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
* vfs_glusterfs: Samba VFS module for glusterfsAnand Avati2013-05-302-0/+1503
| | | | | | | | | | | Implement a Samba VFS plugin for glusterfs based on gluster's gfapi. This is a "bottom" vfs plugin (not something to be stacked on top of another module), and translates (most) calls into closest actions on gfapi. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Signed-off-by: Anand Avati <avati@redhat.com>
* smbd: Fix a ISO C90 forbids mixed declarations and code warningVolker Lendecke2013-05-181-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Matthieu Patou <mat@matws.net> Autobuild-User(master): Matthieu Patou <mat@samba.org> Autobuild-Date(master): Sat May 18 01:40:04 CEST 2013 on sn-devel-104
* source3/modules/vfs_catia.c: Fix typo in comment.Karolin Seeger2013-05-151-1/+1
| | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_gpfs: slightly simplify connect()Volker Lendecke2013-05-141-7/+7
| | | | | | | | | | | DISCONNECT can be arbitrarily complex, TALLOC_FREE of a simple struct is easier. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue May 14 18:11:29 CEST 2013 on sn-devel-104
* build: Add missing dep from vfs_nfs4acl_xattr to NDR_NFS4ACLAndrew Bartlett2013-05-141-1/+1
| | | | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue May 14 01:23:17 CEST 2013 on sn-devel-104
* s3:modules/vfs_aixacl2 fix compile errorsChristian Ambach2013-05-091-9/+8
| | | | | | | | fix various compile errors that were introduced with latest ACL changes Signed-off-by: Christian Ambach <ambi@samba.org> Pair-Programmed-With: Alexander Werth <alexander.werth@de.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* Fix missing TALLOC_FREE of stackframes.Jeremy Allison2013-05-092-2/+6
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* Tidy up old bool usage. False -> false, True -> true.Jeremy Allison2013-05-091-13/+13
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* vfs: Allow CREATOR GROUP to be used with vfs_zfsaclAndrew Bartlett2013-05-091-1/+1
| | | | | | | | | | The solaris acl() code requires that both ACE_GROUP|ACE_IDENTIFIER_GROUP be set to indicate the @group permissions. Otherwise, it would return Invalid Paramter to clients. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: Update README.nfs4acls.txtAlexander Werth2013-05-091-8/+15
| | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: Use mode bits in some cases in mode simple.Alexander Werth2013-05-091-0/+46
| | | | | | | | | | Non inheriting ACL entries will show mode bits. With this an file owner change does affect the effective ACL because the special owner acl will now refer to the new owner. This could be fixed by updating the ACL on a file owner change. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: Add changes that keep nfs4:mode special behavior.Alexander Werth2013-05-091-1/+41
| | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>