summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* s3:vfs: add create tags to SMB_VFS_CREATEFILERalph Boehme2014-12-0418-54/+117
| | | | | 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-048-0/+111
| | | | | | | | | | | | 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
* s3:smbd: document the interaction between "smb2 leases" and "write cache size"Stefan Metzmacher2014-12-041-0/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@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-041-0/+1
| | | | | | | 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-043-19/+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>
* 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: 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>
* s3-libads: remove unused dn from ads_get_service_principal_names().Günther Deschner2014-11-281-7/+0
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Nov 28 16:46:20 CET 2014 on sn-devel-104
* test: Fix samba3.blackbox.net.registry.checkVolker Lendecke2014-11-281-1/+1
| | | | | | | | | | On FreeBSD, "wc -l" returns whitespace. Cope with that. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Nov 28 10:24:06 CET 2014 on sn-devel-104
* s3:smb2_create: send interim responses after 0.5 millisecondsStefan Metzmacher2014-11-271-7/+1
| | | | | | | | | | | | | | | | We don't have to care about delayed NT_STATUS_SHARING_VIOLATION anymore after the following commit: commit 4111fcfd4f570d39d46a0d414546ca62c7b609be Author: Jeremy Allison <jra@samba.org> Date: Thu May 2 11:12:47 2013 -0700 Only do the 1 second delay for sharing violations for SMB1, not SMB2. Match Windows behavior. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* gse_krb5: Avoid a segfault when we can not read the dedicated keytab fileAndrew Bartlett2014-11-272-33/+9
| | | | | | | | | | | | | | | This improved code simply cleans up the memory as soon as possible, rather than using memcmp(). Otherwise, we segfault if krb5_kt_start_seq_get fails, as it can set the fd element in the handle to -1. Change-Id: Ib4821ef944a7e12cd8a891ae07dbfc0567c65495 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Nov 27 07:38:02 CET 2014 on sn-devel-104
* wbinfo: create a more comprehensive test for sids2xidsGarming Sam2014-11-271-15/+71
| | | | | | | | | | | In particular, this tests that ID_TYPE_BOTH is cached correctly. Change-Id: I2475f22d3f4506c93b15d82b0d337d3729bbbd4c Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Thu Nov 27 05:16:53 CET 2014 on sn-devel-104
* wbinfo: fix tests and lack of cache flushingGarming Sam2014-11-271-2/+2
| | | | | | Change-Id: I1a0a8f62522a6eb64d39bee48f4f71403d7c343a Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* registry3: Fix a typoVolker Lendecke2014-11-261-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove unused get_share_params()David Disseldorp2014-11-262-24/+0
| | | | | | | | | | | Given a share name, get_share_params() returns corresponding snum inside a struct share_params. find_service() provides duplicate functionality. 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): Wed Nov 26 21:27:21 CET 2014 on sn-devel-104
* srv_srvsvc_nt: remove unneeded get_share_params() callDavid Disseldorp2014-11-261-8/+3
| | | | | | | | The snum and share name are already determined via the prior find_service() call. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* gencache: Request mutexes for gencache_notrans.tdbChristof Schmitt2014-11-261-1/+2
| | | | | | | | | | | The check in tdb_wrap ensures that mutexes are only used on systems that properly support them. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Nov 26 19:04:11 CET 2014 on sn-devel-104
* gencache: Convert gencache.tdb to tdb_wrapChristof Schmitt2014-11-261-30/+31
| | | | | | | | This change is not strictly necessary, but for consistency both gencache tdbs are now opened through tdb_wrap. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* gencache: Convert gencache_notrans to use tdb_wrapChristof Schmitt2014-11-261-25/+28
| | | | | | | This allows using on the mutex check in tdb_wrap. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>