summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* s4:torture:smb2: Add test that shows the client can respond to a lease break ↵Jeremy Allison2014-12-041-0/+111
| | | | | | | over a different connection. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* pam_winbind: fix warn_pwd_expire implementation.Günther Deschner2014-12-031-1/+4
| | | | | | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=9056 warn_pwd_expire parameter is not working as documented in pam_winbind manual page. This patch adds missing bit and allows disabling warning message fully, i.e. setting warn time to zero days. Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Dec 3 21:36:49 CET 2014 on sn-devel-104
* s3:idmap_cache: remove unused idmap_cache_set_sid2[u|g]id()Stefan Metzmacher2014-12-032-74/+0
| | | | | | | | | Change-Id: I40bcfacb812b0dac7917533c9baf82a79f598efd Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Wed Dec 3 06:44:29 CET 2014 on sn-devel-104
* pdb: Increase version number to fix ABIGarming Sam2014-12-033-14/+330
| | | | | | | | | | | | | In the process, we can also rename pdb to avoid conflicts with libpdb. We don't depend directly on pdb to avoid duplicate symbols. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10355 Change-Id: I4df6ba2f4ce35d3718dc4198b527cca46a139efe Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* idmap: return the correct id type to *id_to_sid methodsGarming Sam2014-12-032-3/+19
| | | | | | | | | | | | | | We have a pointer to a unixid which is sent down instead of a uid or gid. We can use this as an in-out variable so that pdb_samba_dsdb can be returned ID_TYPE_BOTH to cache correctly instead of leaving it as ID_TYPE_UID or ID_TYPE_GID. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10720 Change-Id: I0cef2e419cbb337531244b7b41c708cf2ab883e3 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* idmap: unify passdb *id_to_sid methodsGarming Sam2014-12-039-97/+129
| | | | | | | | | | | | | | | Instead of passing down gid or uid, a pointer to a unixid is now sent down. This acts as an in-out variable so that the idmap functions can correctly receive ID_TYPE_BOTH, filling in cache details correctly rather than forcing the cache to store ID_TYPE_UID or ID_TYPE_GID. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10720 Change-Id: I11409a0f498e61a3c0a6ae606dd7af1135e6b066 Pair-programmed-with: Andrew Bartlett <abarlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:utils/profiles fix a use after freeChristian Ambach2014-12-031-3/+3
| | | | | | | | | | | path is a talloc-child of subkeys, so subkeys should not be freed before calling verbose_output Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Wed Dec 3 00:43:19 CET 2014 on sn-devel-104
* s3:registry/regfio fix some valgrind warningsChristian Ambach2014-12-021-2/+2
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:registry/regfio read SD from the correct locationChristian Ambach2014-12-021-2/+4
| | | | | | | | | try to find the security descriptor at the data pointer, not at the beginning of the hbin Bug: https://bugzilla.samba.org/show_bug.cgi?id=9629 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-libsmb: Duplicate the memory before we free it.Andreas Schneider2014-12-021-3/+6
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10279 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Dec 2 21:46:53 CET 2014 on sn-devel-104
* s3-libsmb: Set the netbios_name in use_ccache case too.Andreas Schneider2014-12-021-0/+9
| | | | | | | | | | If we do not set the netbios_name we are not able to connect to a Windows DC. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10279 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3-lib: Do not require a password with --use-ccache.Andreas Schneider2014-12-022-3/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10279 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* tdb: version 1.3.3Stefan Metzmacher2014-12-022-1/+69
| | | | | | | | | | | | This fixes the tdb1-run-mutex-openflags2 test when robust mutexes are available. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10781 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Dec 2 11:54:28 CET 2014 on sn-devel-104