summaryrefslogtreecommitdiff
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* vfs_gpfs: Block punchhole calls for non-sparse filesChristof Schmitt2019-04-231-0/+15
| | | | | | | | | | | | | | The core smbd code implements ZERO_DATA for non-sparse files by punching a hole and filling it again with a fallocate(FL_KEEP_SIZE) call. As GPFS does not provide the fallocate(FL_KEEP_SIZE) call and non-sparse files should not contain holes, block the punchhole; effectively only allowing ZERO_DATA/punchhole calls for sparse files. 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): Tue Apr 23 00:33:03 UTC 2019 on sn-devel-144
* vfs_gpfs: Remove usage of gpfs_preallocChristof Schmitt2019-04-221-37/+3
| | | | | | | | | All supported versions of GPFS now support fallocate. Use the default codepath instead of the API call. Keep the function stub as it will be used for a check later. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Use domain name from lsa query for sid_to_name cache entryChristof Schmitt2019-04-181-2/+3
| | | | | | | | | | | | | | When winbindd is asked to map a name like realm.com\name to a SID ,that is sucessfully resolved through the lsa lookup name call. The same call also returns the short domain name (netbios name of the domain). Use that short domain name for the sid_to_name cache entry, so that subsequent sid_to_name queries return the expected netbiosname\name result and not realm.com\name. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* winbind: Return queried domain name from name_to_sidChristof Schmitt2019-04-189-6/+44
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* winbind: Query domain from winbind sam_name_to_sidChristof Schmitt2019-04-181-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* winbind: Query domain from winbind rpc name_to_sidChristof Schmitt2019-04-181-1/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* winbind: Query domain from msrpc name_to_sidChristof Schmitt2019-04-181-1/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd: Remove share_mode_lease and the leases array from share_mode_entryVolker Lendecke2019-04-146-207/+8
| | | | | | | | | | This also removes the temporary functions introduced during the patchset. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Sun Apr 14 05:18:14 UTC 2019 on sn-devel-144
* smbd: Use share_mode_forall_leases in share_mode_cleanup_disconnected()Volker Lendecke2019-04-141-8/+31
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use share_mode_forall_leases in do_break_to_none()Volker Lendecke2019-04-141-36/+55
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use share_mode_forall_leases in rename_share_filename()Volker Lendecke2019-04-141-22/+33
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Add share_mode_forall_leases()Volker Lendecke2019-04-142-0/+80
| | | | | | | | Function to walk all leases for a file exactly once. This used to be simpler with the leases[] array, thus this function that encapsulates the complexity. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use leases_db in lease_match()Volker Lendecke2019-04-141-4/+21
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Make find_share_mode_lease() staticVolker Lendecke2019-04-142-6/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use leases_db in process_oplock_break_message()Volker Lendecke2019-04-141-59/+78
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use leases_db in vfs_default_durable_reconnect()Volker Lendecke2019-04-141-17/+31
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use leases_db in downgrade_lease()Volker Lendecke2019-04-141-60/+72
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use leases_db in try_lease_upgrade()Volker Lendecke2019-04-141-22/+38
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Split up grant_fsp_lease()Volker Lendecke2019-04-141-76/+100
| | | | | | | Simple refactoring into simpler routines. View best with "git show -b" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Add update_share_mode_lease_from_db()Volker Lendecke2019-04-142-0/+59
| | | | | | | | | | This is an interim function supposed to be around for just a few patches as long as we have both the leases.tdb entries and the leases[] in share_mode_entries around. It makes it easier to transition to just use leases.tdb while keeping the code running. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Don't pass up lease_idx from grant_fsp_leaseVolker Lendecke2019-04-141-8/+1
| | | | | | | | The only reason for grant_fsp_lease to return the lease_idx was to pass it down to set_share_mode. That does not need it anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Don't pass lease_idx down to set_share_mode()Volker Lendecke2019-04-143-22/+70
| | | | | | | | | Temporary patch to keep the code running. The new code in set_share_mode() will leave again once the patchset to remove share_mode_lease and thus the lease_idx in share_mode_entry goes away. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* utils: Use leases_db in smbstatusVolker Lendecke2019-04-141-9/+26
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use leases_db in fsp_lease_update()Volker Lendecke2019-04-141-12/+20
| | | | | | | Remove a reference to "struct share_mode_lease" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use leases_db in get_lease_type()Volker Lendecke2019-04-141-1/+15
| | | | | | | Remove a reference to share_mode_data->leases[] Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use leases_db in delay_for_oplock()Volker Lendecke2019-04-141-1/+13
| | | | | | | Remove a reference to share_mode_data->leases[] Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use share_mode_entry's lease data in lease_match()Volker Lendecke2019-04-141-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use share_mode_entry's lease data in vfs_default_durable_reconnect()Volker Lendecke2019-04-141-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use share_mode_entry's lease data in remove_share_mode_lease()Volker Lendecke2019-04-141-10/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use share_mode_entry's lease data in remove_share_mode_lease()Volker Lendecke2019-04-141-3/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use share_mode_entry's lease data in is_same_lease()Volker Lendecke2019-04-141-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use share_mode_entry's lease data in delay_rename_for_lease_break()Volker Lendecke2019-04-141-5/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use share_mode_entry's lease data in delay_for_oplock()Volker Lendecke2019-04-141-5/+3
| | | | | | | | This was the last "share_mode_lease" reference in this function, remove variable "l". Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Add lease key to share_mode_entryVolker Lendecke2019-04-142-0/+6
| | | | | | | | | | | Instead of indexing into the leases[] array, put the lease_db reference into the share_mode_entry. For simplicity, put in the client guid as well. We *might* be able to retrieve that from somewhere else, but as other smbd processes have to look at the lease values, put in the full leases_db index data. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Use leases_db_set()Volker Lendecke2019-04-142-0/+83
| | | | | | | | Whenever we update the share_mode_lease struct, also update the leases.tdb entry. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* leases_db: Add getter/setter for share_mode_lease metadataVolker Lendecke2019-04-142-0/+186
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* leases_db: Add share_mode_lease info to leases.tdbVolker Lendecke2019-04-144-0/+48
| | | | | | | | | This is the data stored in share_mode_lease inside the leases[] array in locking.tdb. This and all the following patches move all leases array to looking at the leases.tdb. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Pass lease parameters explicitly to find_fsp_leaseVolker Lendecke2019-04-143-8/+22
| | | | | | | This avoids a use of "struct share_mode_lease" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Introduce a helper variable in delay_for_oplock()Volker Lendecke2019-04-141-2/+4
| | | | | | | This removes a few explicit share_mode_lease dereferences Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Introduce a helper variable in delay_for_oplock()Volker Lendecke2019-04-141-5/+6
| | | | | | | | | Why? I am preparing a patchset that will remove "share_mode_lease". This patch is a micro-step towards that, removing a set of references to this struct. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Small optimization for break_to_noneVolker Lendecke2019-04-141-3/+4
| | | | | | | | We don't need to memzero the struct when we can struct-initialize it a bit later, implicitly initializing the rest to zero. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* vfs_ceph: explicitly enable libcephfs POSIX ACL supportDavid Disseldorp2019-04-121-0/+11
| | | | | | | | | | | | | libcephfs disables ACL support by default and returns -EOPNOTSUPP in the POSIX ACL get/setxattr paths as a result. Enable support by setting the following Ceph config parameters during mount: client acl type = posix_acl fuse default permissions = false Bug: https://bugzilla.samba.org/show_bug.cgi?id=13896 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* build: add explicit cephfs include path for vfs_ceph buildsDavid Disseldorp2019-04-121-1/+2
| | | | | | | Needed if building with a custom --with-libcephfs path. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* utils: Move conn_tdb.c to utils/Volker Lendecke2019-04-126-6/+9
| | | | | | | | | | That's a wrapper that only smbstatus and net status use by now. 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): Fri Apr 12 00:37:05 UTC 2019 on sn-devel-144
* smbd: Remove some unused includesVolker Lendecke2019-04-115-5/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* build: Move smbstatus definition to source3/utils/wscript_buildVolker Lendecke2019-04-112-19/+19
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: remove duplicate checkSwen Schillig2019-04-111-4/+0
| | | | | | | | | | | This check was supposed to be removed by c9f4b92a613. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Thu Apr 11 23:34:51 UTC 2019 on sn-devel-144
* modules: Update error check for new string conversion wrapperSwen Schillig2019-04-111-3/+2
| | | | | | | | | | | The new string conversion wrappers detect and flag errors which occured during the string to integer conversion. Those modifications required an update of the callees error checks. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* utils: Update error check for new string conversion wrapperSwen Schillig2019-04-114-18/+7
| | | | | | | | | | | The new string conversion wrappers detect and flag errors which occured during the string to integer conversion. Those modifications required an update of the callees error checks. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* lib: Update error check for new string conversion wrapperSwen Schillig2019-04-112-2/+2
| | | | | | | | | | | The new string conversion wrappers detect and flag errors which occured during the string to integer conversion. Those modifications required an update of the callees error checks. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>