summaryrefslogtreecommitdiffstats
path: root/source3/modules
Commit message (Collapse)AuthorAgeFilesLines
* vfs_snapper: check for <linux/ioctl.h>Ralph Boehme2014-11-091-0/+2
| | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun Nov 9 16:02:24 CET 2014 on sn-devel-104
* btrfs: don't leak opened directory handleNoel Power2014-11-041-6/+16
| | | | | | | | | | | | | Closing a directory handle file descriptor via close() is undefined, according to: http://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Nov 4 20:51:02 CET 2014 on sn-devel-104
* s3:vfs:aio_pthread: use smbXsrv_connection for ↵Michael Adam2014-10-231-1/+9
| | | | | | | | | | | | | | | | | | | schedule_deferred_open_message_smb This fixes an incompatible pointer warning which uncovered a real bug. This caller was missed when converting the function. This fix is only temporary, since we use fsp->sconn->client->connections which is supposed to be the start of the list of transport connections by a given client treated by this smbd process. Currently there is only one such connection, but with multi-channel there might be more. So we will need to improve this in the future. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Oct 23 23:10:35 CEST 2014 on sn-devel-104
* vfs: fix a typoVolker Lendecke2014-10-211-1/+1
| | | | | | | | 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): Tue Oct 21 04:58:44 CEST 2014 on sn-devel-104
* vfs_posixacl: catch ACL_EVERYONE on FreeBSDRalph Boehme2014-10-121-0/+5
| | | | | | | | | | | | Using POSIX ACL API on FreeBSD may return NFSv4 style tag type ACL_EVERYONE. Catch the error and issue a helpful log message telling users to enable zfsacl VFS module. 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): Sun Oct 12 00:22:19 CEST 2014 on sn-devel-104
* s3: lib, s3: modules: Fix compilation on Solaris.Jeremy Allison2014-10-061-1/+4
| | | | | | | | | | | | | | | | Based on work from YOUZHONG YANG <youzhong@gmail.com>. Code needs fixing when HAVE_STRUCT_MSGHDR_MSG_CONTROL is not defined. Also Solaris doesn't have msg_flags field (which we set to zero anyway, so if we initialize the entire struct to zero, we never need to refer to it). https://bugzilla.samba.org/show_bug.cgi?id=10849 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 Oct 6 12:33:36 CEST 2014 on sn-devel-104
* vfs_fruit: deal with vfs_catia not being loadedRalph Boehme2014-10-011-3/+21
| | | | | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Oct 1 01:59:25 CEST 2014 on sn-devel-104
* vfs_fruit: remove redundant assignmentRalph Boehme2014-09-301-1/+0
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* vfs_fruit: fix possible uninitialized useRalph Boehme2014-09-301-4/+4
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* vfs_fruit: update rfork size in AppleDouble headerRalph Boehme2014-09-251-0/+8
| | | | | | | | | | | | Update the AppleDouble entry with the new size when ftruncating a resource fork. 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): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 25 23:43:35 CEST 2014 on sn-devel-104
* vfs_fruit: ad_write: path may be NULL for rforkRalph Boehme2014-09-251-2/+5
| | | | | | | | | | In preperation of the next commit where we want to call ad_write() on a resource fork without having a name, just an fsp, which is fine for resource forks. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs_fruit: fix resource fork length calculationRalph Boehme2014-09-251-7/+3
| | | | | | | | Don't add the AppleDouble header size to the resource fork size. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs_fruit: fix unpacking of AppleDouble filesRalph Boehme2014-09-251-2/+4
| | | | | | | | | | | OS X AppleDouble files may contain a FinderInfo AppleDouble entry larger then 32 bytes containing additional packed xattrs. ad_unpack() must deal with this in a way that allows callers to possibly fixup the entry. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: vfs module: Adding new vfs module for Symantec VxFS.Abhidnya Joshi2014-09-182-0/+718
| | | | | | | | | | | | | | This mainly handles ACL related functions. Modified to add requirement for -DCFLAGS=-DXATTR_USER_NTACL="user.NTACL" and to hide access to XATTR_USER_NTACL by jra. Signed-off-by: Abhidnya Joshi <abhidnya_joshi@symantec.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 18 02:30:06 CEST 2014 on sn-devel-104
* s3: smbd: Change the function signature of srvstr_push() from returning a ↵Jeremy Allison2014-09-161-2/+8
| | | | | | | | | | | | | | | | | length to returning an NTSTATUS with a length param. srvstr_push_fn() now returns an NTSTATUS reporting any string conversion failure. We need to get serious about returning character set conversion errors inside smbd. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* vfs_gpfs: Fix the build with profiling-dataVolker Lendecke2014-09-161-4/+4
| | | | | | | | | | This fails with -Werror=declaration-after-statement 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): Tue Sep 16 01:55:57 CEST 2014 on sn-devel-104
* media_harmony: Fix a crash bugVolker Lendecke2014-09-121-2/+2
| | | | | | | | | | | | Now that the dust has settled, fix a crash bug that was hidden behind the warnings... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Sep 12 02:45:40 CEST 2014 on sn-devel-104
* media_harmony: Fix warningsVolker Lendecke2014-09-121-12/+9
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* vfs_acl_common: dacl size must be updatedRalph Boehme2014-09-111-0/+3
| | | | | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> 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 Sep 11 03:54:42 CEST 2014 on sn-devel-104
* s3: smbd: vfs_dirsort module.Jeremy Allison2014-09-031-1/+1
| | | | | | | | | | | Fix an off-by-one check that would cause seekdir to seek off the end of the cached array. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg.gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Sep 3 19:59:54 CEST 2014 on sn-devel-104
* New VFS module vfs_fruitRalph Boehme2014-08-182-0/+2953
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This module provides enhanced compatibility with Apple SMB clients and interoperability with a Netatalk 3 AFP fileserver. The module intercepts the OS X special streams "AFP_AfpInfo" and "AFP_Resource" and handles them in a special way. All other named streams are deferred to vfs_streams_xattr. The OS X client maps all NTFS illegal characters to the Unicode private range. This module optionally stores the charcters using their native ASCII encoding. Open modes are optionally checked against Netatalk AFP share modes. The "AFP_AfpInfo" named stream is a binary blob containing OS X extended metadata for files and directories. This module optionally reads and stores this metadata in a way compatible with Netatalk 3 which stores the metadata in an EA "org.netatalk.metadata". Cf source3/include/MacExtensions.h for a description of the binary blobs content. The "AFP_Resource" named stream may be arbitrarily large, thus it can't be stored in an EA on most filesystem. ZFS on Solaris is an exception to the rule, because it there EAs can be of any size and EAs are first-class filesystem objects that can be used with normal file syscalls like open(), read(), write(), fcntl() asf. This module stores the AFP_Resource stream in an AppleDouble file, prepending "._" to the filename. On Solaris and ZFS the stream is optionally stored in an EA "org.netatalk.ResourceFork". Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs3: Pass "lease" through SMB_VFS_CREATE_FILEVolker Lendecke2014-08-115-2/+11
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_full_audit: Optionally log security descriptors in FSET_NT_ACLVolker Lendecke2014-08-071-2/+20
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_full_audit: Add "full_audit:syslog"Volker Lendecke2014-08-071-11/+24
| | | | | | | | | | | Defaults to true (for compatibility) With full_audit:syslog=false we DEBUG the messages with level 1. You can explicitly [en|dis]able this with debug class full_audit:0/1 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_full_audit: Save full_audit:priority in private_dataVolker Lendecke2014-08-071-1/+4
| | | | | | | lp_parm_enum can become expensive Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_full_audit: Save full_audit:facility in private_dataVolker Lendecke2014-08-071-3/+13
| | | | | | | lp_parm_enum can become expensive Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_full_audit: Pass "vfs_full_audit_private_data" to log_failure/success()Volker Lendecke2014-08-071-16/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: move libasys state from smbXsrv_connection to smbd_server_connectionStefan Metzmacher2014-08-061-7/+7
| | | | | | | | | | This doesn't belong to a connection, it's state used within the VFS stack. And smbd_server_connection is the legacy structure we're using for global VFS state. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:vfs:gpfs: remove a block and reduce indentation in gpfs_is_offline()Michael Adam2014-07-241-8/+6
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:vfs:gpfs: remove all writing uses of stat_ex.vfs_private from vfs_gpfs.Michael Adam2014-07-241-7/+0
| | | | | | | | | | Now that the vfs_private cache is never read in vfs_gpfs, there is no need any more to write it. With this change, vfs_gpfs does not use vfs_private any more. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:vfs:gpfs: Remove all reading uses of stat_ex.vfs_private from vfs_gfs.Michael Adam2014-07-241-23/+22
| | | | | | | | | | | | | | | | | This was used as a cache for offline-info in the stat buffer. But as the implementation of gpfs_is_offline() showed, this cache does not always carry valid information when the stat itself is valid (since at least one call goes to fstatat() directly, circumventing the vfs). So the correct thing is to always call SMB_VFS_IS_OFFLINE() when checking whether a file is offline. For the pread and pwrite calls, we need to call IS_OFFLINE before the actual read and check afterwards if the file was offline before (as a basis whether to send notifications). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* Revert "s3:vfs:gpfs: log when winAttr-garbage is detected (by heuristics) in ↵Michael Adam2014-07-241-5/+0
| | | | | | | | | | | | | is_offline" This reverts commit 8f44883db94314c007c197927a9dd0809076754d. The next commits will be removing all access to stat_ex.vfs_private from vfs_gpfs. This revert of the last addition is a preparation. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:vfs:gpfs: log when winAttr-garbage is detected (by heuristics) in is_offlineMichael Adam2014-07-131-0/+5
| | | | | | | | | | In is_offline(), check whether the winAttrs are filled with bits outside 0xFFFF and log it prominently: Since GPFS only fills 0xFFFF, this could be due to an uninitialized buffer (or another vfs module filling vfs_private? ...). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:vfs:gpfs: fix flapping offline: always get winAttrs from gpfs for is_offlineMichael Adam2014-07-131-3/+1
| | | | | | | | | | | | | | | | | | There is a problem of flapping offline due to uninitialized stat buffers. Due to a optimization in vfswrap_readdir which directly calling fastatat (i.e. not through vfs), marking the stat buffer valid, there is nothing this module can do about it and hence can not currently not rely on the vaildity of the stat buffer. By always calling out to GPFS even when the stat buffer is flagged valid, we can always return correct offline information, thereby sacrificing the readdir optimization. Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:vfs:gpfs: store the winAttrs in the struct_ex when we got them in ↵Michael Adam2014-07-131-0/+1
| | | | | | | | | vfs_gpfs_fstat() This may (e.g.) have lead to some occurrences of flapping offline bits. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:vfs:gpfs: remove extra empty lines.Michael Adam2014-07-101-2/+0
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jul 10 02:50:44 CEST 2014 on sn-devel-104
* s3: VFS modules: Ignore EPERM errors on [f]chmod in crossrename module.Jeremy Allison2014-07-081-2/+4
| | | | | | | This is already done for [f]chown errors. Fix from CurlyMo <curlymoo1@gmail.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* smbd: Remove unused blocking_lock_record* from VFS_BRL_CANCEL_WINDOWSVolker Lendecke2014-07-043-8/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove unused blocking_lock_record* from VFS_BRL_LOCK_WINDOWSVolker Lendecke2014-07-043-8/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_snapper: use a talloc hierarchy for arraysDavid Disseldorp2014-06-301-27/+5
| | | | | | | | | | | Currently the config and snapshot array entries are freed individually. A talloc hierarchy can be used to avoid this behaviour. 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): Mon Jun 30 21:41:13 CEST 2014 on sn-devel-104
* vfs_snapper: don't redefine GMT_FORMAT macroDavid Disseldorp2014-06-301-2/+1
| | | | | | | Use existing header definition. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: add previous file version support for vfs_snapperDavid Disseldorp2014-06-301-0/+1215
| | | | | | | | | | | | | | Windows attempts to access previous file versions by first issuing an FSCTL_SRV_ENUMERATE_SNAPSHOTS request, and then using the corresponding snapshot timestamps in subsequent path based requests. This change sees vfs_snapper provide snapshot enumeration data via the get_shadow_copy_data VFS hook. Path based operations are also intercepted, with @GMT-$time components converted to snapper .snapshot/# paths. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: add vfs_snapper moduleDavid Disseldorp2014-06-302-0/+835
| | | | | | | | | Provides an interface for accessing snapshots exposed by Snapper. The module communicates with snapperd on the local machine using the D-Bus interface. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-shadow-copy2: Protect against already converted namesVolker Lendecke2014-06-271-0/+28
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Jun 27 09:03:53 CEST 2014 on sn-devel-104
* s3-shadow-copy2: Add more debugsVolker Lendecke2014-06-271-0/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3-shadow-copy2: Fix incorrect case submountsVolker Lendecke2014-06-271-10/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3-shadow-copy2: Remove TODO and fix commentsChristof Schmitt2014-06-271-7/+8
| | | | | | | | | The patch "s3-shadow-copy2: Fix dir/@GMT-2012.10.15-13.48.43 form of paths" takes care of a case marked as TODO, remove it and adjust the comments accordingly. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3-shadow-copy2: Fix dir/@GMT-2012.10.15-13.48.43 form of pathsVolker Lendecke2014-06-271-2/+2
| | | | | | | | | | The previous clause in shadow_copy2_strip_snapshot would only handle @GMT- at the end of a pathname if it was the *only* pathname component. XP seems to send @GMT- at the end under certain circumstances even with a path prefix. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3-shadow-copy2: Add extreme debug output to shadow_copy2_strip_snapshotVolker Lendecke2014-06-271-0/+8
| | | | | | | This is sooo hairy to debug when things go wrong :-( Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* build: fix the test and define for msg_accrightsMichael Adam2014-06-161-1/+1
| | | | | | | | | | | It must be "msg_accrights" not "msg_acctrights" ... ^ Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Jun 16 18:18:04 CEST 2014 on sn-devel-104