scabrero/samba-autobuild/.git
4 years agoVERSION: Disable GIT_SNAPSHOT for the 4.12.0 release... origin/v4-12-stable samba-4.12.0
Karolin Seeger [Tue, 3 Mar 2020 09:47:25 +0000 (10:47 +0100)]
VERSION: Disable GIT_SNAPSHOT for the 4.12.0 release...

and bump version up to 4.12.0.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
4 years agoWHATSNEW: Add release notes for Samba 4.12.0.
Karolin Seeger [Tue, 3 Mar 2020 09:45:39 +0000 (10:45 +0100)]
WHATSNEW: Add release notes for Samba 4.12.0.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
4 years agoselftest: Test behaviour of DNS scavenge with an existing dNSTombstoned value
Andrew Bartlett [Thu, 30 Jan 2020 03:44:05 +0000 (16:44 +1300)]
selftest: Test behaviour of DNS scavenge with an existing dNSTombstoned value

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14258

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Feb  6 16:24:25 UTC 2020 on sn-devel-184

(cherry picked from commit c8e3c78d4f2a6f3e122fe458aa6835772290a700)

Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Wed Feb 26 12:35:59 UTC 2020 on sn-devel-184

4 years agodsdb: Correctly handle memory in objectclass_attrs
Andrew Bartlett [Thu, 30 Jan 2020 03:41:39 +0000 (16:41 +1300)]
dsdb: Correctly handle memory in objectclass_attrs

el->values is caller-provided memory that should be thought of as constant,
it should not be assumed to be a talloc context.

Otherwise, if the caller gives constant memory or a stack
pointer we will get an abort() in talloc when it expects
a talloc magic in the memory preceeding the el->values.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14258

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 3657bbc21182d764ddfcd603025f24ec240fd263)

4 years agoVERSION: Bump version up to 4.12.0rc5...
Karolin Seeger [Wed, 26 Feb 2020 07:38:24 +0000 (08:38 +0100)]
VERSION: Bump version up to 4.12.0rc5...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
4 years agoVERSION: Disable GIT_SNAPSHOT for th Samba 4.12.0rc4 release. samba-4.12.0rc4
Karolin Seeger [Wed, 26 Feb 2020 07:37:26 +0000 (08:37 +0100)]
VERSION: Disable GIT_SNAPSHOT for th Samba 4.12.0rc4 release.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
4 years agoWHATSNEW: Add release notes for Samba 4.12.0rc4.
Karolin Seeger [Tue, 25 Feb 2020 08:57:47 +0000 (09:57 +0100)]
WHATSNEW: Add release notes for Samba 4.12.0rc4.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
4 years agoldb: version 2.1.1
Stefan Metzmacher [Tue, 25 Feb 2020 10:06:27 +0000 (11:06 +0100)]
ldb: version 2.1.1

* Bug 14270:
  Samba 4.11 and later give incorrect results for SCOPE_ONE searches

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Tue Feb 25 12:59:02 UTC 2020 on sn-devel-184

(cherry picked from commit 0ca46a37268c8219192abc3ab5f2546a02ed8862)

Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Tue Feb 25 21:09:41 UTC 2020 on sn-devel-184

4 years agoldb: Add tests aimed at the SCOPE_ONELEVEL bug in particular
Andrew Bartlett [Wed, 12 Feb 2020 03:28:01 +0000 (16:28 +1300)]
ldb: Add tests aimed at the SCOPE_ONELEVEL bug in particular

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14270

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 0b8ab0200805127e36eeb2affe561f3aee59604a)

4 years agoldb: Fix search with scope ONE and small result sets
Andrew Bartlett [Fri, 7 Feb 2020 03:56:13 +0000 (16:56 +1300)]
ldb: Fix search with scope ONE and small result sets

This changes the LDB behaviour in the combination of a SCOPE_ONE search and
an index returning less than 10 results.

After b6b5b5fe355fee2a4096e9214831cb88c7a2a4c6 the list->strict flag
became set to false in all cases, rather than being left to the
value set by the caller.

This changes the ldb_kv_index_dn_one() code to force strict
mode on success instead.

Thanks to Marcus Granér, ICEYE Oy for reporting.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14270

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 3c7261c43da491b57f50e0e64d7050d85c6b973e)

4 years agoldb: Ensure @IDXONE modes is tested in ldb.python (apy.py) tests
Andrew Bartlett [Wed, 12 Feb 2020 00:44:44 +0000 (13:44 +1300)]
ldb: Ensure @IDXONE modes is tested in ldb.python (apy.py) tests

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ec34a7095705592279647c5046a000e0bf052d1a)

4 years agoldb: Add tests aimed at the SCOPE_ONELEVEL particular
Andrew Bartlett [Tue, 11 Feb 2020 22:45:36 +0000 (11:45 +1300)]
ldb: Add tests aimed at the SCOPE_ONELEVEL particular

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14270

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 167676973b7f1db563da04d54e8ce5668034081c)

4 years agoldb: Add tests for one-level indexes in conjunction with other indexes
Andrew Bartlett [Mon, 10 Feb 2020 01:08:29 +0000 (14:08 +1300)]
ldb: Add tests for one-level indexes in conjunction with other indexes

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14270

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 17bd63dbea7f6e6358f81f0ac5b9392b2321bb32)

4 years agosmbd: Separate aio_pthread indicator from normal EINTR
Volker Lendecke [Thu, 20 Feb 2020 13:13:35 +0000 (14:13 +0100)]
smbd: Separate aio_pthread indicator from normal EINTR

According to Posix and the Linux open(2) manpage, the open-syscall can
return EINTR. If that happens, core smbd saw this as an indication
that aio_pthread's open function was doing its job. With a real EINTR
without aio_pthread this meant we ended up in a server_exit after 20
seconds, because there was nobody to do the retry.

EINTR is mapped to NT_STATUS_RETRY. Handle this by just retrying after
a second.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14285
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): Thu Feb 20 22:14:25 UTC 2020 on sn-devel-184

(cherry picked from commit aebe427b77b5315eb5d2b05b8c72824ca0389723)

4 years agolib: Map EINPROGRESS->NT_STATUS_MORE_PROCESSING_REQUIRED
Volker Lendecke [Thu, 20 Feb 2020 09:25:16 +0000 (10:25 +0100)]
lib: Map EINPROGRESS->NT_STATUS_MORE_PROCESSING_REQUIRED

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14285
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 4a943d842a51674425f0c4019f823ef0a9d09f49)

4 years agotest: Show that smbd does not handle EINTR from open() correctly
Volker Lendecke [Wed, 19 Feb 2020 14:25:38 +0000 (15:25 +0100)]
test: Show that smbd does not handle EINTR from open() correctly

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14285
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 7bbba73b30f06304e9a2ad48e853d9ec8171dd30)

4 years agotest: Intercept open in vfs_error_inject
Volker Lendecke [Wed, 19 Feb 2020 13:44:11 +0000 (14:44 +0100)]
test: Intercept open in vfs_error_inject

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14285
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 305204a241b74c599f4f6a064cac6608afd9c893)

4 years agoWHATSNEW: Announce new Spotlight backend for Elasticsearch
Ralph Boehme [Thu, 20 Feb 2020 13:19:04 +0000 (14:19 +0100)]
WHATSNEW: Announce new Spotlight backend for Elasticsearch

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Fri Feb 21 10:46:08 UTC 2020 on sn-devel-184

4 years agoWHATSNEW: samba-tool improvements
Andrew Bartlett [Fri, 21 Feb 2020 00:04:39 +0000 (13:04 +1300)]
WHATSNEW: samba-tool improvements

This text is based on https://gitlab.com/samba-team/samba/-/merge_requests/1015
by Björn Baumbach, just re-worked a little to suit the WHATSNEW.

I wrote the second section

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
4 years agoWHATSNEW: Add zlib and fuzzing notes
Andrew Bartlett [Thu, 20 Feb 2020 23:24:02 +0000 (12:24 +1300)]
WHATSNEW: Add zlib and fuzzing notes

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
4 years agobuild: Do not check if system perl modules should be bundled
Andrew Bartlett [Sun, 2 Feb 2020 20:51:12 +0000 (09:51 +1300)]
build: Do not check if system perl modules should be bundled

We do not ship any perl modules in third_party at this time, so
this check is pointless and breaks the build for --bundled-libraries=ALL.

As reported by aaptel on https://gitlab.com/samba-team/samba/-/merge_requests/1104#note_281050331

This changes our autobuild script to cover this case in the
samba-static job.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14284

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
(cherry picked from commit cf4984947b39e9f6f8afd29de8a760703bf9e092)

Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Thu Feb 20 12:58:46 UTC 2020 on sn-devel-184

4 years agopidl/wscript: configure should insist on Parse::Yapp::Driver
Douglas Bagnall [Sun, 2 Feb 2020 03:05:38 +0000 (16:05 +1300)]
pidl/wscript: configure should insist on Parse::Yapp::Driver

following 83ffe6752d589180eac96d7b8e7d1a54e3476bfd, you get a build
error if you lack a system perl Parse::Yapp. Let's make it a configure
failure instead.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14284

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Feb  2 10:09:11 UTC 2020 on sn-devel-184

(cherry picked from commit af47a77673f58cc6436798b250c90be0e325d20e)

4 years agos3: DFS: Don't allow link deletion on a read-only share.
Jeremy Allison [Fri, 7 Feb 2020 00:20:59 +0000 (16:20 -0800)]
s3: DFS: Don't allow link deletion on a read-only share.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14269

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 0450593e38d62fe0b925d789486517ade31fe3c6)

4 years agos3: DFS: Don't allow link creation on a read-only share.
Jeremy Allison [Thu, 6 Feb 2020 23:55:13 +0000 (15:55 -0800)]
s3: DFS: Don't allow link creation on a read-only share.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14269

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit b4195cd488e1366887acfea6ae03bf4198514a15)

4 years agoVERSION: Bump version up to 4.12.0rc4...
Karolin Seeger [Wed, 19 Feb 2020 10:09:30 +0000 (11:09 +0100)]
VERSION: Bump version up to 4.12.0rc4...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
4 years agoVERSION: Disable GIT_SNAPSHOT for the 4.12.0rc3 release. samba-4.12.0rc3
Karolin Seeger [Wed, 19 Feb 2020 10:08:49 +0000 (11:08 +0100)]
VERSION: Disable GIT_SNAPSHOT for the 4.12.0rc3 release.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
4 years agoVERSION: Add release notes for Samba 4.12.0rc3.
Karolin Seeger [Wed, 19 Feb 2020 10:08:16 +0000 (11:08 +0100)]
VERSION: Add release notes for Samba 4.12.0rc3.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
4 years agoWHATSNEW.txt update explaining SMB_VFS_CREATE_DFS_PATHAT() / SMB_VFS_READ_DFS_PATHAT().
Jeremy Allison [Wed, 19 Feb 2020 00:23:22 +0000 (16:23 -0800)]
WHATSNEW.txt update explaining SMB_VFS_CREATE_DFS_PATHAT() / SMB_VFS_READ_DFS_PATHAT().

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Wed Feb 19 07:52:15 UTC 2020 on sn-devel-184

4 years agos3: DFS: Remove is_msdfs_link_internal() - no longer used.
Jeremy Allison [Wed, 12 Feb 2020 21:54:08 +0000 (13:54 -0800)]
s3: DFS: Remove is_msdfs_link_internal() - no longer used.

All DFS links are now read through the VFS and not via
symlink calls.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

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): Tue Feb 18 22:34:16 UTC 2020 on sn-devel-184

(cherry picked from commit 9ee1320049cf148a2bb102bbdee4a4bcc24c0de1)

4 years agos3: DFS: Change the last use of is_msdfs_link_internal() -> SMB_VFS_READ_DFS_PATHAT...
Jeremy Allison [Wed, 12 Feb 2020 21:52:58 +0000 (13:52 -0800)]
s3: DFS: Change the last use of is_msdfs_link_internal() -> SMB_VFS_READ_DFS_PATHAT() inside form_junctions().

is_msdfs_link_internal() is no longer used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 94068b5438013479b0426fea7f83bbd7f8f935e9)

4 years agos3: DFS: Replace calls to is_msdfs_link_internal() inside dfs_path_lookup() with...
Jeremy Allison [Wed, 12 Feb 2020 21:41:56 +0000 (13:41 -0800)]
s3: DFS: Replace calls to is_msdfs_link_internal() inside dfs_path_lookup() with SMB_VFS_READ_DFS_PATHAT().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 3c77a9e7116bc3f1e3c9bf89c28a32bdb6cdffe1)

4 years agos3: DFS: Change dfs_path_lookup() to return struct referral list and count directly.
Jeremy Allison [Wed, 12 Feb 2020 21:17:51 +0000 (13:17 -0800)]
s3: DFS: Change dfs_path_lookup() to return struct referral list and count directly.

Remove external parse of returned link targetpath, expose
the parsing previously added to dfs_path_lookup().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 1668c9ee15b421093756ac9d709f55ce3e808791)

4 years agos3: DFS: Parse the returned target path in dfs_path_lookup().
Jeremy Allison [Tue, 11 Feb 2020 22:21:12 +0000 (14:21 -0800)]
s3: DFS: Parse the returned target path in dfs_path_lookup().

Currently unused, but this will ease the transition to
using SMB_VFS_READ_DFS_PATHAT().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 1ffc52abedae9787f745795a4f502c26b4c005d1)

4 years agos3: DFS: Change simple is_msdfs_link() call to use SMB_VFS_READ_DFS_PATHAT().
Jeremy Allison [Tue, 11 Feb 2020 21:35:53 +0000 (13:35 -0800)]
s3: DFS: Change simple is_msdfs_link() call to use SMB_VFS_READ_DFS_PATHAT().

This will need an extra dirfsp parameter in future, but this
is the easiest change for now.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 07a3cd56cddfc0e27a75ca76e556e2fdb18c3291)

4 years agos3: VFS: vfs_time_audit: Add read_dfs_pathat().
Jeremy Allison [Fri, 14 Feb 2020 21:08:04 +0000 (13:08 -0800)]
s3: VFS: vfs_time_audit: Add read_dfs_pathat().

Not yet used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 0528584482f798753d636675da778917f50ca845)

4 years agos3: VFS: vfs_full_audit: Add read_dfs_pathat().
Jeremy Allison [Tue, 11 Feb 2020 18:02:18 +0000 (10:02 -0800)]
s3: VFS: vfs_full_audit: Add read_dfs_pathat().

Not yet used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 263df988831a40ba751b19c1715277e80095818c)

4 years agos3: VFS: catia: Add read_dfs_pathat().
Jeremy Allison [Tue, 11 Feb 2020 18:02:00 +0000 (10:02 -0800)]
s3: VFS: catia: Add read_dfs_pathat().

Not yet used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 16acdc348db71a29bec93d62073ca30a4a920389)

4 years agos3: VFS: cap: Add cap_read_dfs_pathat().
Jeremy Allison [Tue, 11 Feb 2020 17:48:05 +0000 (09:48 -0800)]
s3: VFS: cap: Add cap_read_dfs_pathat().

Not yet used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 9f6c01b2cd82963bfa05552aa41dfafcb0bf7637)

4 years agos3: VFS: shadow_copy2: Add shadow_copy2_read_dfs_pathat().
Jeremy Allison [Tue, 28 Jan 2020 20:12:09 +0000 (12:12 -0800)]
s3: VFS: shadow_copy2: Add shadow_copy2_read_dfs_pathat().

Not yet used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 9e92d46b757d6a4cdd0f956c24b30df89adf2798)

4 years agos3: VFS: gluster: Add vfs_gluster_read_dfs_pathat().
Jeremy Allison [Tue, 28 Jan 2020 18:46:43 +0000 (10:46 -0800)]
s3: VFS: gluster: Add vfs_gluster_read_dfs_pathat().

Not yet used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 018af49b93f8e9a2cbc0d40cc68b8202e5c95c9a)

4 years agos3: VFS: ceph: Add vfswrap_ceph_read_dfs_pathat().
Jeremy Allison [Tue, 28 Jan 2020 18:18:04 +0000 (10:18 -0800)]
s3: VFS: ceph: Add vfswrap_ceph_read_dfs_pathat().

Not yet used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit e52e2135dd9b8bd2e65261c210e7b8d36a727396)

4 years agos3: VFS: Add SMB_VFS_READ_DFS_PATHAT().
Jeremy Allison [Tue, 28 Jan 2020 17:51:17 +0000 (09:51 -0800)]
s3: VFS: Add SMB_VFS_READ_DFS_PATHAT().

Not yet used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 96bc3298fc025d1d76fc06833fece6c62faa5e1a)

4 years agos3: smbd: dfs: Clean up exits / talloc heirarchy in parse_msdfs_symlink().
Jeremy Allison [Tue, 28 Jan 2020 17:36:26 +0000 (09:36 -0800)]
s3: smbd: dfs: Clean up exits / talloc heirarchy in parse_msdfs_symlink().

Ensure on error or clean return we don't leave memory on mem_ctx.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 74b47bf578dab9ce94a9f2439fa672e51afe809e)

4 years agos3: smbd: dfs: Make parameter names consistent.
Jeremy Allison [Tue, 28 Jan 2020 17:28:30 +0000 (09:28 -0800)]
s3: smbd: dfs: Make parameter names consistent.

Initialize reflist to NULL.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit ed527dc1d8bd21d942bc14677d83363144e5f46b)

4 years agos3: smbd: dfs: Allow parse_msdfs_symlink() to be called with NULL pointers.
Jeremy Allison [Tue, 28 Jan 2020 00:45:20 +0000 (16:45 -0800)]
s3: smbd: dfs: Allow parse_msdfs_symlink() to be called with NULL pointers.

In case we don't want all the data.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 4e4afc52e6f63fa4058310c6b0a0314b8f73c189)

4 years agos3: smbd: dfs: Apply some README.Coding to parse_msdfs_symlink().
Jeremy Allison [Tue, 28 Jan 2020 00:42:11 +0000 (16:42 -0800)]
s3: smbd: dfs: Apply some README.Coding to parse_msdfs_symlink().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit a211c640878d856e859ab2fdfbbe61036240b8eb)

4 years agos3: smbd: dfs: Make parse_msdfs_symlink() external.
Jeremy Allison [Tue, 28 Jan 2020 00:35:25 +0000 (16:35 -0800)]
s3: smbd: dfs: Make parse_msdfs_symlink() external.

So it can be called by a future new VFS call.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 012b812188f636d9b8cf0edee34df5d43d2ac0a8)

4 years agos3: smbd: dfs: Move lp_msdfs_shuffle_referrals() call out of parse_msdfs_symlink().
Jeremy Allison [Tue, 28 Jan 2020 00:31:52 +0000 (16:31 -0800)]
s3: smbd: dfs: Move lp_msdfs_shuffle_referrals() call out of parse_msdfs_symlink().

Removes dependency on snum for what is text parsing code.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 028c33e09ab52b55f33f83e26a12498f57918334)

4 years agos3: smbd: dfs: Cleanup, reformat calls to parse_msdfs_symlink()
Jeremy Allison [Tue, 28 Jan 2020 00:29:46 +0000 (16:29 -0800)]
s3: smbd: dfs: Cleanup, reformat calls to parse_msdfs_symlink()

Make parameter easier to change.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit d22b0d907252939c2ded9d73cc67dbbf8bb57fb7)

4 years agos3: VFS: Implement create_dfs_pathat() in cap
Jeremy Allison [Tue, 28 Jan 2020 22:59:46 +0000 (14:59 -0800)]
s3: VFS: Implement create_dfs_pathat() in cap

Now we use this instead of symlinks to create
DFS links, it's needed in cap.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Jan 30 18:21:47 UTC 2020 on sn-devel-184

(cherry picked from commit 042249d95ff59d304cf37914860ee0c4d1f546f8)

4 years agos3: VFS: Implement create_dfs_pathat() in catia.
Jeremy Allison [Tue, 28 Jan 2020 22:42:49 +0000 (14:42 -0800)]
s3: VFS: Implement create_dfs_pathat() in catia.

Now we use this instead of symlinks to create
DFS links, it's needed in catia.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14282

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit fa2f83e13aa92a12bd8d0113576a04a1e4431a44)

4 years agoWHATSNEW: announce vfs_io_uring
Stefan Metzmacher [Mon, 17 Feb 2020 14:46:53 +0000 (15:46 +0100)]
WHATSNEW: announce vfs_io_uring

Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agos3:modules: add vfs_io_uring module
Stefan Metzmacher [Wed, 5 Jun 2019 15:01:49 +0000 (17:01 +0200)]
s3:modules: add vfs_io_uring module

The module makes use of the new io_uring infrastructure
(intruduced in linux 5.1), see https://lwn.net/Articles/778411/ and
http://git.kernel.dk/cgit/liburing/

Currently this only implements SMB_VFS_{PREAD,PWRITE,FSYNC}_SEND/RECV
and avoids the overhead of our userspace threadpool.

In future we'll hopefully make more use of more advanced io_uring
features.

For now we don't have automated tests as our test infrastructure
doesn't use a recent kernel. At least we're able to do compile tests
on fedora31.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Feb 15 11:37:45 UTC 2020 on sn-devel-184

(cherry picked from commit 195e88cea34c983afc02cfb521a60cdd1edbe9e1)

4 years agobootstrap: replace libaio-dev/libaio-devel with liburing-dev/liburing-devel
Stefan Metzmacher [Fri, 7 Feb 2020 10:00:21 +0000 (11:00 +0100)]
bootstrap: replace libaio-dev/libaio-devel with liburing-dev/liburing-devel

We'll never use libaio, but will soon add a io_uring vfs module.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit fb5a99fa0200785ef1b5a8c9bc4a645d09fbeb5e)

4 years agolib/replace: remove unused check for aio.h
Stefan Metzmacher [Fri, 7 Feb 2020 10:02:18 +0000 (11:02 +0100)]
lib/replace: remove unused check for aio.h

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit c1b9bf993402f7d74f992c609ede94653e87172f)

4 years agolib: Fix a shutdown crash with "clustering = yes"
Volker Lendecke [Tue, 11 Feb 2020 21:10:32 +0000 (22:10 +0100)]
lib: Fix a shutdown crash with "clustering = yes"

This is a bit confusing now, sorry for that:

register_msg_pool_usage() in the ctdb case uses
messaging_ctdb_register_tevent_context(), which talloc_reference()s
the central struct messaging_ctdb_fde_ev of the
messaging_ctdb_context. In messaging_reinit(), we talloc_free only one
of those references and allocate a new messaging_ctdb_fde_ev. The
remaining messaging_ctdb_fde_ev should have been deleted as well, but
due to the second reference this does not happen. When doing the
shutdown messaging_ctdb_fde_ev_destructor() is called twice, once on
the properly reinitialized fde_ev, and once much later on the leftover
one which references invalid data structures.

By the way, this is not a problem with talloc_reference(), this would
have happened with explicit refcounting too.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14281

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Tue Feb 18 13:05:53 UTC 2020 on sn-devel-184

(cherry picked from commit f1577c2bc13c91ea912ae461870e470065f250c1)

4 years agolib: Introduce messaging_context->per_process_talloc_ctx
Volker Lendecke [Tue, 11 Feb 2020 20:57:42 +0000 (21:57 +0100)]
lib: Introduce messaging_context->per_process_talloc_ctx

Consolidate "msg_dgm_ref" and "msg_ctdb_ref": The only purpose of
those pointers was to TALLOC_FREE() them in messaging_reinit(). We'll
have a third entity to talloc_free() in the next commit, make that
simpler.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14281

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 7209357f9ba5525a207d301b299931d6bdee9c2f)

4 years agolib: Add a TALLOC_CTX to base register_msg_pool_usage() on
Volker Lendecke [Tue, 11 Feb 2020 20:47:39 +0000 (21:47 +0100)]
lib: Add a TALLOC_CTX to base register_msg_pool_usage() on

Add a simple way to deactivate the registration

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14281

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit dab982d88e9132cbff52db22f441c08ee59bb159)

4 years agolib: Simplify register_msg_pool_usage()
Volker Lendecke [Tue, 11 Feb 2020 20:26:18 +0000 (21:26 +0100)]
lib: Simplify register_msg_pool_usage()

We can do as much as we want in the filter. This gives us automatic
retry, we don't have to do the messaging_filtered_read_send() over and
over again

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14281

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 8a23031b7bfea4cdaa71d6815bca24dcc3685b22)

4 years agoauth: Fix CID 1458418 Null pointer dereferences (REVERSE_INULL)
Volker Lendecke [Wed, 12 Feb 2020 14:40:32 +0000 (15:40 +0100)]
auth: Fix CID 1458418 Null pointer dereferences (REVERSE_INULL)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ef0350221e194a3dd3350eab02b38baeb32d8fd3)

Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Tue Feb 18 09:27:36 UTC 2020 on sn-devel-184

4 years agoauth: Fix CID 1458420 Null pointer dereferences (REVERSE_INULL)
Volker Lendecke [Wed, 12 Feb 2020 14:39:54 +0000 (15:39 +0100)]
auth: Fix CID 1458420 Null pointer dereferences (REVERSE_INULL)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 503fc8f2ba662ecbec0788bd1710440464dc5cfd)

4 years agoctdb-tcp: Make error handling for outbound connection consistent
Martin Schwenke [Tue, 28 Jan 2020 05:49:14 +0000 (16:49 +1100)]
ctdb-tcp: Make error handling for outbound connection consistent

If we can't bind the local end of an outgoing connection then
something has gone wrong.  Retrying is better than failing into a
zombie state.  The interface might come back up and/or the address my
be reconfigured.

While here, do the same thing for the other (potentially transient)
failures.

The unknown address family failure is special but just handle it via a
retry.  Technically it can't happen because the node address parsing
can only return values with address family AF_INET or AF_INET6.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14274
RN: Retry inter-node TCP connections on more transient failures

Reported-by: 耿纪超 <gengjichao@jd.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit a40fc709cc972dadb40efbf1394b10fae3cfcc07)

4 years agowinbindd: handling missing idmap in getgrgid()
Stefan Metzmacher [Wed, 22 Jan 2020 17:00:07 +0000 (17:00 +0000)]
winbindd: handling missing idmap in getgrgid()

A similar hunk was added via commit
89f753c1fc824fef29aebb7d783ab7e09cd1f04e ("winbind: Use xids2sids in getpwuid"),
but it was missing in commit
e2dda192e7f8b65a5f02120be56cf0f07d03679f ("winbind: Use xids2sids in getgrgid")

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14265

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Feb  5 17:56:58 UTC 2020 on sn-devel-184

(cherry picked from commit 4d0bda9467ac3f45f85f48a281cdb173ce1064eb)

Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Tue Feb 11 10:01:33 UTC 2020 on sn-devel-184

4 years agobootstrap: Remove un-used dependency python3-crypto
Andrew Bartlett [Fri, 13 Dec 2019 17:59:45 +0000 (06:59 +1300)]
bootstrap: Remove un-used dependency python3-crypto

This became unused in bbeef554f2c15e739f6095fcb57d9ef6646b411c
(except for repl_cleartext_pwd.py, a development script) and we now use
GnuTLS via a Samba wrapper.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14255

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 446c92017369007139af7532dae8503f9db40d48)

4 years agos3:auth_sam: map an empty domain or '.' to the local SAM name
Stefan Metzmacher [Thu, 23 Jan 2020 15:21:43 +0000 (16:21 +0100)]
s3:auth_sam: map an empty domain or '.' to the local SAM name

When a domain member gets an empty domain name or '.', it should
not forward the authentication to domain controllers of
the primary domain.

But we need to keep passing UPN account names with
an empty domain to the DCs as a domain member.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 590df382bea44eec2dbfd2a28c659b0a29188bca)

4 years agos3:selftest: test authentication with an empty userdomain and upn names
Stefan Metzmacher [Tue, 4 Feb 2020 10:32:05 +0000 (11:32 +0100)]
s3:selftest: test authentication with an empty userdomain and upn names

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit a9eeea6ef78cc44c8423c7125fa1376921060018)

4 years agos3:auth_sam: introduce effective_domain helper variables
Stefan Metzmacher [Thu, 23 Jan 2020 15:21:43 +0000 (16:21 +0100)]
s3:auth_sam: introduce effective_domain helper variables

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit a63e2a312c761093fedb09bd234b6736485a930a)

4 years agos3:auth_sam: make sure we never handle empty usernames
Stefan Metzmacher [Thu, 23 Jan 2020 15:17:30 +0000 (16:17 +0100)]
s3:auth_sam: make sure we never handle empty usernames

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 01b8374e7942141e7f6cbdec7623c981a008e4c1)

4 years agos3:auth_sam: unify the debug messages of all auth_sam*_auth() functions
Stefan Metzmacher [Thu, 23 Jan 2020 15:13:59 +0000 (16:13 +0100)]
s3:auth_sam: unify the debug messages of all auth_sam*_auth() functions

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 72ef8d3a52c1ab07c079a4c014ba8ac7bff528f7)

4 years agos3:auth_sam: replace confusing FALL_THROUGH; with break;
Stefan Metzmacher [Thu, 23 Jan 2020 14:48:39 +0000 (15:48 +0100)]
s3:auth_sam: replace confusing FALL_THROUGH; with break;

There's no real logic change here, but is makes it easier to
understand.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 85b168c6dac88f5065c0ec6e925937439f2c12ed)

4 years agolibcli:smb: Don't use forward declartions for GnuTLS typedefs
Stefan Metzmacher [Thu, 6 Feb 2020 14:36:35 +0000 (15:36 +0100)]
libcli:smb: Don't use forward declartions for GnuTLS typedefs

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14271

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Feb  7 13:48:27 UTC 2020 on sn-devel-184

(cherry picked from commit 3894f878183e645421ec440afd8e010218a58eef)

Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Mon Feb 10 10:10:46 UTC 2020 on sn-devel-184

4 years agowafsamba: Do not use 'rU' as the 'U' is deprecated in Python 3.9
Andreas Schneider [Wed, 5 Feb 2020 15:58:26 +0000 (16:58 +0100)]
wafsamba: Do not use 'rU' as the 'U' is deprecated in Python 3.9

See https://docs.python.org/3.9/whatsnew/3.9.html#changes-in-the-python-api

"open(), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U'
(“universal newline”) in the file mode. This flag was deprecated since Python
3.3. In Python 3, the “universal newline” is used by default when a file is
open in text mode. The newline parameter of open() controls how universal
newlines works."

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14266

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb  6 07:30:13 UTC 2020 on sn-devel-184

(cherry picked from commit 52722746a5eb40c309ba59f78bd8e3d897417bdc)

Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Thu Feb  6 13:10:31 UTC 2020 on sn-devel-184

4 years agoWHATSNEW: Add some more changes since 4.11.
Karolin Seeger [Wed, 5 Feb 2020 09:43:43 +0000 (10:43 +0100)]
WHATSNEW: Add some more changes since 4.11.

Mention new parameter 'spotlight backend' and note that vfs_netatalk has been
removed.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Wed Feb  5 11:40:25 UTC 2020 on sn-devel-184

4 years agolibcli:smb: Improve check for gnutls_aead_cipher_(en|de)cryptv2
Andreas Schneider [Fri, 24 Jan 2020 15:34:42 +0000 (16:34 +0100)]
libcli:smb: Improve check for gnutls_aead_cipher_(en|de)cryptv2

This is available since version 3.6.10, but 3.6.10 has a bug which got fixed
in 3.6.11, see:

    https://gitlab.com/gnutls/gnutls/-/merge_requests/1085

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14250

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Feb  4 06:44:00 UTC 2020 on sn-devel-184

(cherry picked from commit d459ca04fc46a52276a860e73ae9ec8f813c260e)

Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Wed Feb  5 08:45:30 UTC 2020 on sn-devel-184

4 years agoVERSION: Bump version up to 4.12.0rc3...
Karolin Seeger [Tue, 4 Feb 2020 10:09:35 +0000 (11:09 +0100)]
VERSION: Bump version up to 4.12.0rc3...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
4 years agoVERSION: Disable GIT_SNAPSHOT for the 4.12.0rc2 release. samba-4.12.0rc2
Karolin Seeger [Tue, 4 Feb 2020 10:08:41 +0000 (11:08 +0100)]
VERSION: Disable GIT_SNAPSHOT for the 4.12.0rc2 release.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
4 years agoWHATSNEW: Add release notes for Samba 4.12.0rc2.
Karolin Seeger [Tue, 4 Feb 2020 10:08:05 +0000 (11:08 +0100)]
WHATSNEW: Add release notes for Samba 4.12.0rc2.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
4 years agoscript/release.sh: Don't use quotations any longer.
Karolin Seeger [Tue, 28 Jan 2020 10:48:53 +0000 (11:48 +0100)]
script/release.sh: Don't use quotations any longer.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Mon Feb  3 12:45:39 UTC 2020 on sn-devel-184

(cherry picked from commit f699df32cdbae4fbc585c259828029c74163323b)

4 years agos4:torture: Skip the deltest20 as user root
Andreas Schneider [Thu, 30 Jan 2020 15:18:25 +0000 (16:18 +0100)]
s4:torture: Skip the deltest20 as user root

The test is meant to be run as a user and not root.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14257

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jan 30 16:54:33 UTC 2020 on sn-devel-184

(cherry picked from commit 677bc1b18420e717154dc73f632044239ac3ff9e)

Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Fri Jan 31 13:57:54 UTC 2020 on sn-devel-184

4 years agolib:util: Log mkdir error on correct debug levels
Andreas Schneider [Mon, 27 Jan 2020 13:58:10 +0000 (14:58 +0100)]
lib:util: Log mkdir error on correct debug levels

For smbd we want an error and for smbclient we only want it in NOTICE
debug level.
The default log level of smbclient is log level 1 so we need notice to
not spam the user.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14253

Signed-off-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): Mon Jan 27 15:55:24 UTC 2020 on sn-devel-184

(cherry picked from commit 0ad6a243b259d284064c0c5abcc7d430d55be7e1)

4 years agos3: lib: nmblib. Clean up and harden nmb packet processing.
Jeremy Allison [Fri, 17 Jan 2020 21:49:48 +0000 (13:49 -0800)]
s3: lib: nmblib. Clean up and harden nmb packet processing.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14239
OSS-FUZZ: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20156
OSS-FUZZ: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20157

Credit to oss-fuzz.
No security implications.

Signed-off-by: Jeremy Allison <jra@samba.org>
Pair programmed with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan 21 23:33:41 UTC 2020 on sn-devel-184

(cherry picked from commit ad236bb7590e423b4c69fe6028f2f3495977f48b)

4 years agoscript/release.sh: make it possible to run from a git worktree
Stefan Metzmacher [Tue, 21 Jan 2020 18:25:00 +0000 (19:25 +0100)]
script/release.sh: make it possible to run from a git worktree

.git is a regular file in that case.

Also check that script/release.sh is present as a relative path
to ensure we're called from the expected location.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 648f94d2031c6e758bdf54089d1e710c265ca732)

4 years agoVERSION: Bump version up to 4.12.0rc2...
Stefan Metzmacher [Tue, 21 Jan 2020 13:48:35 +0000 (14:48 +0100)]
VERSION: Bump version up to 4.12.0rc2...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agoVERSION: Disable GIT_SNAPSHOT for the 4.12.0rc1 release... samba-4.12.0rc1
Stefan Metzmacher [Tue, 21 Jan 2020 13:21:50 +0000 (14:21 +0100)]
VERSION: Disable GIT_SNAPSHOT for the 4.12.0rc1 release...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agoWHATSNEW: Add release note for Samba 4.12.0rc1.
Stefan Metzmacher [Tue, 21 Jan 2020 13:20:22 +0000 (14:20 +0100)]
WHATSNEW: Add release note for Samba 4.12.0rc1.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agosamba-tool group addmembers: avoid python traceback on member add failure
Björn Baumbach [Tue, 21 Jan 2020 12:56:29 +0000 (13:56 +0100)]
samba-tool group addmembers: avoid python traceback on member add failure

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agoselftest: add test for samba-tool groupmember --member-base-dn option
Björn Baumbach [Mon, 30 Dec 2019 15:14:52 +0000 (16:14 +0100)]
selftest: add test for samba-tool groupmember --member-base-dn option

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agoselftest: add tests for samba-tool group addmembers --object-types option
Björn Baumbach [Wed, 18 Dec 2019 14:09:16 +0000 (15:09 +0100)]
selftest: add tests for samba-tool group addmembers --object-types option

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agoselftest: add test for new samba-tool group addmembers --member-dn option
Björn Baumbach [Wed, 18 Dec 2019 09:43:22 +0000 (10:43 +0100)]
selftest: add test for new samba-tool group addmembers --member-dn option

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agosamba-tool group addmembers: add --member-base-dn option for group member search
Björn Baumbach [Mon, 30 Dec 2019 13:54:32 +0000 (14:54 +0100)]
samba-tool group addmembers: add --member-base-dn option for group member search

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agosamba-tool group {add,remove}members: allow to use --member-dn in combination with...
Björn Baumbach [Wed, 18 Dec 2019 12:35:16 +0000 (13:35 +0100)]
samba-tool group {add,remove}members: allow to use --member-dn in combination with listofmembers

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agosamba-tool group removemembers: adapt functionality to addmembers command
Björn Baumbach [Tue, 17 Dec 2019 15:27:32 +0000 (16:27 +0100)]
samba-tool group removemembers: adapt functionality to addmembers command

Adds --member-dn and --object-types options.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agosamba-tool group addmembers: add --member-dn option
Björn Baumbach [Tue, 17 Dec 2019 15:26:23 +0000 (16:26 +0100)]
samba-tool group addmembers: add --member-dn option

The --member-dn option allows to specify an object by it's DN.

This is required to select a specific object if there are more than one
with the same name. Multiple contacts can exist with the same name in
different OUs.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agosamba-tool group addmembers: add new option --object-types
Björn Baumbach [Fri, 9 Aug 2019 15:07:07 +0000 (17:07 +0200)]
samba-tool group addmembers: add new option --object-types

With this option the admin can specify the object types of the group
members which will be added to the group. The search filter for the objects
will be created according to the types.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agopython/samdb: validation of group member types for group member filter
Björn Baumbach [Mon, 30 Dec 2019 12:57:26 +0000 (13:57 +0100)]
python/samdb: validation of group member types for group member filter

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agopython/samdb: add type "all" to search for all common types of group members
Björn Baumbach [Mon, 30 Dec 2019 12:57:11 +0000 (13:57 +0100)]
python/samdb: add type "all" to search for all common types of group members

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agopython/samdb: adapt search filter for group object type
Björn Baumbach [Fri, 9 Aug 2019 14:45:51 +0000 (16:45 +0200)]
python/samdb: adapt search filter for group object type

Use a group search filter which is similar to the filter which is used
by the basic MS Windows group membership management.

The filter excludes the group type GROUP_TYPE_BUILTIN_LOCAL_GROUP.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agopython/samdb: adapt search filter for user object type
Björn Baumbach [Mon, 30 Dec 2019 15:27:59 +0000 (16:27 +0100)]
python/samdb: adapt search filter for user object type

Use a user search filter which is similar to the filter which is used
by the basic MS Windows group membership management.

The filter filters for objects with the sAMAccountType ATYPE_NORMAL_ACCOUNT.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agopython/samdb: add 'computer' to the default group member types for group member filters
Björn Baumbach [Mon, 30 Dec 2019 15:24:23 +0000 (16:24 +0100)]
python/samdb: add 'computer' to the default group member types for group member filters

Add the 'computer' type to the default member types, so that the next
commit does not change the default behavior.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agopython/samdb: fetch specific error if there are more than one search results
Björn Baumbach [Wed, 18 Dec 2019 16:15:13 +0000 (17:15 +0100)]
python/samdb: fetch specific error if there are more than one search results

There can be more than one contact with the same name.

Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>