1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

107624 Commits

Author SHA1 Message Date
Jeremy Allison
5098636c78 s4: nmblookup: Allocate event context off NULL instead of talloc_autofree_context().
It's already correctly freed on exit.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat May 13 21:01:25 CEST 2017 on sn-devel-144
2017-05-13 21:01:25 +02:00
Jeremy Allison
dd8008250b s4: cifsdd: Allocate the event context off NULL, not talloc_autofree_context().
Ensure it's freed on exit paths.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-05-13 16:50:13 +02:00
Jeremy Allison
1ad4bae262 s4: client: Allocate event context off struct smbclient_context *, not talloc_autofree_context().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-05-13 16:50:13 +02:00
Jeremy Allison
3cfa58de12 gensec: Add a TALLOC_CTX * to gensec_register().
Pass in the TALLOC_CTX * from the module init to remove
another talloc_autofree_context() use.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-05-13 16:50:13 +02:00
Jeremy Allison
6f05597f5f s4: ntvfs: Add a TALLOC_CTX * to sys_notify_register().
Pass in the TALLOC_CTX * from the module init to remove
another talloc_autofree_context() use.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-05-13 16:50:13 +02:00
Jeremy Allison
f0d8913a0f s4: ntvfs: Add a TALLOC_CTX * to sys_lease_register().
Pass in the TALLOC_CTX * from the module init to remove
another talloc_autofree_context() use.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-05-13 16:50:13 +02:00
Jeremy Allison
e1b4df414f s4: ntvfs: Add a TALLOC_CTX * paramter to pvfs_acl_register()
Make use of the passed in TALLOC_CTX * from the init function
to remove a talloc_autofree_context() use.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-05-13 16:50:13 +02:00
Jeremy Allison
91852dd081 s4: torture: Remove use of local variables that are simply mirroring popt_get_cmdline_credentials().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May 12 00:37:29 CEST 2017 on sn-devel-144
2017-05-12 00:37:29 +02:00
Jeremy Allison
4039e51a6f s4: popt: Change from talloc_autofree_context() to NULL context.
Call popt_free_cmdline_credentials() on successful exit from torture.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-11 20:30:13 +02:00
Jeremy Allison
91267449ec s4: popt: Make cmdline_credentials static.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-11 20:30:13 +02:00
Jeremy Allison
b2de5a81bf s4: popt: Global replace of cmdline_credentials -> popt_get_cmdline_credentials().
Add one use of popt_set_cmdline_credentials().
Fix 80 column limits when cmdline_credentials changes
to popt_get_cmdline_credentials().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-11 20:30:13 +02:00
Jeremy Allison
dd4a3ce927 s4: popt: Add set/get/free functions for cmdline_credentials.
Preparing to make this static instead of a global.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-11 20:30:13 +02:00
Jeremy Allison
560c37524b s4: Add TALLOC_CTX * to register_server_service().
Use the passed in context from callers. Remove one
talloc_autofree_context().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-11 20:30:13 +02:00
Jeremy Allison
3429829a42 s4: auth: Remove a talloc_autofree_context() use.
Use NULL here, not the autofree context for this
static pointer. The destructor prevents freeing this
memory anyway.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-11 20:30:13 +02:00
Jeremy Allison
34f616fc6f s4: auth: Add TALLOC_CTX * to auth_register()
Use the talloc context passed into all modules.
Remove one more talloc_autofree_context().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-11 20:30:12 +02:00
Andreas Schneider
1e5797d19c testprogs: Add 'net rpc user' test against AD DC
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-05-11 20:30:12 +02:00
Karolin Seeger
fc4dfd73d4 docs: Remove old docs.
This does not yet remove the Makefile rules for the removed xml, someone
with better make-fu should step in here.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu May 11 19:37:37 CEST 2017 on sn-devel-144
2017-05-11 19:37:37 +02:00
Karolin Seeger
cc7ae1098a docs: Rename Samba3-Developers-Guide to Samba-Developers-Guide
This guide is not obsolete but needs an update.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed May 10 19:57:36 CEST 2017 on sn-devel-144
2017-05-10 19:57:36 +02:00
Günther Deschner
8e52229fe8 s3-lib/idmap_cache: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:21 +02:00
Günther Deschner
84451e8639 s4-lib/policy: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:21 +02:00
Günther Deschner
86c9a0228d s4-libcli: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
Günther Deschner
0a74793f0e s4-auth: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
Günther Deschner
3a11a797a7 s4-rpc_server: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
Günther Deschner
02b4275e6d s3-rpc_server: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
Günther Deschner
7567a86604 s3-proto: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
Günther Deschner
36f8f8e81b s3-libsmb: remove some dead prototype
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
Günther Deschner
af8946df25 s3-lib: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
Günther Deschner
3c96b18be3 s3-winbindd: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
Günther Deschner
24c4a6a595 s3-smbd: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
Günther Deschner
8e321676b9 lib/krb5_samba: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
Günther Deschner
7575f54a90 s3-passdb: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
Günther Deschner
693716d7e6 s3-auth: remove some dead prototypes
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10 15:53:20 +02:00
David Disseldorp
de01e117d6 smbd/smb2_ioctl: instruct VFS to ignore locks for dup extents
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
2017-05-10 12:27:00 +02:00
David Disseldorp
c4fd960166 vfs: add VFS_COPY_CHUNK_FL_IGNORE_LOCKS for dup extents
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>
2017-05-10 08:22:19 +02:00
David Disseldorp
b97d8c81a7 smbd/smb2_ioctl: validate dup_extent request lengths
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>
2017-05-10 08:22:19 +02:00
David Disseldorp
fb31e359bf smbd/smb2_ioctl: check sparseness for dup extents
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>
2017-05-10 08:22:19 +02:00
Aurelien Aptel
e953184662 vfs_btrfs: report FILE_SUPPORTS_BLOCK_REFCOUNTING capability
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2017-05-10 08:22:19 +02:00
David Disseldorp
a222108284 smbd/smb2_ioctl: check for for overlap of dup extent ranges
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2017-05-10 08:22:19 +02:00
Aurelien Aptel
373d3015bc smbd/smb2_ioctl: add support for FSCTL_DUPLICATE_EXTENTS_TO_FILE
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-05-10 08:22:19 +02:00
Aurelien Aptel
fc2b3662b8 vfs: add parameter to copy chunk VFS function to handle dup_extents
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>
2017-05-10 08:22:18 +02:00
David Disseldorp
3361b5fca3 torture/ioctl: expect dup_extents(dest=compressed) to pass
The MS-FSCC spec doesn't mention anything about dup-extents against
compressed files.
This can't be tested against Windows, as ReFS doesn't support
compression, but COW clones of compressed files work on Btrfs.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2017-05-10 08:22:18 +02:00
David Disseldorp
3b4d6267d1 torture/ioctl: fix dup_extents destination truncate
The dup_extents_compressed_dest test fails to correctly truncate the
dup_extents destination. Fix it.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2017-05-10 08:22:18 +02:00
David Disseldorp
da95471bf4 packaging: Remove Mandrake
Mandriva was discontinued in 2011, and the link in the readme is dead.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed May 10 07:35:20 CEST 2017 on sn-devel-144
2017-05-10 07:35:20 +02:00
Andreas Schneider
66735f3d33 packaging: Remove SWAT references from Solaris
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2017-05-10 03:26:15 +02:00
Andreas Schneider
c3be2a9e3e packaging: Remove SWAT references from RHEL
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2017-05-10 03:26:15 +02:00
Andreas Schneider
219505fed7 packaging: Remove SWAT references from RHEL-CTDB
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2017-05-10 03:26:15 +02:00
Andreas Schneider
0a23cde8ef packaging: Remove LSB packaging
This hasn't been touched since 2001.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2017-05-10 03:26:14 +02:00
Andreas Schneider
fb4eba0c94 packaging: Remove setup script for SWAT
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2017-05-10 03:26:14 +02:00
Volker Lendecke
4ed1bfb9f8 dbwrap_ctdb: Fix a typo
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
2017-05-10 03:25:40 +02:00
Günther Deschner
51ddb563ef s3-gpo: Fix CID #1405972 Resource leak
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-05-09 23:20:08 +02:00