summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* s3: leases: send_break_message() public.Jeremy Allison2014-12-052-1/+4
| | | | | | | | | We're going to need this to allow async SMB2 setinfo renames to send lease break messages as well as the open code. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: leases: Make aio_add_req_to_fsp() public.Jeremy Allison2014-12-052-1/+2
| | | | | | | | We're going to need this to stop handle closures with outstanding async SMB2 renames causing a crash. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: leases : Cope with renaming leased open files.Jeremy Allison2014-12-051-1/+24
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: leases: Add leases_db_rename() to cope with renaming a leased file.Jeremy Allison2014-12-052-1/+27
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-recoverd: Process all the records for vacuum fetch in a loopAmitay Isaacs2014-12-051-4/+1
| | | | | | | | | | | | | | Processing one migration request at a time is very slow and processing a batch of records can take longer than VacuumInterval. This causes subsequent vacuum fetch requests to be dropped. The dropped records can accumulate quickly and will cause the vacuum database traverse to be quite expensive. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Dec 5 17:06:58 CET 2014 on sn-devel-104
* ctdb-vacuum: Do not delete VACUUM MIGRATED records immediatelyAmitay Isaacs2014-12-051-0/+5
| | | | | | | | Such records should be processed by the local vacuuming daemon to ensure that all the remote copies have been deleted first. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-vacuum: Use non-blocking lock when traversing delete treeAmitay Isaacs2014-12-051-5/+1
| | | | | | | | This avoids vacuuming getting in the way of ctdb daemon to process record requests. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-vacuum: Use non-blocking lock when traversing delete queueAmitay Isaacs2014-12-051-5/+1
| | | | | | | | This avoids vacuuming getting in the way of ctdb daemon to process record requests. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-vacuum: Stagger vacuuming child processesAmitay Isaacs2014-12-051-0/+11
| | | | | | | | This prevents multiple child processes being forked at the same time for vacuuming TDBs. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-vacuum: Track time for vacuuming in database statisticsAmitay Isaacs2014-12-053-0/+12
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* vfs_fruit: add AAPL optionsRalph Boehme2014-12-051-0/+35
| | | | | | | | 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 Dec 5 00:34:01 CET 2014 on sn-devel-104
* s4:torture:vfs_fruit: smb2/create context AAPL testRalph Boehme2014-12-041-0/+273
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/raw: make short_name available in bufferRalph Boehme2014-12-042-0/+2
| | | | | | | | | | This will be used in smb2/create AAPL context torture tests, where the server returns an Mac OS X specific data blob in the short name buffer. It's not a string, so the existing string extraction doesn't cut it. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: add SMB_VFS_READDIR_ATTR() to marshall direntryRalph Boehme2014-12-041-6/+58
| | | | | | | | | | | | | | SMB_VFS_READDIR_ATTR is a last minute hook to fetch additional metadata for a directory entry when we're already marshalling the SMB reply buffer. This would we used, when there's a need to repurpose some fields in the the reply, like it's done with Apple's SMB2 extension "AAPL". We then fetch AAPL metadata with the shiny new SMB_VFS_READDIR_ATTR() VFS call and marshall appropiately. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_fruit: AAPL supportRalph Boehme2014-12-041-6/+453
| | | | | | | | | | * readdir_attr VFS functions, used in trans2 when marshalling metadata associated with a directory entry * support for reading and writing UNIX mode via MS NFS ACEs in NT ACL Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: ignore dacls with MS NFS ACEsRalph Boehme2014-12-043-0/+22
| | | | | | | | | | Ignore NFS ACEs in code the modifies * default POSIX ACLs * VFS: NFSv4 ACLs * VFS: xattr and tdb ACLs Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli/security: add a function that checks for MS NFS ACEsRalph Boehme2014-12-042-0/+24
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli/security: add NFS SID mappingsRalph Boehme2014-12-042-0/+22
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: add SMB2 AAPL create context definesRalph Boehme2014-12-042-0/+47
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:vfs: add create tags to SMB_VFS_CREATEFILERalph Boehme2014-12-0420-57/+125
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: allocate out_context_blobs with tallocRalph Boehme2014-12-041-16/+21
| | | | | | | | | | | | | By tallocing the out_context_blobs instead of using an automatic stack variable, we can use out_context_blobs as talloc parent for individual create tag that we add via smb2_create_blob_add(). This is in preperation of a SMB_VFS_CREATE_FILE modification where I add the in and out_context_blobs as additional args. With this change in place we can add create tags to out_context_blobs from there too. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:vfs: add SMB_VFS_READDIR_ATTR()Ralph Boehme2014-12-0410-0/+129
| | | | | | | | | | | | SMB_VFS_READDIR_ATTR is a last minute hook to fetch additional metadata for a directory entry when we're already marshalling the SMB reply buffer. This would be used, when there's a need to repurpose some fields in the the reply, like it's done with Apple's SMB2 extension "AAPL". Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* unix_msg: Fix unix_msg_test_drainVolker Lendecke2014-12-041-0/+7
| | | | | | | | | | | | poll_funcs_init_tevent does not register a tevent context by default. This used to be the case in an early development stage, but apparently I haven't tested this for a while :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Thu Dec 4 18:55:08 CET 2014 on sn-devel-104
* docs-xml: document the interaction between "write cache size" and "aio ↵Stefan Metzmacher2014-12-041-0/+2
| | | | | | | | | | read/write size" Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Dec 4 08:09:15 CET 2014 on sn-devel-104
* s3:smbd: document the interaction between "smb2 leases" and "write cache size"Stefan Metzmacher2014-12-043-0/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest:Samba3: use "smb2 leases = yes"Jeremy Allison2014-12-042-13/+1
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_negprot: announce support for SMB2.1 leases.Jeremy Allison2014-12-041-0/+8
| | | | | | | | | | We only do this with "smb2 leases = yes" and the default values for "oplocks = yes" and "kernel oplocks = no". Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:param: Add "smb2 leases" parameter. Default "false".Jeremy Allison2014-12-045-0/+40
| | | | | | | This is currently marked as experimental! Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_create: support leases and pass them down to the VFS layer.Volker Lendecke2014-12-041-4/+87
| | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: Implementation of SMB2.1 and SMB3.0 leases.Volker Lendecke2014-12-046-178/+681
| | | | | | | | | Pair-Programmed-With: Jeremy Allison <jra@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: add lease related helper functions to oplock.cVolker Lendecke2014-12-042-0/+303
| | | | | | | | | Pair-Programmed-With: Jeremy Allison <jra@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: add lease key validation functions to open.cVolker Lendecke2014-12-041-0/+192
| | | | | | | | | | | | | This makes sure a lease key can only be used for one specific file. This also handles the dynamic share file case [homes]. Pair-Programmed-With: Jeremy Allison <jra@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: add lease related helper functions to open.cVolker Lendecke2014-12-042-0/+215
| | | | | | | | | Pair-Programmed-With: Jeremy Allison <jra@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: add file_find_one_fsp_from_lease_key() helper functionVolker Lendecke2014-12-042-0/+21
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_create: validate durable reconnects with leasesVolker Lendecke2014-12-041-0/+63
| | | | | | | | We don't support leases yet, but prepares for the comming commits. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_create: allow durable handles with SMB2_LEASE_HANDLEVolker Lendecke2014-12-042-2/+2
| | | | | | | | | We don't support real lease yet, but this makes use of fsp_lease_type() which converts a batch oplock into and RWH lease. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: add fsp_lease_type() and get_lease_type() helper functionsVolker Lendecke2014-12-043-0/+41
| | | | | | | | These convert the oplock state into SMB2_LEASE_ flags. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:vfs.h: add more elements to struct fsp_leaseStefan Metzmacher2014-12-041-0/+2
| | | | | | | | We'll need a reference to the smbd_server_connection as well as a timeout handler. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:locking: add downgrade_share_lease() helper functionVolker Lendecke2014-12-042-0/+86
| | | | | | | | | Pair-Programmed-With: Jeremy Allison <jra@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: cleanup leases_db from share_mode_cleanup_disconnected()Stefan Metzmacher2014-12-041-0/+12
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:locking: ensure all share mode removal functions go through a common ↵Jeremy Allison2014-12-041-3/+88
| | | | | | | | | lease refcount manager. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:open_files.idl: add data structures for SMB2.1 and SMB3.0 leases.Stefan Metzmacher2014-12-048-9/+83
| | | | | | | Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: add leases_db infrastructureVolker Lendecke2014-12-047-0/+473
| | | | | | | | | | | | | | Will enable us to solve the dynamic share path problem with leases on [homes]. We're also able to give the correct error codes when a lease key is re-used with a different file name. Pair-Programmed-With: Jeremy Allison <jra@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: leases: libsmbsharemodes no longer works with SMB2 leases inside our ↵Jeremy Allison2014-12-046-25/+8
| | | | | | | | | locking.tdb. Remove it until a maintainer can be found. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_server: add smbd_smb2_send_lease_break() helper functionVolker Lendecke2014-12-042-0/+29
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_server: allow smbd_smb2_send_break() with session == NULL and tcon ↵Stefan Metzmacher2014-12-041-4/+9
| | | | | | | | | | == NULL In future we want to use this for lease breaks and they're not attached to a session. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: Add fsp_client_guid() utility function to return the connected ↵Jeremy Allison2014-12-042-0/+6
| | | | | | | client guid. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: factor out a send_break_to_none() helper functionVolker Lendecke2014-12-041-16/+24
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: let smb2.lease.[v2_]complex1 check the R->NONE breaksStefan Metzmacher2014-12-041-6/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture:smb2: Add smb2.lease.v2_breaking3 test.Jeremy Allison2014-12-041-1/+207
| | | | | | | This verifies the epoch handling in the multi step break. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>