summaryrefslogtreecommitdiffstats
path: root/source3/modules
Commit message (Collapse)AuthorAgeFilesLines
* s3:vfs_afsacl fix compiler warningsChristian Ambach2014-06-041-2/+1
| | | | | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Wed Jun 4 22:34:51 CEST 2014 on sn-devel-104
* vfs_afsacl: remove unused includesChristian Ambach2014-06-041-2/+1
| | | | | | | | | | * auth.h might cause collisions with the Heimdal headers * we should not include afs/afs.h directly, see https://bugs.launchpad.net/ubuntu/+source/openafs/+bug/1319336 http://rt.central.org/rt/Ticket/Display.html?id=131737 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:lib/afs move afs_settoken.c to common lib dirChristian Ambach2014-06-041-0/+1
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: rename HAVE_MSGHDR_MSG_ACCTRIGHTS to HAVE_STRUCT_MSGHDR_MSG_ACCTRIGHTSMichael Adam2014-06-021-1/+1
| | | | | | | for consistency. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* build: rename HAVE_MSGHDR_MSG_CONTROL to HAVE_STRUCT_MSGHDR_MSG_CONTROLMichael Adam2014-06-021-4/+4
| | | | | | | So that we are consistent with the socket_wrapper define. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* vfs:aio_fork: simplify checking of MSG_CONTROL and MSG_ACCTRIGHTSMichael Adam2014-06-021-9/+8
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:vfs_gpfs: increase log level for EPERM and EACCES errors in gpfs_get_xattr()Ralph Wuerthner2014-05-151-2/+9
| | | | | | | | | Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 15 02:19:41 CEST 2014 on sn-devel-104
* s3 : smbd : Protect all possible code paths from fsp->op == NULL.Jeremy Allison2014-05-022-0/+14
| | | | | | | | | | | | | In changes to come this will be possible for an INTERNAL_OPEN_ONLY. The protection was already in place for some code paths, this makes the coverage compete. Bug 10564 - Lock order violation and file lost https://bugzilla.samba.org/show_bug.cgi?id=10564 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs_gpfs: Avoid warnings in developer buildChristof Schmitt2014-04-181-5/+4
| | | | | | | | | | Remove an unused variable and use discard_const_p. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Apr 18 22:25:25 CEST 2014 on sn-devel-104
* s3: enforce a positive allocation_file_size for non-empty filesBjörn Baumbach2014-04-051-0/+12
| | | | | | | | | | | | | | Some file systems do not allocate a block for very small files. But for non-empty file should report a positive size. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 5 03:09:00 CEST 2014 on sn-devel-104
* vfs: Store ACL control flags in gpfs vfs module.Alexander Werth2014-04-051-23/+114
| | | | | | | | Use literals to allow a compile and execution on gpfs 3.4. Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: Support NFS control flags in nfs4_acls.c.Alexander Werth2014-04-052-1/+27
| | | | | | | | | | | The ACL control flags stores in particular the dacl protected bit which is responsible for the "Include inherited permissions from this object's parent" checkbox. This stores the information in the ACL struct passed to and from file system specific vfs modules. Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:modules: explicitly use allow_warnings=True were neededStefan Metzmacher2014-04-021-0/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Rename module init functions from samba_init_moduleChristof Schmitt2014-04-021-1/+1
| | | | | | | | | | | | | | | Some modules use samba_init_module as the name for the init functions, others use a name based on the module name. Rename the init functions from samba_init_module, to be consistent across all modules. This change also allows to build idmap_tdb2 and perfcount_test statically. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Apr 2 08:50:04 CEST 2014 on sn-devel-104
* tdb_wrap: Remove tdb_wrap_open_ againVolker Lendecke2014-03-311-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: Avoid passing lp_ctx to tdb_wrap_open in posix_eadb_initVolker Lendecke2014-03-311-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use asys_resultsVolker Lendecke2014-03-271-18/+15
| | | | | | | | | | When multiple aio requests finish simultaneously, this saves a few syscalls Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Mar 27 08:05:46 CET 2014 on sn-devel-104
* asys: Allow multiple results to be receivedVolker Lendecke2014-03-271-20/+15
| | | | | | | | | | | This makes use of C99 dynamic arrays. In this performance-sensitive code, I would like to avoid malloc/free, and I think 15 years after the standard we might be able to use this feature. Alternatively, we could use the "results" memory area and store the jobids in the upper range, playing some cast-tricks. Should work as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* pthreadpool: Allow multiple jobs to be receivedVolker Lendecke2014-03-271-2/+2
| | | | | | | This can avoid syscalls when multiple jobs are finished simultaneously Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:modules/vfs_gpfs add gpfs:recalls optionChristian Ambach2014-03-141-0/+13
| | | | | | | | | | When this option is set to no, an attempt to open an offline file will be rejected with access denied. This helps preventing recall storms triggered by careless applications like Finder and Explorer. Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs_catia: add chmod()Ralph Boehme2014-03-111-0/+20
| | | | | | | | | | | Clients using UNIX extensions need chmod() to go through catia. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Mar 11 13:39:17 CET 2014 on sn-devel-104
* vfs: propagate snapshot enumeration errorsDavid Disseldorp2014-02-271-10/+16
| | | | | | | | | | | | | | | | | The current FSCTL_GET_SHADOW_COPY_DATA/FSCTL_SRV_ENUMERATE_SNAPSHOTS handler squashes all non-ENOSYS errors into an NT_STATUS_UNSUCCESSFUL response. This commit ensures that all errors are propagated up to the client, to aid debugging. The Windows Explorer "Previous Versions" dialogue doesn't appear to distinguish between error codes. It displays "There are no previous versions available". 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): Thu Feb 27 22:42:50 CET 2014 on sn-devel-104
* vfs_glusterfs: Remove "integer fd" code and store the glfs pointers.Jose A. Rivera2014-02-251-90/+32
| | | | | | | Change-Id: I74347199e54be0d1dc031985534da1e56fd3e280 Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Christopher R. Hertel <crh@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* vfs_glusterfs: smb_stat_ex_from_stat commenting and cleanup.Christopher R. Hertel2014-02-251-13/+8
| | | | | | | Change-Id: If1b54e62b4fc2240aa17e5d1eae8f279f2fdfc42 Signed-off-by: Christopher R. Hertel <crh@samba.org> Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Ira Cooper <ira@samba.org>
* vfs_glusterfs: Comment the top of the file.Christopher R. Hertel2014-02-251-8/+18
| | | | | | | Change-Id: I98b512da2e0e56f061247a7c48ce576287b43827 Signed-off-by: Christopher R. Hertel <crh@samba.org> Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Slightly simplify vfswrap_fsctlVolker Lendecke2014-02-121-1/+2
| | | | | | | We have the MIN macro, so use it :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: Fix an uninitialized readVolker Lendecke2014-02-121-0/+1
| | | | | | | We have to ship 64 bytes, and we have to initialize the whole thing. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: vfs_dirsort module.Jeremy Allison2014-02-121-7/+112
| | | | | | | | | | | | | | | | | | | | | | | Allow dirsort to work when multiple simultaneous directories are open. The old code only keeps one active private data pointer on the connection struct, opening a second directory on the same connection will overwrite it. This modification turns the private data pointer into a linked list of open directories on the connection struct, and finds the correct one by searching on the passed in DIR *. With this code in place, smbd passes raw.search torture test on a share definition with: vfs objects = dirsort https://bugzilla.samba.org/show_bug.cgi?id=10406 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* param: rename lp function and variable from "fake_dir_create_times" to ↵Garming Sam2014-02-073-6/+6
| | | | | | | | "fake_directory_create_times" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: modules: streaminfo: As we have no VFS function SMB_VFS_LLISTXATTR we ↵Jeremy Allison2014-02-082-2/+24
| | | | | | | | | | | | | | can't cope with a symlink when lp_posix_pathnames() is true. Fix bug : Bug 10429 - samba returns STATUS_OBJECT_NAME_NOT_FOUND when attempting to remove dangling symlink https://bugzilla.samba.org/show_bug.cgi?id=10429 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Jeff Layton <jlayton@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Feb 8 00:01:16 CET 2014 on sn-devel-104
* dbwrap: add a dbwrap_flags argument to db_open()Michael Adam2014-02-072-2/+2
| | | | | | | | | | This is in preparation to support handing flags to backends, in particular activating read only record support for ctdb databases. For a start, this does nothing but adding the parameter, and all databases use DBWRAP_FLAG_NONE. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* vfs_btrfs: pass-through copy-chunk(len=0) requestsDavid Disseldorp2014-02-061-1/+21
| | | | | | | | | | | Never map copy-chunk(len=0) requests to BTRFS_IOC_CLONE_RANGE ioctls. A BTRFS_IOC_CLONE_RANGE with @src_length=0 results in a clone of all data from @src_offset->EOF! BUG: https://bugzilla.samba.org/show_bug.cgi?id=10424 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* loadparm: rename lp[cfg]_dir_mask to lp[cfg]_directory_mask for consistency ↵Michael Adam2014-02-031-1/+1
| | | | | | | | | with docs Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* vfs_time_audit: Make durable functions staticVolker Lendecke2014-01-241-16/+16
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs/glusterfs: in case atime is not passed, set it to the current atimeNiels de Vos2014-01-151-4/+22
| | | | | | | | | | | | | The Linux CIFS client does not pass an updated atime when a write() is done. This causes the vfs/glusterfs module to set the atime to -1 on the Gluster backend, resulting in an atime far in the future (year 2106). Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jan 15 21:31:30 CET 2014 on sn-devel-104
* s3: Avoid oplock break by storing timestamps with gpfs_set_timesChristof Schmitt2014-01-093-6/+69
| | | | | | | | | | | | | | | | The gpfs_set_times API call allows setting timestamps directly in GPFS without going through the utime() call. Using this API call fixes an unecessary oplock break when a client sends a SET_FILE_ALLOCATION_INFO request and no other client has opened the file. The call to utime() triggers the oplock break through the Linux kernel. Using the gpfs_set_times call for updating the timestamp avoids the call to utime() and the oplock break. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Thu Jan 9 00:04:48 CET 2014 on sn-devel-104
* vfs_glusterfs: Enable per client log filePoornima Gurusiddaiah2013-12-171-20/+29
| | | | | | | | | | | | | | | | In Samba configuration file, one of the options of gluster type is log file, the value of this option was not allowed to contain any variables, as a result all the clients would have a single log file, which complicated debugging. In this patch, variable substitution is performed for gluster log file. Hence allowing user to customise the gluster log file name. Signed-off-by: Poornima Gurusiddaiah <pgurusid@redhat.com> Reviewed-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Dec 17 23:44:16 CET 2013 on sn-devel-104
* scannedonly: Fix CID 242109 Unchecked return value from libraryVolker Lendecke2013-12-171-4/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: Handle stat call with capability in vfs_gpfsAbhidnya Joshi2013-12-161-0/+56
| | | | | | | | Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Mon Dec 16 20:05:23 CET 2013 on sn-devel-104
* s3-waf: build new vfs_worm moduleVolker Lendecke2013-12-121-0/+8
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-modules: add new vfs_worm moduleVolker Lendecke2013-12-121-0/+97
| | | | | | | | VFS module to disallow writes for older files. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* shadow_copy2: Fix some typosDavid Keegel2013-12-121-3/+3
| | | | | | | | Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Dec 12 17:58:24 CET 2013 on sn-devel-104
* shadow_copy2: add a comment explaining why we don't talloc_zero_array().Michael Adam2013-12-111-0/+9
| | | | | | | | | | | Since I stumbled over this slighly sublte point, I thought it is worthwile to point it our in a comment. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Dec 11 19:55:20 CET 2013 on sn-devel-104
* shadow_copy2: revert expensive and unnecessary zero-initializationMichael Adam2013-12-111-1/+1
| | | | | | | | | | | | | | | I was being overly cautious. This is initialization is not necessary, since further down in the for-loop, the memory always gets fully initialized because the insert string is inserted at various slash positions. So this talloc_zero_array can be skipped: this an expensive thing to do in virtually every VFS call. This essentially reverts commit 249e9b4a34d8959bd94735c1921ecfc24d6a2705. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:vfs_btrfs change includesChristian Ambach2013-12-071-2/+1
| | | | | | | use the ones from libreplace instead of system ones Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* s3:vfs fix a compile warningChristian Ambach2013-12-071-1/+1
| | | | | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Sat Dec 7 14:20:43 CET 2013 on sn-devel-104
* s3:modules:shadow_copy2: remove redundant documentation comment blockMichael Adam2013-12-071-77/+4
| | | | | | | | | and refer to the manual page instead Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* 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>