summaryrefslogtreecommitdiff
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* s3:gse: add simple gensec_gse_update_send/recv() wrapper functionsStefan Metzmacher2017-05-211-15/+71
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpc_server: move gensec_update() out of auth_generic_server_authtype_start*()Stefan Metzmacher2017-05-213-24/+14
| | | | | | | | | We let the caller use auth_generic_server_step() instead. This allows us to request GENSEC_FEATURE_SIGN_PKT_HEADER before starting the gensec_update() dance. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:cli_pipe: ask for GENSEC_FEATURE_SIGN_PKT_HEADER after the ↵Stefan Metzmacher2017-05-211-7/+13
| | | | | | | | | | | gensec_update() dance Most features should be added before the update() dance, while GENSEC_FEATURE_SIGN_PKT_HEADER needs to be after the dance on the client side. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:gse: always announce GENSEC_FEATURE_SIGN_PKT_HEADER support.Stefan Metzmacher2017-05-211-9/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:libsmb: don't rely on gensec_session_key() to work on an unfinished ↵Stefan Metzmacher2017-05-211-1/+4
| | | | | | | | | | | | | authentication If smbXcli_session_is_guest() returns true, we should handle the authentication as anonymous and don't touch the gensec context anymore. Note that smbXcli_session_is_guest() always returns false, if signing is required! Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: smbd: Fix open_files.idl to correctly ignore share_mode_lease *lease in ↵Jeremy Allison2017-05-182-3/+3
| | | | | | | | | | | | | | | | | | | | | share_mode_entry. This is currently marked 'skip', which means it isn't stored in the db, but printed out in ndr dump. However, this pointer can be invalid if the lease_idx is set to 0xFFFFFFFF (invalid). This is fixed up inside parse_share_modes(), but not until after ndr_pull_share_mode_data() is called. If lease_idx == 0xFFFFFFFF then ndr_print_share_mode_lease() prints an invalid value and crashes. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12793 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 18 03:01:40 CEST 2017 on sn-devel-144
* vfs_fruit: add pread_send/recv and pwrite_send/recvRalph Boehme2017-05-171-0/+182
| | | | | | | | | | | This is needed to support copy-chunk of streams. vfs_default issues calls to async pread and pwrite (send/recv versions) since commit60e45a2d25401eaf9a15a86d19114670ccfde259. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12787 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* vfs_streams_xattr: add pread_send/recv and pwrite_send/recvRalph Boehme2017-05-171-0/+165
| | | | | | | | | | | This is needed to support copy-chunk of streams. vfs_default issues calls to async pread and pwrite (send/recv versions) since commit 60e45a2d25401eaf9a15a86d19114670ccfde259. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12787 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* libads: abstract out SASL wrapping codeAlexander Bokovoy2017-05-176-212/+243
| | | | | | | | | | | | | | Prepare for rebasing libads on top of libsmbldap. To make libads using 'struct smbldap_state' instead of direct LDAP structure, we need to abstract out libads logic from connection handling. SASL wrapping does not really depend on availability of LDAP handle and does not need direct access to ADS_STRUCT. As result, we'll be able to move SASL wrapping code under smbldap once the latter is able to pass settings that libads passes to the SASL wrapping. Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* SMB_INFO_ALLOCATION: return with UINT32_MAX rather than cutting at 4 bytesPeter Somogyi2017-05-171-0/+6
| | | | | | | | | | | | An AIX cifs client queries SMB_INFO_ALLOCATION that has only 4 bytes to report dfree and dsize. Return the max instead of random unexpeced numbers. Signed-off-by: Peter Somogyi <psomogyi@hu.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed May 17 05:49:46 CEST 2017 on sn-devel-144
* winbindd: Give winbindd_ads.c its own headerVolker Lendecke2017-05-175-7/+36
| | | | | | | Not necessary to compile all of winbind when playing with ads.h Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: proto.h does not need ads.hVolker Lendecke2017-05-171-1/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd/smb2_ioctl: check for NULL dst_fsp before useDavid Disseldorp via samba-technical2017-05-171-4/+5
| | | | | | | | | | ...not after. CID #1409040. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed May 17 01:46:52 CEST 2017 on sn-devel-144
* s3:winbind: Use a talloc stackframe for rpc_query_user_listAndreas Schneider2017-05-161-16/+24
| | | | | | | CID #1401581 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3-lib/idmap_cache: remove some dead prototypesGünther Deschner2017-05-101-1/+0
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_server: remove some dead prototypesGünther Deschner2017-05-101-24/+0
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-proto: remove some dead prototypesGünther Deschner2017-05-101-11/+0
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-libsmb: remove some dead prototypeGünther Deschner2017-05-101-1/+0
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-lib: remove some dead prototypesGünther Deschner2017-05-101-6/+0
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-winbindd: remove some dead prototypesGünther Deschner2017-05-101-28/+0
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-smbd: remove some dead prototypesGünther Deschner2017-05-101-1/+0
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-passdb: remove some dead prototypesGünther Deschner2017-05-101-5/+0
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-auth: remove some dead prototypesGünther Deschner2017-05-101-9/+0
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* smbd/smb2_ioctl: instruct VFS to ignore locks for dup extentsDavid Disseldorp2017-05-101-1/+3
| | | | | | | | | | | As described in the previous commit - Windows Server 2016 (ReFS) ignores locks for FSCTL_DUPLICATE_EXTENTS_TO_FILE. Do the same for Samba. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed May 10 12:27:00 CEST 2017 on sn-devel-144
* vfs: add VFS_COPY_CHUNK_FL_IGNORE_LOCKS for dup extentsDavid Disseldorp2017-05-103-55/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As confirmed by the Microsoft Protocol Open Specifications Team: Windows Server 2016 (ReFS) ignores locks for FSCTL_DUPLICATE_EXTENTS_TO_FILE... From: Jeff McCashland To: David Disseldorp CC: "cifs-protocol@lists.samba.org" <cifs-protocol@lists.samba.org> Subject: RE: [116100414754619] FSCTL_DUPLICATE_EXTENTS_TO_FILE appears to completely bypass file locks Date: Mon, 12 Dec 2016 20:44:08 +0000 Hi David, We have made the following spec changes for the next doc release: In section 2.1.5.9.4 FSCTL_DUPLICATE_EXTENTS_TO_FILE behavior notes have been added to the following paragraphs. Before: § The object store MUST check for byte range lock conflicts on Open.Stream using the algorithm described in section 2.1.4.10 with ByteOffset set to InputBuffer.TargetFileOffset, Length set to InputBuffer.ByteCount, IsExclusive set to TRUE, LockIntent set to FALSE, and Open set to Open. If a conflict is detected, the operation MUST be failed with STATUS_FILE_LOCK_CONFLICT. § The object store MUST check for byte range lock conflicts on Source using the algorithm described in section 2.1.4.10 with ByteOffset set to InputBuffer.SourceFileOffset, Length set to InputBuffer.ByteCount, IsExclusive set to FALSE, LockIntent set to FALSE, and Open set to InputBuffer.FileHandle. If a conflict is detected, the operation MUST be failed with STATUS_FILE_LOCK_CONFLICT. After: § The object store SHOULD<WBN1> check for byte range lock conflicts on Open.Stream using the algorithm described in section 2.1.4.10 with ByteOffset set to InputBuffer.TargetFileOffset, Length set to InputBuffer.ByteCount, IsExclusive set to TRUE, LockIntent set to FALSE, and Open set to Open. If a conflict is detected, the operation MUST be failed with STATUS_FILE_LOCK_CONFLICT. § The object store SHOULD<WBN2> check for byte range lock conflicts on Source using the algorithm described in section 2.1.4.10 with ByteOffset set to InputBuffer.SourceFileOffset, Length set to InputBuffer.ByteCount, IsExclusive set to FALSE, LockIntent set to FALSE, and Open set to InputBuffer.FileHandle. If a conflict is detected, the operation MUST be failed with STATUS_FILE_LOCK_CONFLICT. WBN1: The ReFS file system in Windows Server 2016 does not check for byte range lock conflicts on Open.Stream. WBN2: The ReFS file system in Windows Server 2016 does not check for byte range lock conflicts on Source. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* smbd/smb2_ioctl: validate dup_extent request lengthsDavid Disseldorp2017-05-101-0/+65
| | | | | | | | | | FSCTL_DUPLICATE_EXTENTS_TO_FILE has some interesting behaviour when exceeding the destination file length - the clone is truncated to only cover the existing file region. If the existing length is zero, then nothing is cloned. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* smbd/smb2_ioctl: check sparseness for dup extentsDavid Disseldorp2017-05-101-0/+28
| | | | | | | | | | | | | | | | | | | | | | FSCTL_DUPLICATE_EXTENTS_TO_FILE should fail if the source is marked sparse while the target is not: From: Jeff McCashland To: David Disseldorp Subject: RE: FSCTL_DUPLICATE_EXTENTS_TO_FILE questions, 116092214702946 Date: Tue, 27 Dec 2016 18:06:14 +0000 ... We have updated the spec for future release: Section 2.3.8 FSCTL_DUPLICATE_EXTENTS_TO_FILE Reply Changed description of STATUS_NOT_SUPPORTED error code to: "--The source and target destination ranges overlap on the same file. --Source file is sparse, while -target is a non-sparse file. --The source range is beyond the source file's allocation size." Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* vfs_btrfs: report FILE_SUPPORTS_BLOCK_REFCOUNTING capabilityAurelien Aptel2017-05-101-1/+2
| | | | | | Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* smbd/smb2_ioctl: check for for overlap of dup extent rangesDavid Disseldorp2017-05-101-0/+55
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* smbd/smb2_ioctl: add support for FSCTL_DUPLICATE_EXTENTS_TO_FILEAurelien Aptel2017-05-101-0/+150
| | | | | | Signed-off-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* vfs: add parameter to copy chunk VFS function to handle dup_extentsAurelien Aptel2017-05-109-19/+63
| | | | | | | | | FSCTL_DUPLICATE_EXTENTS_TO_FILE must be handled as a COW clone. Add a copy-chunk flags parameter to the VFS to handle this. Signed-off-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* dbwrap_ctdb: Fix a typoVolker Lendecke2017-05-101-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): Wed May 10 03:25:40 CEST 2017 on sn-devel-144
* s3-gpo: Fix CID #1405972 Resource leakGünther Deschner2017-05-091-0/+1
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-spoolss: add winreg_del_driver_package_internal()Günther Deschner2017-05-092-0/+35
| | | | | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue May 9 20:44:17 CEST 2017 on sn-devel-144
* s3-rpc_cli: add winreg_del_driver_package()Günther Deschner2017-05-092-0/+121
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-spoolss: add winreg_get_driver_package_internal()Günther Deschner2017-05-092-0/+41
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_cli: add winreg_get_driver_package()Günther Deschner2017-05-092-0/+157
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-spoolss: add winreg_add_driver_package_internal()Günther Deschner2017-05-092-1/+41
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_cli: add winreg_add_driver_package()Günther Deschner2017-05-092-0/+115
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-spoolss: add winreg_add_core_driver_internal()Günther Deschner2017-05-092-0/+34
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_cli: add winreg_add_core_driver()Günther Deschner2017-05-095-0/+267
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-spoolss: add winreg_get_core_driver_internal()Günther Deschner2017-05-092-0/+40
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_cli: add winreg_get_core_driver()Günther Deschner2017-05-092-0/+185
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: popt: Change to NULL from talloc_autofree_context() now we correctly ↵Jeremy Allison2017-05-091-1/+1
| | | | | | | | | | free on exit. 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): Tue May 9 14:00:40 CEST 2017 on sn-devel-144
* s3: client tools: Call popt_free_cmdline_auth_info() on all normal exits.Jeremy Allison2017-05-095-0/+9
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: client tools. Remove direct access to struct user_auth_info ↵Jeremy Allison2017-05-098-123/+144
| | | | | | | | | | *cmdline_auth_info. Only access through utility functions. Remove all the local pointer aliases that were just being set to cmdline_auth_info in the client tools. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: popt: Add utility functions popt_get_cmdline_auth_info(), ↵Jeremy Allison2017-05-092-0/+12
| | | | | | | | | | popt_free_cmdline_auth_info(). Leave the global cmdline_auth_info still exposed, we will make it static once the users have been converted to the utility functions. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: popt: When using a global variable, don't hide it by helper locals.Jeremy Allison2017-05-091-18/+16
| | | | | | | That makes it very unclear when you're using a global. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-gpo: Build scripts, security and registry CSE with --enable-developerGünther Deschner2017-05-094-0/+7
| | | | | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue May 9 05:18:52 CEST 2017 on sn-devel-144
* s3-gpo: Fix build of scripts CSEGünther Deschner2017-05-091-17/+22
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>