summaryrefslogtreecommitdiff
path: root/source3/modules
Commit message (Collapse)AuthorAgeFilesLines
* vfs_fruit: delete 0 byte size streams if AAPL is enabledRalph Boehme2018-05-301-0/+3
| | | | | | | | | | | | | | | | | | macOS SMB server uses xattrs as storage backend for streams, directly exposing xattr get/set characteristics. Setting EOF on a stream to 0 just deletes the xattr as macOS doesn't support 0-byte sized xattrs. Note that this does not apply to the AFP_AfpInfo and AFP_Resource streams, they have even stranger semantics and we have other tests for those. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13441 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed May 30 02:34:29 CEST 2018 on sn-devel-144
* vfs_gpfs: Use full_path_tos instead of talloc_asprintfChristof Schmitt2018-05-261-5/+8
| | | | | | | | | | | full_path_tos avoids the talloc call for most cases; use that instead of talloc_asprintf. 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): Sat May 26 01:43:09 CEST 2018 on sn-devel-144
* vfs_gpfs: Remove get_full_smb_filename from is_offline checkChristof Schmitt2018-05-251-13/+4
| | | | | | | No stream information is required here. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_gpfs: Remove wrong get_full_smb_filename from ntimes functionChristof Schmitt2018-05-251-10/+2
| | | | | | | | Updating the timestamps requires the path to the file, but no stream information. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_gpfs: Adjust debug level when get_winattrs returns EBADFChristof Schmitt2018-05-251-1/+10
| | | | | | | | | This is returned for a get_winattrs call against a non-gpfs file system. This can happen for the .. entry when listing a share on the file system root. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: vfs_fake_acls: Correctly implement the chmod/fchmod algorithm on fake acls.Jeremy Allison2018-05-251-0/+214
| | | | | | | | | | We now pass samba3hide(nt4_dc), so remove it from knownfail. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri May 25 21:29:32 CEST 2018 on sn-devel-144
* s3: VFS: Remove SMB_VFS_FCHMOD_ACL().Jeremy Allison2018-05-2512-141/+0
| | | | | | | No longer used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: modules: vfs_ceph: Remove FCHMOD_ACL in cephwrap_fchmod().Jeremy Allison2018-05-251-15/+0
| | | | | | | | Now I understand the use of the mask in POSIX ACLs this extra step is no longer needed. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: modules: vfs_default: Remove FCHMOD_ACL in fchmod.Jeremy Allison2018-05-251-17/+0
| | | | | | | | Now I understand the use of the mask in POSIX ACLs this extra step is no longer needed. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: VFS: Remove SMB_VFS_CHMOD_ACL().Jeremy Allison2018-05-2516-357/+0
| | | | | | | No longer used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: modules: vfs_ceph: Remove CHMOD_ACL in cephwrap_chmod().Jeremy Allison2018-05-251-20/+0
| | | | | | | | Now I understand the use of the mask in POSIX ACLs this extra step is no longer needed. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: modules: vfs_ceph: Remove CHMOD_ACL in cephwrap_mkdir().Jeremy Allison2018-05-251-24/+3
| | | | | | | | Now I understand the use of the mask in POSIX ACLs this extra step is no longer needed. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: modules: vfs_default: Remove CHMOD_ACL in chmod.Jeremy Allison2018-05-251-21/+0
| | | | | | | | Now I understand the use of the mask in POSIX ACLs this extra step is no longer needed. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: modules: vfs_default: Remove CHMOD_ACL in mkdir.Jeremy Allison2018-05-251-17/+1
| | | | | | | | | Now I understand the use of the mask in POSIX ACLs this extra step is no longer needed. If the mkdir succeeded it's already set the correct mode. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs_time_audit: Fix a log messageVolker Lendecke2018-05-251-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* vfs_zfsacl: return synthesized ACL when ZFS return ENOTSUPRalph Boehme2018-05-181-2/+34
| | | | | | | | | | | | | This allows accessing the ZFS .snapshots directory where ZFS returns ENOTSUP when calling acl(".snapshots"). Bug: https://bugzilla.samba.org/show_bug.cgi?id=13175 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri May 18 22:03:21 CEST 2018 on sn-devel-144
* s3:modules: Initialize pointers in vfs_virusfilterAndreas Schneider2018-05-161-1/+1
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove extra 0x prefix for the "%p" format specifiers, avoiding 0x0x0 ↵Timur I. Bakeyev2018-05-161-2/+2
| | | | | | | | strings in the output. Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* s3:smbd: fix interaction between chown and SD flagsRalph Boehme2018-05-111-2/+5
| | | | | | | | | | | | | A change ownership operation that doesn't set the NT ACLs must not touch the SD flags (type). Bug: https://bugzilla.samba.org/show_bug.cgi?id=13432 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri May 11 23:30:32 CEST 2018 on sn-devel-144
* samdb: Add remote address to connectGary Lockyer2018-05-101-1/+3
| | | | | Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* vfs_ceph: add fake async pwrite/pread send/recv hooksDavid Disseldorp2018-05-091-1/+108
| | | | | | | | | | | | | As found by Jeremy, VFS modules that don't provide pread_send() or pwrite_send() hooks result in vfs_default fallback, which is catastrophic for VFS modules with non-mounted filesystems such as vfs_ceph. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13425 Reported-by: Jeremy Allison <jra@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: VFS: Fix memory leak in vfs_ceph.Vandana Rungta2018-05-091-10/+11
| | | | | | | | | | | | | Centralize error handling. https://bugzilla.samba.org/show_bug.cgi?id=13424 Signed-off-by: Vandana Rungta <vrungta@amazon.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed May 9 04:28:11 CEST 2018 on sn-devel-144
* s3: VFS: Remove SMB_VFS_WRITE() function and all implementations.Jeremy Allison2018-05-056-89/+0
| | | | | | | | | | All code in Samba now uses SMB_VFS_PWRITE or SMB_VFS_PWRITE_SEND. 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): Sat May 5 01:38:07 CEST 2018 on sn-devel-144
* s3: VFS: ceph: Replace the lseek/write ftruncate extend with pwrite.Jeremy Allison2018-05-041-7/+2
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: default: Remove recursion into the VFS inside the default pwrite call.Jeremy Allison2018-05-041-1/+1
| | | | | | | We already know we're at the POSIX level here. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: default: Remove fallback if we don't have HAVE_PWRITE set. Samba ↵Jeremy Allison2018-05-041-18/+2
| | | | | | | | | doesn't work without pwrite. Start of the changes to remove synchronous VFS write. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Remove SMB_VFS_READ() function and all implementations.Jeremy Allison2018-05-046-83/+0
| | | | | | | All code in Samba now uses SMB_VFS_PREAD or SMB_VFS_PREAD_SEND. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* vfs_virusfilter_fsav: Initialize stack pointers per README.CodingAndrew Bartlett2018-05-031-1/+1
| | | | | | | This allows a build with --address-sanitizer Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3: VFS: default: Remove recursion into the VFS inside the default pread call.Jeremy Allison2018-05-021-1/+1
| | | | | | | We already know we're at the POSIX level here. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: default: Remove fallback if we don't have HAVE_PREAD set. Samba ↵Jeremy Allison2018-05-021-22/+2
| | | | | | | | | doesn't work without pread. Start of the changes to remove synchronous VFS read. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Remove fsync_fn() from the VFS and all modules. VFS ABI change.Jeremy Allison2018-05-027-94/+0
| | | | | | | | 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): Wed May 2 01:06:28 CEST 2018 on sn-devel-144
* ceph: VFS: Add asynchronous fsync to ceph module, fake using synchronous call.Jeremy Allison2018-04-301-0/+53
| | | | | | | | | | | | | This will allow me to ultimately simplify the VFS by removing the synchronous fsync VFS call. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13412 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 Apr 30 21:48:55 CEST 2018 on sn-devel-144
* s3:vfs_aio_pthread: make use of pthreadpool_tevent instead of pthreadpool_pipeStefan Metzmacher2018-04-231-115/+19
| | | | | | | | | | | | | | | pthreadpool_tevent provides a much simpler api and avoids an extra pipe for the completion notification. This means we now have just one thread pool, that's shared for all async pread, pwrite, fsync and openat() calls, instead of having an extra pool for openat() with the same possible number of threads. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Apr 23 13:30:06 CEST 2018 on sn-devel-144
* s3:smbd: call pthreadpool_tevent_init() already in smbd_process()Stefan Metzmacher2018-04-231-31/+0
| | | | | | | | | | | pthreadpool_tevent_init() doesn't start any thread yet, it only allocates a bit of memory. It's easier to start this in a central place, so that it's available to all VFS modules. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: vfs: vfs_streams_xattr: Don't blindly re-use the base file mode bits.Jeremy Allison2018-04-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | When returning the stat struct for an xattr stream, we originally base the st_ex_mode field on the value from the base file containing the xattr. If the base file is a directory, it will have S_IFDIR set in st_ex_mode, but streams can never be directories, they must be reported as regular files. The original code OR'ed in S_IFREG, but neglected to AND out S_IFDIR. Note this is not a complete to fix bug 13380 as it doesn't fix the generic case with all streams modules. See later fix and regression test. Found in real-world use case by Andrew Walker <awalker@ixsystems.com>. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13380 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* vfs_fruit: Fix CID 1416474 Dereference null return valueVolker Lendecke2018-04-111-0/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: smbd: Fix memory leak in vfswrap_getwd()Jeremy Allison2018-04-091-3/+6
| | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13372 Signed-off-by: Andrew Walker <awalker@ixsystems.com>. Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Apr 9 21:48:12 CEST 2018 on sn-devel-144
* s3:modules: Set -Wno-strict-overflow for getdate if supportedAndreas Schneider2018-04-031-0/+5
| | | | | | | bison generates an C89 files which does some weired things. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:modules: Generate new getdate.c with bisonAndreas Schneider2018-04-031-977/+897
| | | | | | | | bison -o source3/modules/getdate.c source3/modules/getdate.y<Paste> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:modules: Update getdate.y to work with newer bison versionsAndreas Schneider2018-04-031-122/+121
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:modules: fix the build of vfs_aixacl2.cStefan Metzmacher2018-04-031-2/+3
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13345 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Apr 3 20:18:58 CEST 2018 on sn-devel-144
* s3:modules: make virusfilter_io_connect_path() more portableStefan Metzmacher2018-04-031-15/+16
| | | | | | | | | We have existing utility functions to prepare a socket. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13343 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org>
* s3:modules: fix the picky-developer build of vfs_virusfilter.c on FreeBSD 11Stefan Metzmacher2018-04-031-2/+3
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13344 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org>
* vfs_fruit: Fix CID 1433613 Operands don't affect resultVolker Lendecke2018-03-291-2/+2
| | | | | | | | | | | Two changes: First, we can't check multiplication overflow after the operation. This has to be done before with a division. Second, there is no OFF_T_MAX, and both operands are size_t, so check for SIZE_MAX. The result is assigned to off_t, but I'm not sure where the automatic coercion from size_t to off_t would happen. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: smbd: Fruit. Make the use of dom_sid_compare_domain() much clearer.Jeremy Allison2018-03-211-2/+3
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13319 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:vfs_preopen: Change to a do-while loop and fix the checkAndreas Schneider2018-03-201-2/+2
| | | | | | | This fixes compilation with -Wstrict-overflow=2 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:modules: Fix size type in getdateAndreas Schneider2018-03-202-2/+2
| | | | | | | This fixes compilation with -Wstrict-overflow=2 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:vfs_nettalk: Fix size typesAndreas Schneider2018-03-201-1/+1
| | | | | | | This fixes compilation with -Wstrict-overflow=2 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: smbd: vfs_fruit: Replace code in fruit_fget_nt_acl() with ↵Jeremy Allison2018-03-161-28/+7
| | | | | | | | | remove_virtual_nfs_aces(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=13319 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: smbd: vfs_fruit: Replace code in check_ms_nfs() with ↵Jeremy Allison2018-03-161-37/+1
| | | | | | | | | remove_virtual_nfs_aces(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=13319 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>