samba.git
5 months agoRevert "pthreadpool: add pthreadpool_tevent_job_cancel()"
Ralph Boehme [Fri, 28 Dec 2018 08:03:34 +0000 (09:03 +0100)]
Revert "pthreadpool: add pthreadpool_tevent_job_cancel()"

This reverts commit 791c05144ee9296024cc0fdebe4afeaaf67e26bc.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: maintain a global list of orphaned pthreadpool_tevent_jobs"
Ralph Boehme [Fri, 28 Dec 2018 08:02:54 +0000 (09:02 +0100)]
Revert "pthreadpool: maintain a global list of orphaned pthreadpool_tevent_jobs"

This reverts commit 25756425aaf5465e56ea809cd415b6a387848919.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: add some lockless coordination between the main and job threads"
Ralph Boehme [Sun, 23 Dec 2018 08:46:13 +0000 (09:46 +0100)]
Revert "pthreadpool: add some lockless coordination between the main and job threads"

This reverts commit 9656b8d8ee11ee351870286f16ea8fbe49112292.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: add helgrind magic to PTHREAD_TEVENT_JOB_THREAD_FENCE_*()"
Ralph Boehme [Sun, 23 Dec 2018 08:44:49 +0000 (09:44 +0100)]
Revert "pthreadpool: add helgrind magic to PTHREAD_TEVENT_JOB_THREAD_FENCE_*()"

This reverts commit 9b73fda926eb8493e80012794483039be66d4e6c.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: maintain a list of job_states on each pthreadpool_tevent_glue"
Ralph Boehme [Sun, 23 Dec 2018 08:44:32 +0000 (09:44 +0100)]
Revert "pthreadpool: maintain a list of job_states on each pthreadpool_tevent_glue"

This reverts commit aa9b64eccfd037941512bad108c4e3946714a502.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: add a comment about a further optimization in pthreadpool_tevent...
Ralph Boehme [Sun, 23 Dec 2018 08:44:22 +0000 (09:44 +0100)]
Revert "pthreadpool: add a comment about a further optimization in pthreadpool_tevent_job_destructor()"

This reverts commit f23cac39b36b026650e0922c78fe0fd3fe567e35.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: test cancelling and freeing pending pthreadpool_tevent jobs...
Ralph Boehme [Sun, 23 Dec 2018 08:44:07 +0000 (09:44 +0100)]
Revert "pthreadpool: test cancelling and freeing pending pthreadpool_tevent jobs/pools"

This reverts commit 40d15260d24d0071732f47873f395fce29b8a6f4.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: add pthreadpool_tevent_[current_job_]per_thread_cwd()"
Ralph Boehme [Mon, 7 Jan 2019 20:27:19 +0000 (21:27 +0100)]
Revert "pthreadpool: add pthreadpool_tevent_[current_job_]per_thread_cwd()"

This reverts commit 12a45ee1a66379ba7562729b835ce0e2e4bfb3b3.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: add tests for pthreadpool_tevent_[current_job_]per_thread_cwd()"
Ralph Boehme [Sun, 23 Dec 2018 08:43:25 +0000 (09:43 +0100)]
Revert "pthreadpool: add tests for pthreadpool_tevent_[current_job_]per_thread_cwd()"

This reverts commit fbafdc99ef2cef11a1a28e795ffe965cb53ef7fa.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: call unshare(CLONE_FS) if available"
Ralph Boehme [Mon, 7 Jan 2019 17:35:27 +0000 (18:35 +0100)]
Revert "pthreadpool: call unshare(CLONE_FS) if available"

This reverts commit 65e4742d168454df6507d9e74993749063435dd6.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: add pthreadpool_restart_check[_monitor_{fd,drain}]()"
Ralph Boehme [Sun, 23 Dec 2018 08:43:07 +0000 (09:43 +0100)]
Revert "pthreadpool: add pthreadpool_restart_check[_monitor_{fd,drain}]()"

This reverts commit 3c4cdb290723432b00ff9ff88b892cb4e66e76cd.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: implement pthreadpool_tevent_wrapper_create() infrastructure"
Ralph Boehme [Sun, 23 Dec 2018 08:42:53 +0000 (09:42 +0100)]
Revert "pthreadpool: implement pthreadpool_tevent_wrapper_create() infrastructure"

This reverts commit f9745d8b5234091c38e93ed57a255120b61f3ad7.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: test cancelling and freeing jobs of a wrapped pthreadpool_tevent"
Ralph Boehme [Sun, 23 Dec 2018 08:42:37 +0000 (09:42 +0100)]
Revert "pthreadpool: test cancelling and freeing jobs of a wrapped pthreadpool_tevent"

This reverts commit fb6b6cf3e43165ced4b1039f2683d19f277c0792.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agosmbd: rename sconn->raw_thread_pool to sconn->pool
Ralph Boehme [Sun, 23 Dec 2018 08:34:20 +0000 (09:34 +0100)]
smbd: rename sconn->raw_thread_pool to sconn->pool

This is basically a revert of commit
2be7518ae5a3c046f5fca04ecc83f9f7044eac74.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "smbd: introduce sconn->sync_thread_pool"
Ralph Boehme [Sun, 23 Dec 2018 08:34:00 +0000 (09:34 +0100)]
Revert "smbd: introduce sconn->sync_thread_pool"

This reverts commit 0c97226356f2ba5f01a58d361371055caf11e2a7.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "s3: vfs: add smb_vfs_ev_glue"
Ralph Boehme [Fri, 28 Dec 2018 12:08:14 +0000 (13:08 +0100)]
Revert "s3: vfs: add smb_vfs_ev_glue"

This reverts commit 1251a536df4b1df58d9ddacab03d3ebe6f4e5b60.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "s3: vfs: add user_vfs_evg to connection_struct"
Ralph Boehme [Sun, 23 Dec 2018 08:25:32 +0000 (09:25 +0100)]
Revert "s3: vfs: add user_vfs_evg to connection_struct"

This reverts commit 2dd95c1c38b9e1ce32d3d1081b6ec177910087a4.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "vfs_aio_pthread: use event context and threadpool from user_vfs_evg"
Ralph Boehme [Sun, 23 Dec 2018 08:24:51 +0000 (09:24 +0100)]
Revert "vfs_aio_pthread: use event context and threadpool from user_vfs_evg"

This reverts commit cd37badc02b3e56f974168b28447444cd54ee541.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: we need to use pthreadpool_tevent_per_thread_cwd() on the caller...
Ralph Boehme [Sun, 23 Dec 2018 08:23:48 +0000 (09:23 +0100)]
Revert "pthreadpool: we need to use pthreadpool_tevent_per_thread_cwd() on the callers pool"

This reverts commit ff863f2d98ac5e12073af824b794404c3d7198c5.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: ignore the return value of poll(NULL, 0UL, 1)"
Ralph Boehme [Sun, 23 Dec 2018 08:12:34 +0000 (09:12 +0100)]
Revert "pthreadpool: ignore the return value of poll(NULL, 0UL, 1)"

This reverts commit 6da0d68f49bbd82f5a08427779c9f5ebd6f755aa.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoRevert "pthreadpool: reset monitor_fd after calling tevent_fd_set_auto_close()"
Ralph Boehme [Sun, 23 Dec 2018 08:12:10 +0000 (09:12 +0100)]
Revert "pthreadpool: reset monitor_fd after calling tevent_fd_set_auto_close()"

This reverts commit f68b5ee75f002ed542a8423070fb01e3b0e83f65.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agos3:smbd: pass (raw) ev to fetch_dos_mode_send instead of smb_vfs_ev_glue
Ralph Boehme [Fri, 28 Dec 2018 11:19:08 +0000 (12:19 +0100)]
s3:smbd: pass (raw) ev to fetch_dos_mode_send instead of smb_vfs_ev_glue

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agos3:smbd: pass (raw) ev to dos_mode_at_send() instead of smb_vfs_ev_glue
Ralph Boehme [Fri, 28 Dec 2018 11:16:27 +0000 (12:16 +0100)]
s3:smbd: pass (raw) ev to dos_mode_at_send() instead of smb_vfs_ev_glue

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agos3:smbd: pass (raw) ev to SMB_VFS_GET_DOS_ATTRIBUTES_SEND() instead of smb_vfs_ev_glue
Ralph Boehme [Fri, 28 Dec 2018 11:12:20 +0000 (12:12 +0100)]
s3:smbd: pass (raw) ev to SMB_VFS_GET_DOS_ATTRIBUTES_SEND() instead of smb_vfs_ev_glue

This also removes smb_vfs_ev_glue_[push|pop]_use() as the only caller
got removed.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agos3:smbd: let SMB_VFS_GETXATTRAT_SEND() do explicit impersonation
Ralph Boehme [Thu, 27 Dec 2018 15:32:46 +0000 (16:32 +0100)]
s3:smbd: let SMB_VFS_GETXATTRAT_SEND() do explicit impersonation

SMB_VFS_GETXATTRAT_SEND() gets passed a raw event context and the
default implementation uses that as well a raw threadpool. Impersonation
is done explicitly instead of by the tevent and pthreadpool wrappers.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agos3:torture: call per_thread_cwd_check() in vfstest.c main()
Stefan Metzmacher [Fri, 11 Jan 2019 12:15:58 +0000 (13:15 +0100)]
s3:torture: call per_thread_cwd_check() in vfstest.c main()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agos3:smbd: prepare the usage of per_thread_cwd_*() functions
Stefan Metzmacher [Fri, 11 Jan 2019 12:13:04 +0000 (13:13 +0100)]
s3:smbd: prepare the usage of per_thread_cwd_*() functions

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agos3:lib: add per_thread_cwd_{check,supported,disable,activate}() helper functions
Stefan Metzmacher [Fri, 11 Jan 2019 11:47:40 +0000 (12:47 +0100)]
s3:lib: add per_thread_cwd_{check,supported,disable,activate}() helper functions

Only Linux it's possible to have a per thread current working directory
using unshare(CLONE_FS).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agos3:lib: add root_unix_token()
Ralph Boehme [Fri, 16 Mar 2018 18:01:20 +0000 (19:01 +0100)]
s3:lib: add root_unix_token()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoselftest: Improve an error message
Volker Lendecke [Fri, 7 Dec 2018 14:14:46 +0000 (15:14 +0100)]
selftest: Improve an error message

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Fri Jan 11 06:01:01 CET 2019 on sn-devel-144

5 months agodns: changing onelevel search for wildcard to subtree
Aaron Haslett [Wed, 9 Jan 2019 03:22:40 +0000 (16:22 +1300)]
dns: changing onelevel search for wildcard to subtree

SCOPE_ONELEVEL is used on wildcard dns searches, but onelevel searches
currently have a performance problem related to GUID indexing, so this
patch changes the search scope to SCOPE_SUBTREE.
In this case, as the onelevel and subtree sets of records are roughly
the same, and the query is matching against the DN itself, we don't
believe there's any benefit in using SCOPE_ONELEVEL over SCOPE_SUBTREE.

The onelevel performance problem will be fixed separately later, but in
the meantime this solves the DNS performance problem.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 months agostatvfs: rename linux_statvfs to posix_statvfs
Björn Jacke [Wed, 9 Jan 2019 11:03:53 +0000 (12:03 +0100)]
statvfs: rename linux_statvfs to posix_statvfs

the statvfs call is posix standard and not Linux specific

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Jacke <bjacke@samba.org>
Autobuild-Date(master): Fri Jan 11 02:53:57 CET 2019 on sn-devel-144

5 months agowaf:lib/replace: fix a build error with non-gcc compilers
Björn Jacke [Sun, 6 Jan 2019 19:41:32 +0000 (20:41 +0100)]
waf:lib/replace: fix a build error with non-gcc compilers

3a175830e579ab10231439657b23733338cd5634 added that variable which should have
been an empty initialization here. -Wno-format-zero-length (which might be
unsupported by the compiler) should not be set if we really only want to
initialize the cflags.

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agos3/smbd: fix utmp hostname logging on Solaris
Björn Jacke [Sun, 6 Jan 2019 20:35:14 +0000 (21:35 +0100)]
s3/smbd: fix utmp hostname logging on Solaris

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

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agowaf: check for utmpx struct member ut_host
Björn Jacke [Sun, 6 Jan 2019 19:46:20 +0000 (20:46 +0100)]
waf: check for utmpx struct member ut_host

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

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agonetcmd: Fix broken samba-tool gpo commands
Tim Beale [Thu, 10 Jan 2019 03:34:27 +0000 (16:34 +1300)]
netcmd: Fix broken samba-tool gpo commands

samba-tool gpo create|fetch|backup commands throw exceptions due to a
missing Python import:

ERROR(<class 'NameError'>): uncaught exception - name 'tempfile' is not
defined
  File "bin/python/samba/netcmd/__init__.py", line 184, in _run
    return self.run(*args, **kwargs)
  File "bin/python/samba/netcmd/gpo.py", line 980, in run
    tmpdir, gpodir = self.construct_tmpdir(tmpdir, gpo)
  File "bin/python/samba/netcmd/gpo.py", line 386, in construct_tmpdir
    tmpdir = tempfile.mkdtemp()

Introduced by commit e3320b6d3df7a0c7b refactor.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Thu Jan 10 16:21:23 CET 2019 on sn-devel-144

5 months agostatvfs: fix bsize and frsize mixup
Björn Jacke [Tue, 8 Jan 2019 09:38:06 +0000 (10:38 +0100)]
statvfs: fix bsize and frsize mixup

the block size (the real one) is the "fundamental file system block size" and
that is the frsize struct member in the statvfs struct. The bsize struct member
of the statvfs struct is *different* from the same named one of the statfs
struct.

See also http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_statvfs.h.html

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

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jan 10 09:40:06 CET 2019 on sn-devel-144

5 months agolib: replace: snprintf: Whitespace clean up
Ladislav Michl via samba-technical [Fri, 7 Dec 2018 08:35:25 +0000 (09:35 +0100)]
lib: replace: snprintf: Whitespace clean up

Remove spaces before tab, spaces at the end of line and white
chars on blank line.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 months agoFix typo and remove the sun and the clouds
Swen Schillig [Mon, 7 Jan 2019 14:10:25 +0000 (15:10 +0100)]
Fix typo and remove the sun and the clouds

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jan 10 06:14:27 CET 2019 on sn-devel-144

5 months agoFix typos and ban the rams from samba tdb-1.3.17
Swen Schillig [Mon, 7 Jan 2019 14:07:22 +0000 (15:07 +0100)]
Fix typos and ban the rams from samba

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
5 months agoselftest: Remove duplicate dependency definition
Volker Lendecke [Wed, 2 Jan 2019 15:33:14 +0000 (16:33 +0100)]
selftest: Remove duplicate dependency definition

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agodsdb: Print strerror in addition to errno
Volker Lendecke [Thu, 14 Jun 2018 15:42:56 +0000 (17:42 +0200)]
dsdb: Print strerror in addition to errno

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agodns: Do NULL checks in dns_sign_tsig
Volker Lendecke [Wed, 6 Jun 2018 16:00:22 +0000 (18:00 +0200)]
dns: Do NULL checks in dns_sign_tsig

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agos3:libsmb: cli_smb2_list() can sometimes fail initially on a connection
Tim Beale [Mon, 7 Jan 2019 02:28:12 +0000 (15:28 +1300)]
s3:libsmb: cli_smb2_list() can sometimes fail initially on a connection

cli_smb2_list() appears to be a slightly unique SMB operation in that it
specifies the max transaction size for the response buffer size. The
Python bindings highlighted a problem where if cli_smb2_list() were one
of the first operations performed on the SMBv2 connection, it would fail
due to insufficient credits. Because the response buffer size is
(potentially) so much larger, it requires more credits (128) compared
with other SMB operations.

When talking to a samba DC, the connection credits seem to start off at
1, then increase by 32 for every SMB reply we receive back from the
server. After cli_full_connection(), the connection has 65 credits. The
cli_smb2_create_fnum() in cli_smb2_list() adds another 32 credits, but
this is still less than the 128 that smb2cli_query_directory() requires.

This problem doesn't happen for smbclient because the cli_cm_open() API
it uses ends up sending more messages, and so the connection has more
credits.

This patch changes cli_smb2_list(), so it requests a smaller response
buffer size if it doesn't have enough credits available for the max
transaction size. smb2cli_query_directory() is already in a loop, so it
can span multiple SMB messages if for some reason the transaction size
isn't big enough for the listings.

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

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan 10 02:40:16 CET 2019 on sn-devel-144

5 months agolibcli: Add error log if insufficient SMB2 credits
Tim Beale [Sun, 6 Jan 2019 23:06:15 +0000 (12:06 +1300)]
libcli: Add error log if insufficient SMB2 credits

Although it's unusual to hit this case, I was seeing it happen while
working on the SMB python bindings. Even with debug level 10, there was
nothing coming out to help pin down the source of the
NT_STATUS_INTERNAL_ERROR.

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

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agos3:utils:net: Print debug message about Netbios
Justin Stephenson [Mon, 17 Dec 2018 20:17:24 +0000 (15:17 -0500)]
s3:utils:net: Print debug message about Netbios

With a preceding patch, cli_connect_nb() will return
NT_STATUS_NOT_SUPPORTED when 'disable netbios' is set in smb.conf.

Print an informative error message to indicate Netbios is disabled
if this occurs.

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

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Noel Power <nopower@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Jan  9 22:38:21 CET 2019 on sn-devel-144

5 months agos3:smbpasswd: Print debug message about Netbios
Justin Stephenson [Mon, 17 Dec 2018 19:57:59 +0000 (14:57 -0500)]
s3:smbpasswd: Print debug message about Netbios

With a preceding patch, cli_connect_nb() will return
NT_STATUS_NOT_SUPPORTED when 'disable netbios' is set in smb.conf.

Print an informative error message to indicate Netbios is disabled
if this occurs.

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

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Noel Power <nopower@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agos3:libsmb: Print debug message about Netbios
Justin Stephenson [Mon, 17 Dec 2018 19:40:33 +0000 (14:40 -0500)]
s3:libsmb: Print debug message about Netbios

With a preceding patch, cli_connect_nb() will return
NT_STATUS_NOT_SUPPORTED when 'disable netbios' is set in smb.conf.

Print an informative error message to indicate Netbios is disabled
if this occurs.

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

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Noel Power <nopower@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agos3:libsmb: Check disable_netbios in socket connect
Justin Stephenson [Thu, 3 Jan 2019 17:07:01 +0000 (12:07 -0500)]
s3:libsmb: Check disable_netbios in socket connect

If the disable_netbios option is set then return NT_STATUS_NOT_SUPPORTED
for a port 139 connection in the low level socket connection code.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Noel Power <nopower@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agos3:libsmb: Revert SMB Py bindings name back to libsmb_samba_internal
Tim Beale [Tue, 8 Jan 2019 21:15:49 +0000 (10:15 +1300)]
s3:libsmb: Revert SMB Py bindings name back to libsmb_samba_internal

In order to make it clear that the APIs in these Python bindings are
unstable and should not be used by external consumers, this patch
changes the name of the Python bindings back to libsmb_samba_internal.

To make the Python code that uses these bindings (i.e. samba-tool, etc)
look a little cleaner, we can just change the module name as we import
it, e.g.

  from samba.samba3 import libsmb_samba_internal as libsmb

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jan  9 14:30:31 CET 2019 on sn-devel-144

5 months agonetcmd/user: python[3]-gpgme unsupported and replaced by python[3]-gpg
Joe Guo [Thu, 20 Dec 2018 03:47:00 +0000 (16:47 +1300)]
netcmd/user: python[3]-gpgme unsupported and replaced by python[3]-gpg

python[3]-gpgme is deprecated since ubuntu 1804 and debian 9.
use python[3]-gpg instead, and adapt the API.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoxml_docs: update traffic script documentation
Douglas Bagnall [Fri, 4 Jan 2019 02:14:58 +0000 (15:14 +1300)]
xml_docs: update traffic script documentation

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Tim Beale <timbeale@samba.org>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Jan  9 03:53:58 CET 2019 on sn-devel-144

5 months agotraffic_replay: use packets per second as primary scale
Douglas Bagnall [Wed, 7 Nov 2018 00:31:31 +0000 (13:31 +1300)]
traffic_replay: use packets per second as primary scale

The old -S/--scale-traffic is relative to the original model, which made
its relationship to true traffic volumes quite opaque

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: assert json equality in learner test
Douglas Bagnall [Mon, 3 Dec 2018 00:58:56 +0000 (13:58 +1300)]
traffic: assert json equality in learner test

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic tests: use TestCaseInTempdir.mktemp()
Douglas Bagnall [Thu, 25 Oct 2018 00:37:02 +0000 (13:37 +1300)]
traffic tests: use TestCaseInTempdir.mktemp()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython/tests: add TestCaseInTempdir.mktemp()
Douglas Bagnall [Thu, 25 Oct 2018 00:33:02 +0000 (13:33 +1300)]
python/tests: add TestCaseInTempdir.mktemp()

This gives you a name of a temporary file within the test case's tempdir.
Use it like this:

  with self.mktemp() as filename:
     self.check_run("samba-tool foo --output %s" % filename)
     self.assertStringsEqual(open(filename).read(), expected)

and filename will flick out of existence when the with block ends.

This is based on an idea used in the traffic_runner tests, which will
soon be adapted to use this method.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic_replay: --old-scale to mimic the old traffic_replay
Douglas Bagnall [Mon, 22 Oct 2018 21:30:46 +0000 (10:30 +1300)]
traffic_replay: --old-scale to mimic the old traffic_replay

traffic_replay had a broken sense of traffic scale. That is fixed, but
in order to compare old and new tests, it helps to be able to
approximate the old behaviour.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: add option to reanimate dying conversations
Douglas Bagnall [Mon, 22 Oct 2018 22:58:52 +0000 (11:58 +1300)]
traffic: add option to reanimate dying conversations

The traffic model is generated from a window in time, which makes
conversations appear to start and stop unnaturally at the window
boundaries. When the window is short compared to the traffic replay
time and the true expected conversation length, this has a significant
distorting effect, leading to more conversations than would be
expected to generate a given number of packets.

To offset this slightly we add the --conversation-persistence option
which tries to convert apparent death into a longish wait.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic_model: don't report generation errors as parse errors
Douglas Bagnall [Mon, 22 Oct 2018 22:00:20 +0000 (11:00 +1300)]
traffic_model: don't report generation errors as parse errors

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: improve debug messages in traffic_replay
Douglas Bagnall [Fri, 19 Oct 2018 03:26:19 +0000 (16:26 +1300)]
traffic: improve debug messages in traffic_replay

tracebacks and less nonsense at higher debug levels.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: Conversation.add_short_packet is discerning about packets
Douglas Bagnall [Fri, 19 Oct 2018 04:24:53 +0000 (17:24 +1300)]
traffic: Conversation.add_short_packet is discerning about packets

If the packets really wouldn't do anything, we might as well not add them.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: remove useless branch in stats report
Douglas Bagnall [Thu, 22 Nov 2018 02:09:00 +0000 (15:09 +1300)]
traffic: remove useless branch in stats report

This completes the work of 68c64c634ad7576b2ab5ef838c203320afd90f44,
but differs from that in that it makes no actual change because isatty
was not being called so was always evaluated as true.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: generate more statistics in replay
Douglas Bagnall [Fri, 19 Oct 2018 04:21:56 +0000 (17:21 +1300)]
traffic: generate more statistics in replay

Add more "header" values indicating the progress of the run as a
whole.

The new fields are:

Max sleep miss            - the longest sleep() oversleep. Indicates client load.
Maximum lag               - the longest gap between a planned packet
                            time and its actual time.
Start lag                 - the longest gap between intended and actual
                            conversation start.
Planned conversations     - how many conversations we meant to have.
Planned packets           - how many "packets" we thought we were making. Not
                            all "packets" result in actual operations or packets.
Unfinished conversations  - how many conversations had not finished
                            when they were killed.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: avoid bare except: clauses
Douglas Bagnall [Fri, 19 Oct 2018 04:19:29 +0000 (17:19 +1300)]
traffic: avoid bare except: clauses

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: simplify tests for badpassword_frequency
Douglas Bagnall [Fri, 19 Oct 2018 04:19:09 +0000 (17:19 +1300)]
traffic: simplify tests for badpassword_frequency

x <= 0 will fail one or both of the other test clauses.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: assign context domain at start
Douglas Bagnall [Fri, 19 Oct 2018 04:15:30 +0000 (17:15 +1300)]
traffic: assign context domain at start

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: traffic_replay --latency-timeout to control final wait
Douglas Bagnall [Mon, 22 Oct 2018 21:31:53 +0000 (10:31 +1300)]
traffic: traffic_replay --latency-timeout to control final wait

Conversations that haven't finished within some acceptable margin of
on-time can be said to have failed. This is where you specify that
margin.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic_replay: --stop-on-any-error option to not ignore client trouble
Douglas Bagnall [Fri, 19 Oct 2018 03:27:17 +0000 (16:27 +1300)]
traffic_replay: --stop-on-any-error option to not ignore client trouble

Sometimes you want to know if any client is crashing for any reason.
In those times use --stop-on-any-error for an early exit.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: evoke OS error codes by name, not number
Douglas Bagnall [Thu, 22 Nov 2018 00:00:04 +0000 (13:00 +1300)]
traffic: evoke OS error codes by name, not number

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: reinitialise RNG in each child
Douglas Bagnall [Wed, 21 Nov 2018 23:19:46 +0000 (12:19 +1300)]
traffic: reinitialise RNG in each child

Otherwise they all replay using the same random sequence.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: avoid generating conversations without packets
Douglas Bagnall [Wed, 24 Oct 2018 01:02:01 +0000 (14:02 +1300)]
traffic: avoid generating conversations without packets

Some "packets" don't generate any actual traffic. If we have a
conversation consisting only of those, we can avoid forking a client
for it.

This *slightly* increases the load over that which would be generated
otherwise for a given traffic rate, but that's OK.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: rework conversation generation to better use memory
Douglas Bagnall [Fri, 19 Oct 2018 04:11:52 +0000 (17:11 +1300)]
traffic: rework conversation generation to better use memory

Use less memory altogether and don't allocated shared mutable before
the fork.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: generate sparser descriptions of conversations
Douglas Bagnall [Fri, 14 Dec 2018 01:26:34 +0000 (14:26 +1300)]
traffic: generate sparser descriptions of conversations

Rather than building all the packets at this point, we stick to the
barest details of the packets (which is all the model gives us
anyway).

The advantage is that will take a lot less memory, which matters
because this process forks into many clients that were sharing and
mutate the conversation list.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: new version of model with packet_rate, version number
Douglas Bagnall [Thu, 20 Dec 2018 04:25:49 +0000 (17:25 +1300)]
traffic: new version of model with packet_rate, version number

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: fix hash non-determinism when loading JSON
Douglas Bagnall [Thu, 3 Jan 2019 02:54:37 +0000 (15:54 +1300)]
traffic: fix hash non-determinism when loading JSON

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Tim Beale <timbeale@samba.org>
5 months agotraffic: Conversation gets given id, list of short packets
Douglas Bagnall [Fri, 19 Oct 2018 04:00:06 +0000 (17:00 +1300)]
traffic: Conversation gets given id, list of short packets

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: rename packet_rate -> replay_speed for accuracy and room
Douglas Bagnall [Mon, 3 Dec 2018 00:32:59 +0000 (13:32 +1300)]
traffic: rename packet_rate -> replay_speed for accuracy and room

We are soon going to have a self.packet_rate, and replay_speed is more
accurate in this case.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: initialise conversation specific lists after the fork
Douglas Bagnall [Fri, 19 Oct 2018 03:55:59 +0000 (16:55 +1300)]
traffic: initialise conversation specific lists after the fork

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: split is_a_real_packet() function out of class
Douglas Bagnall [Fri, 19 Oct 2018 03:52:48 +0000 (16:52 +1300)]
traffic: split is_a_real_packet() function out of class

So we can use it to determine whether a packet should be a Packet before
making the leap.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: give Packet __slots__ for reduced memory
Douglas Bagnall [Fri, 19 Oct 2018 03:51:22 +0000 (16:51 +1300)]
traffic: give Packet __slots__ for reduced memory

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: make random_colour_print more deterministic, silent on demand
Douglas Bagnall [Fri, 19 Oct 2018 03:48:40 +0000 (16:48 +1300)]
traffic: make random_colour_print more deterministic, silent on demand

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: delete empty temp directories
Douglas Bagnall [Fri, 19 Oct 2018 03:25:06 +0000 (16:25 +1300)]
traffic: delete empty temp directories

even if someone asked to keep the temporary data, they don't want
to see 5000 empty directries. Non-empty directories will remain.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: use namedtuple for ConversationAccounts namespace class
Douglas Bagnall [Fri, 19 Oct 2018 03:46:05 +0000 (16:46 +1300)]
traffic: use namedtuple for ConversationAccounts namespace class

Saving memory, which reduces fork overhead.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: fix mk_masked_dir doc and comments
Douglas Bagnall [Fri, 19 Oct 2018 03:43:13 +0000 (16:43 +1300)]
traffic: fix mk_masked_dir doc and comments

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: Packet.from_line classmethod uses cls var
Douglas Bagnall [Fri, 19 Oct 2018 03:41:36 +0000 (16:41 +1300)]
traffic: Packet.from_line classmethod uses cls var

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic learner: avoid truncated output files on error
Douglas Bagnall [Fri, 19 Oct 2018 03:39:36 +0000 (16:39 +1300)]
traffic learner: avoid truncated output files on error

add_argument(type=argparse.FileType('w'), ...) will open the file
and leave it empty if the script fails.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic_learner: use samba.logger, not print(file=sys.stderr)
Douglas Bagnall [Fri, 19 Oct 2018 03:37:08 +0000 (16:37 +1300)]
traffic_learner: use samba.logger, not print(file=sys.stderr)

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic_learner: return an error code
Douglas Bagnall [Wed, 24 Oct 2018 00:46:16 +0000 (13:46 +1300)]
traffic_learner: return an error code

And use it in tests, rather than expecting exact strings.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic: use default value for --duration
Douglas Bagnall [Fri, 19 Oct 2018 03:03:25 +0000 (16:03 +1300)]
traffic: use default value for --duration

We could not do this when we replayed traffic summaries (as opposed to
models), but now this script does not do that.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic_replay: drop summary replay
Douglas Bagnall [Fri, 19 Oct 2018 03:18:39 +0000 (16:18 +1300)]
traffic_replay: drop summary replay

The traffic_replay script has been able to replay a replay log as well
as a model, which was not used in practice and complicated the script.

If we want that feature, we can make a new script for it.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotraffic replay: allow --random-seed=0
Douglas Bagnall [Fri, 5 Oct 2018 01:42:27 +0000 (14:42 +1300)]
traffic replay: allow --random-seed=0

Zero is a valid seed.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython/traffic: remove duplicate test file
Douglas Bagnall [Thu, 27 Sep 2018 00:58:11 +0000 (12:58 +1200)]
python/traffic: remove duplicate test file

The other one is python/samba/tests/blackbox/testdata/traffic-sample-very-short.model

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython/tests/blackbox: check_exit_code() explains by default
Douglas Bagnall [Wed, 24 Oct 2018 04:49:00 +0000 (17:49 +1300)]
python/tests/blackbox: check_exit_code() explains by default

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoidmap: In _wbint_Sids2UnixIDs, pass back what we have
Volker Lendecke [Tue, 18 Dec 2018 14:53:48 +0000 (15:53 +0100)]
idmap: In _wbint_Sids2UnixIDs, pass back what we have

SOME_UNMAPPED does not mean that nothing worthwhile is in here. We
need to pass what we have.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jan  8 13:15:35 CET 2019 on sn-devel-144

5 months agoidmap_tdb: If one SID fails to map, try the rest
Volker Lendecke [Tue, 18 Dec 2018 14:53:21 +0000 (15:53 +0100)]
idmap_tdb: If one SID fails to map, try the rest

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 months agoselftest: Test sids-to-xids with one failing sid
Volker Lendecke [Fri, 21 Dec 2018 10:49:33 +0000 (11:49 +0100)]
selftest: Test sids-to-xids with one failing sid

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 months agowaf: fix tri-state of --with-sendfile-support being auto the default
Björn Jacke [Mon, 7 Jan 2019 00:05:19 +0000 (01:05 +0100)]
waf: fix tri-state of --with-sendfile-support being auto the default

--with-sendfile-support should be used automatically if it's found.

Configure now also fails reliably for all platforms when sendfile was
explicitly requested but failed to be detected.

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

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan  8 07:03:49 CET 2019 on sn-devel-144

5 months agowaf: fix waf errors with sendfail detection on Solaris
Björn Jacke [Sun, 6 Jan 2019 23:28:34 +0000 (00:28 +0100)]
waf: fix waf errors with sendfail detection on Solaris

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agos3: net: Do not set NET_FLAGS_ANONYMOUS with -k
Justin Stephenson [Mon, 17 Dec 2018 16:26:11 +0000 (11:26 -0500)]
s3: net: Do not set NET_FLAGS_ANONYMOUS with -k

This affects net rpc getsid and net rpc changetrustpw commands.
This avoids an anonymous IPC connection being made when -k is used,
this only affects net rpc getsid and net rpc changetrustpw commands.

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

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
5 months agolibnet4: Use dom_sid_str_buf
Volker Lendecke [Sun, 16 Dec 2018 16:24:36 +0000 (17:24 +0100)]
libnet4: Use dom_sid_str_buf

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>