metze/samba/wip.git
4 years agomsDS-ReplAttributeMetaData.ldif master3-auth
Stefan Metzmacher [Fri, 2 Sep 2016 14:12:14 +0000 (16:12 +0200)]
msDS-ReplAttributeMetaData.ldif

4 years agoRevert "TODO tests s3:popt_common: implement -k [yes|no] as alternative to just -k"
Stefan Metzmacher [Mon, 18 Feb 2019 11:13:07 +0000 (12:13 +0100)]
Revert "TODO tests s3:popt_common: implement -k [yes|no] as alternative to just -k"

This reverts commit aaaf214b72f2333db05cde97117f19e9941c31c6.

4 years agoRevert "HACK debug g_lock del store"
Stefan Metzmacher [Sat, 20 Jan 2018 18:05:08 +0000 (19:05 +0100)]
Revert "HACK debug g_lock del store"

This reverts commit ef68cdd6f081d57fc6e635559a01d941962735ca.

4 years agoRevert "samba -> winbindd -d10"
Stefan Metzmacher [Fri, 17 Mar 2017 20:08:56 +0000 (21:08 +0100)]
Revert "samba -> winbindd -d10"

This reverts commit 6f6b33f3eb871c037099b5b4859d01bbf9422393.

4 years agosamba -> winbindd -d10
Stefan Metzmacher [Fri, 17 Mar 2017 20:08:44 +0000 (21:08 +0100)]
samba -> winbindd -d10

4 years agoRevert "HACK use DCERPC_AUTH_LEVEL_INTEGRITY netlogon"
Stefan Metzmacher [Fri, 17 Mar 2017 07:44:39 +0000 (08:44 +0100)]
Revert "HACK use DCERPC_AUTH_LEVEL_INTEGRITY netlogon"

This reverts commit 2df0245205f321463e9371ec492a9c96ce1a7309.

4 years agoHACK use DCERPC_AUTH_LEVEL_INTEGRITY netlogon
Stefan Metzmacher [Fri, 17 Mar 2017 07:43:31 +0000 (08:43 +0100)]
HACK use DCERPC_AUTH_LEVEL_INTEGRITY netlogon

4 years agoTODO remove ??? ntlm_password_check @ NT_STATUS_NOT_FOUND
Stefan Metzmacher [Fri, 17 Mar 2017 10:53:12 +0000 (11:53 +0100)]
TODO remove ??? ntlm_password_check @ NT_STATUS_NOT_FOUND

4 years agoTODO.trusts
Stefan Metzmacher [Fri, 17 Mar 2017 05:57:20 +0000 (06:57 +0100)]
TODO.trusts

4 years agoTODO smbd: Fix bug 10839
Volker Lendecke [Fri, 6 Feb 2015 15:11:13 +0000 (16:11 +0100)]
TODO smbd: Fix bug 10839

Signed-off-by: Volker Lendecke <vl@samba.org>
WAS: commit 65ddcda67b6c684277420e0b4af95ce1354b2af4

4 years agoTODO tests s3:popt_common: implement -k [yes|no] as alternative to just -k
Stefan Metzmacher [Tue, 21 Mar 2017 14:14:33 +0000 (15:14 +0100)]
TODO tests s3:popt_common: implement -k [yes|no] as alternative to just -k

WAS c66b95456e5bf7dc5684b17d51b1e83ebfef2c6e

4 years agos4:popt_credentials: fix comment about -k,--kerberos
Stefan Metzmacher [Tue, 21 Mar 2017 14:13:47 +0000 (15:13 +0100)]
s4:popt_credentials: fix comment about -k,--kerberos

Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agoSOCKET_WRAPPER_PCAP_FILE=...
Stefan Metzmacher [Fri, 9 Jun 2017 14:31:17 +0000 (16:31 +0200)]
SOCKET_WRAPPER_PCAP_FILE=...

4 years agoRevert "selftest/target/Samba3.pm setup_nt4_dc_schannel trust..."
Stefan Metzmacher [Fri, 16 Mar 2018 12:54:35 +0000 (13:54 +0100)]
Revert "selftest/target/Samba3.pm setup_nt4_dc_schannel trust..."

This reverts commit 1b11279e9b3db7aaa215c51ef0ec8167433efe74.

4 years agoselftest/target/Samba3.pm setup_nt4_dc_schannel trust...
Stefan Metzmacher [Sat, 10 Jun 2017 10:22:18 +0000 (12:22 +0200)]
selftest/target/Samba3.pm setup_nt4_dc_schannel trust...

4 years agoselftest/tests.py
Stefan Metzmacher [Sat, 10 Jun 2017 12:38:40 +0000 (14:38 +0200)]
selftest/tests.py

4 years agoNEEDED??? g_lock g_lock_trylock not self
Stefan Metzmacher [Thu, 21 Dec 2017 08:37:10 +0000 (09:37 +0100)]
NEEDED??? g_lock g_lock_trylock not self

WAS 382e665fd7a571446ec36bbb20e7e1ebeeef39cd

4 years agoHACK g_lock FIXED_GENERATE_RANDOM
Stefan Metzmacher [Wed, 20 Dec 2017 19:44:27 +0000 (20:44 +0100)]
HACK g_lock FIXED_GENERATE_RANDOM

Both should work:

LD_PRELOAD=bin/shared/libuid-wrapper.so UID_WRAPPER=1 FIXED_GENERATE_RANDOM=0 gdb --args bin/smbtorture3 //ab/b -U% LOCAL-G-LOCK7

LD_PRELOAD=bin/shared/libuid-wrapper.so UID_WRAPPER=1 FIXED_GENERATE_RANDOM=1 gdb --args bin/smbtorture3 //ab/b -U% LOCAL-G-LOCK7

4 years agoHACK debug g_lock del store
Stefan Metzmacher [Wed, 20 Dec 2017 19:38:58 +0000 (20:38 +0100)]
HACK debug g_lock del store

4 years ago777 sq torture3: add LOCAL-G-LOCK7 test
Stefan Metzmacher [Wed, 20 Dec 2017 18:46:46 +0000 (19:46 +0100)]
777 sq torture3: add LOCAL-G-LOCK7 test

4 years agotorture3: add LOCAL-G-LOCK7 test
Stefan Metzmacher [Wed, 20 Dec 2017 18:36:59 +0000 (19:36 +0100)]
torture3: add LOCAL-G-LOCK7 test

4 years agoTODO fl2000dc selftest: Export TRUST information in the ad_member target environment
Andreas Schneider [Mon, 20 Mar 2017 10:39:41 +0000 (11:39 +0100)]
TODO fl2000dc selftest: Export TRUST information in the ad_member target environment

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agoSQ selftest: add a one-way trust between SAMBA2000 and ADDOMAIN
Stefan Metzmacher [Fri, 9 Jun 2017 12:23:49 +0000 (14:23 +0200)]
SQ selftest: add a one-way trust between SAMBA2000 and ADDOMAIN

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agorequire PAC and LOGON_INFO
Stefan Metzmacher [Mon, 27 Nov 2017 13:18:13 +0000 (14:18 +0100)]
require PAC and LOGON_INFO

4 years agoRevert "TODO msDS-ReplValueMetaData"
Stefan Metzmacher [Tue, 9 Jan 2018 07:55:21 +0000 (08:55 +0100)]
Revert "TODO msDS-ReplValueMetaData"

This reverts commit 64acb60583e70ffcc2c093a1c74d5380cfa7696e.

4 years agoTODO msDS-ReplValueMetaData
Stefan Metzmacher [Tue, 9 Jan 2018 07:55:11 +0000 (08:55 +0100)]
TODO msDS-ReplValueMetaData

4 years agomsDS-ReplAttributeMetaData[;binary]
Stefan Metzmacher [Fri, 29 Dec 2017 15:29:13 +0000 (16:29 +0100)]
msDS-ReplAttributeMetaData[;binary]

4 years agoldb-samba: let LDB_FLG_SHOW_BINARY show a hexdump for OCTET string values
Stefan Metzmacher [Thu, 19 Jan 2017 03:30:55 +0000 (04:30 +0100)]
ldb-samba: let LDB_FLG_SHOW_BINARY show a hexdump for OCTET string values

Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agos4:auth_sam: is_local_name
Stefan Metzmacher [Tue, 9 Jan 2018 08:24:11 +0000 (09:24 +0100)]
s4:auth_sam: is_local_name

4 years agoHACK pycredentials tests
Stefan Metzmacher [Tue, 9 Jan 2018 13:01:17 +0000 (14:01 +0100)]
HACK pycredentials tests

4 years agos4: setup logging for tasks to use their own logfile
Ralph Boehme [Sun, 14 Jan 2018 13:51:39 +0000 (14:51 +0100)]
s4: setup logging for tasks to use their own logfile

4 years agoselftest: fl2000dc: add incoming trust to ad_dc
Andreas Schneider [Fri, 9 Jun 2017 13:03:29 +0000 (15:03 +0200)]
selftest: fl2000dc: add incoming trust to ad_dc

4 years agowinbindd: remove unused rpc_trusted_domains() helper function
Stefan Metzmacher [Fri, 1 Dec 2017 08:39:09 +0000 (09:39 +0100)]
winbindd: remove unused rpc_trusted_domains() helper function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agowinbindd: remove unused .trusted_domains() from winbindd_methods
Stefan Metzmacher [Fri, 1 Dec 2017 08:38:22 +0000 (09:38 +0100)]
winbindd: remove unused .trusted_domains() from winbindd_methods

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agowinbindd: remove unused WINBINDD_LIST_TRUSTDOM child implementation
Stefan Metzmacher [Fri, 1 Dec 2017 07:49:34 +0000 (08:49 +0100)]
winbindd: remove unused WINBINDD_LIST_TRUSTDOM child implementation

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agowinbindd: remove unused rescan_trusted_domains() logic
Stefan Metzmacher [Wed, 29 Nov 2017 15:02:28 +0000 (16:02 +0100)]
winbindd: remove unused rescan_trusted_domains() logic

4 years agowinbindd: remove automatic trusts enumeration
Stefan Metzmacher [Wed, 29 Nov 2017 15:02:28 +0000 (16:02 +0100)]
winbindd: remove automatic trusts enumeration

4 years agolib/util: add useful debug messages to directory_create_or_exist()
Stefan Metzmacher [Wed, 23 Oct 2019 13:28:22 +0000 (15:28 +0200)]
lib/util: add useful debug messages to directory_create_or_exist()

We have similar messages in directory_create_or_exist_strict() already.

This doesn't solve https://bugzilla.samba.org/show_bug.cgi?id=14166,
but it displays errors which allows admins to find the problem.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agoCVE-2019-14833 dsdb: send full password to check password script
Björn Baumbach [Tue, 6 Aug 2019 14:32:32 +0000 (16:32 +0200)]
CVE-2019-14833 dsdb: send full password to check password script

utf8_len represents the number of characters (not bytes) of the
password. If the password includes multi-byte characters it is required
to write the total number of bytes to the check password script.
Otherwise the last bytes of the password string would be ignored.

Therefore we rename utf8_len to be clear what it does and does
not represent.

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

Signed-off-by: Björn Baumbach <bb@sernet.de>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Tue Oct 29 11:58:45 UTC 2019 on sn-devel-184

4 years agoCVE-2019-14833: Use utf8 characters in the unacceptable password
Andrew Bartlett [Wed, 18 Sep 2019 23:50:01 +0000 (11:50 +1200)]
CVE-2019-14833: Use utf8 characters in the unacceptable password

This shows that the "check password script" handling has a bug.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12438
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
4 years agoCVE-2019-10218 - s3: libsmb: Protect SMB2 client code from evil server returned names.
Jeremy Allison [Tue, 6 Aug 2019 19:08:09 +0000 (12:08 -0700)]
CVE-2019-10218 - s3: libsmb: Protect SMB2 client code from evil server returned names.

Disconnect with NT_STATUS_INVALID_NETWORK_RESPONSE if so.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
4 years agoCVE-2019-10218 - s3: libsmb: Protect SMB1 client code from evil server returned names.
Jeremy Allison [Mon, 5 Aug 2019 20:39:53 +0000 (13:39 -0700)]
CVE-2019-10218 - s3: libsmb: Protect SMB1 client code from evil server returned names.

Disconnect with NT_STATUS_INVALID_NETWORK_RESPONSE if so.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
4 years agolibnet_join: add SPNs for additional-dns-hostnames entries
Isaac Boukris [Fri, 13 Sep 2019 07:56:10 +0000 (10:56 +0300)]
libnet_join: add SPNs for additional-dns-hostnames entries

and set msDS-AdditionalDnsHostName to the specified list.

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Oct 25 10:43:08 UTC 2019 on sn-devel-184

4 years agodocs-xml: add "additional dns hostnames" smb.conf option
Isaac Boukris [Tue, 17 Sep 2019 18:38:07 +0000 (21:38 +0300)]
docs-xml: add "additional dns hostnames" smb.conf option

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agolibnet_join_set_machine_spn: simplify adding uniq spn to array
Isaac Boukris [Wed, 18 Sep 2019 20:15:57 +0000 (23:15 +0300)]
libnet_join_set_machine_spn: simplify adding uniq spn to array

and do not skip adding a fully qualified spn to netbios-aliases
in case a short spn already existed.

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agolibnet_join_set_machine_spn: simplify memory handling
Isaac Boukris [Wed, 18 Sep 2019 18:29:47 +0000 (21:29 +0300)]
libnet_join_set_machine_spn: simplify memory handling

and avoid a possible memory leak when passing null to
add_string_to_array() as mem_ctx.

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agolibnet_join_set_machine_spn: improve style and make a bit room for indentation
Isaac Boukris [Wed, 18 Sep 2019 17:00:34 +0000 (20:00 +0300)]
libnet_join_set_machine_spn: improve style and make a bit room for indentation

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agolibnet_join: build dnsHostName from netbios name and lp_dnsdomain()
Isaac Boukris [Thu, 29 Aug 2019 21:22:15 +0000 (00:22 +0300)]
libnet_join: build dnsHostName from netbios name and lp_dnsdomain()

This make the join process much more reliable, and avoids "Constraint
violation" error when the fqdn returned from getaddrinfo has already
got assigned an SPN.

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

Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agos4:dirsync: fix interaction of dirsync and extended_dn controls
Stefan Metzmacher [Fri, 4 Oct 2019 12:57:40 +0000 (14:57 +0200)]
s4:dirsync: fix interaction of dirsync and extended_dn controls

Azure AD connect reports discovery errors:
  reference-value-not-ldap-conformant
for attributes member and manager.
The key is that it sends the LDAP_SERVER_EXTENDED_DN_OID without
an ExtendedDNRequestValue blob, which means the flag value should
be treated as 0 and the HEX string format should be used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14153
RN: Prevent azure ad connect from reporting discovery errors:
reference-value-not-ldap-conformant

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Oct 24 11:06:58 UTC 2019 on sn-devel-184

4 years agos4:tests/dirsync: add tests for dirsync with extended_dn
Stefan Metzmacher [Tue, 22 Oct 2019 10:12:32 +0000 (12:12 +0200)]
s4:tests/dirsync: add tests for dirsync with extended_dn

This demonstrates a problems that the extended_dn returned
by the dirsync module always uses the SDDL format for GUID/SID
components.

Azure AD connect reports discovery errors:
  reference-value-not-ldap-conformant
for attributes member and manager.
The key is that it sends the LDAP_SERVER_EXTENDED_DN_OID without
an ExtendedDNRequestValue blob, which means the flag value should
be treated as 0 and the HEX string format should be used.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3: remove now unneeded call to cmdline_messaging_context()
Ralph Boehme [Sat, 4 May 2019 10:12:48 +0000 (12:12 +0200)]
s3: remove now unneeded call to cmdline_messaging_context()

This was only needed as dbwrap_open() had a bug where it asked for the ctdb
connection before initializing messaging. The previous commit fixed that so we
can now safely remove the calls to cmdline_messaging_context() from all tools
that don't use messaging.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 24 09:33:47 UTC 2019 on sn-devel-184

4 years agos3:dbwrap: initialize messaging before getting the ctdb connection
Ralph Boehme [Sat, 4 May 2019 10:12:04 +0000 (12:12 +0200)]
s3:dbwrap: initialize messaging before getting the ctdb connection

This is a better fix for bug #13465.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agowaf: Symlink the compile database to the source dir for clangd
Andreas Schneider [Tue, 22 Oct 2019 07:32:58 +0000 (09:32 +0200)]
waf: Symlink the compile database to the source dir for clangd

https://github.com/ycm-core/YouCompleteMe
https://github.com/abingham/emacs-ycmd

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 Oct 24 08:11:19 UTC 2019 on sn-devel-184

4 years agowaf: Create clang compilation database
Andreas Schneider [Tue, 25 Sep 2018 16:13:26 +0000 (18:13 +0200)]
waf: Create clang compilation database

http://clang.llvm.org/docs/JSONCompilationDatabase.html

This can be used by ymcd or clangd.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agoctdb-tests: Add vacuuming tests
Martin Schwenke [Wed, 14 Aug 2019 05:26:25 +0000 (15:26 +1000)]
ctdb-tests: Add vacuuming tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Oct 24 05:28:21 UTC 2019 on sn-devel-184

4 years agoctdb-tests: Add handling of process clean-up on a cluster node
Martin Schwenke [Sat, 28 Sep 2019 22:27:33 +0000 (08:27 +1000)]
ctdb-tests: Add handling of process clean-up on a cluster node

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Factor out function check_cattdb_num_records()
Martin Schwenke [Mon, 12 Aug 2019 11:02:47 +0000 (21:02 +1000)]
ctdb-tests: Factor out function check_cattdb_num_records()

This can be use in multiple vacuuming tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Add ctdb-db-test tool
Martin Schwenke [Thu, 1 Aug 2019 05:33:52 +0000 (15:33 +1000)]
ctdb-tests: Add ctdb-db-test tool

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-client: Factor out function client_db_tdb()
Martin Schwenke [Fri, 27 Sep 2019 06:49:01 +0000 (16:49 +1000)]
ctdb-client: Factor out function client_db_tdb()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Implement DB_VACUUM control
Martin Schwenke [Tue, 30 Jul 2019 04:17:11 +0000 (14:17 +1000)]
ctdb-daemon: Implement DB_VACUUM control

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-vacuum: Only schedule next vacuum event if vacuuuming is scheduled
Martin Schwenke [Tue, 15 Oct 2019 05:36:44 +0000 (16:36 +1100)]
ctdb-vacuum: Only schedule next vacuum event if vacuuuming is scheduled

At the moment vacuuming is always scheduled.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Factor out code to create vacuuming child
Martin Schwenke [Tue, 30 Jul 2019 04:16:13 +0000 (14:16 +1000)]
ctdb-daemon: Factor out code to create vacuuming child

This changes the behaviour for some failures from exiting to simply
attempting to schedule the next run.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-vacuum: Simplify recording of in-progress vacuuming child
Martin Schwenke [Fri, 4 Oct 2019 02:06:21 +0000 (12:06 +1000)]
ctdb-vacuum: Simplify recording of in-progress vacuuming child

There can only be one, so simplify the logic.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-protocol: Add marshalling for control DB_VACUUM
Martin Schwenke [Tue, 30 Jul 2019 00:52:05 +0000 (10:52 +1000)]
ctdb-protocol: Add marshalling for control DB_VACUUM

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-protocol: Add marshalling for struct ctdb_db_vacuum
Martin Schwenke [Tue, 30 Jul 2019 06:59:37 +0000 (16:59 +1000)]
ctdb-protocol: Add marshalling for struct ctdb_db_vacuum

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-protocol: Add new control CTDB_CONTROL_DB_VACUUM
Martin Schwenke [Tue, 30 Jul 2019 00:34:03 +0000 (10:34 +1000)]
ctdb-protocol: Add new control CTDB_CONTROL_DB_VACUUM

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-vacuum: Avoid processing any more packets
Amitay Isaacs [Tue, 1 Oct 2019 05:05:10 +0000 (15:05 +1000)]
ctdb-vacuum: Avoid processing any more packets

All the vacuum operations if required have an event loop to ensure
completion of pending operations.  Once all the steps are complete,
there is no reason to process any more packets.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Avoid memory leak when packet is deferred
Amitay Isaacs [Wed, 6 Jun 2018 13:47:13 +0000 (15:47 +0200)]
ctdb-daemon: Avoid memory leak when packet is deferred

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-recoverd: No need for database detach handler
Amitay Isaacs [Fri, 16 Feb 2018 06:17:38 +0000 (17:17 +1100)]
ctdb-recoverd: No need for database detach handler

The only reason for recoverd attaching to databases was to migrate
records to the local node as part of vacuuming.  Recovery daemon does
not take part in database vacuuming any more.

The actual database recovery is handled via the recovery_helper and
recovery daemon should not need to attach to the databases any more.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-recoverd: Drop VACUUM_FETCH message handling
Amitay Isaacs [Fri, 16 Feb 2018 06:13:35 +0000 (17:13 +1100)]
ctdb-recoverd: Drop VACUUM_FETCH message handling

This is now implemented in the ctdb daemon using VACUMM_FETCH control.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-vacuum: Replace VACUUM_FETCH message with control
Amitay Isaacs [Fri, 16 Feb 2018 06:01:21 +0000 (17:01 +1100)]
ctdb-vacuum: Replace VACUUM_FETCH message with control

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-vacuum: Add processing of fetch queue
Amitay Isaacs [Fri, 16 Feb 2018 06:00:40 +0000 (17:00 +1100)]
ctdb-vacuum: Add processing of fetch queue

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Add implementation of VACUUM_FETCH control
Amitay Isaacs [Fri, 16 Feb 2018 04:30:13 +0000 (15:30 +1100)]
ctdb-daemon: Add implementation of VACUUM_FETCH control

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-tests: Add marshalling tests for new control
Amitay Isaacs [Fri, 16 Feb 2018 06:28:49 +0000 (17:28 +1100)]
ctdb-tests: Add marshalling tests for new control

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-protocol: Add marshalling for new control VACUUM_FETCH
Amitay Isaacs [Thu, 15 Feb 2018 00:57:44 +0000 (11:57 +1100)]
ctdb-protocol: Add marshalling for new control VACUUM_FETCH

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-protocol: Add new control VACUUM_FETCH
Amitay Isaacs [Thu, 15 Feb 2018 00:57:24 +0000 (11:57 +1100)]
ctdb-protocol: Add new control VACUUM_FETCH

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-tests: Drop code releated to obsolete controls
Amitay Isaacs [Thu, 15 Feb 2018 01:28:11 +0000 (12:28 +1100)]
ctdb-tests: Drop code releated to obsolete controls

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-protocol: Drop code related to obsolete controls
Amitay Isaacs [Thu, 15 Feb 2018 01:13:53 +0000 (12:13 +1100)]
ctdb-protocol: Drop code related to obsolete controls

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb: Avoid malloc/memcpy/free in ctdb_ltdb_fetch()
Volker Lendecke [Tue, 8 Oct 2019 11:02:41 +0000 (13:02 +0200)]
ctdb: Avoid malloc/memcpy/free in ctdb_ltdb_fetch()

Make use of tdb_parse_record()

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
4 years agosamba-tool: py3 compatiblity in 'user syncpasswords --daemon'
Heinz Hoelzl [Wed, 9 Oct 2019 21:14:15 +0000 (10:14 +1300)]
samba-tool: py3 compatiblity in 'user syncpasswords --daemon'

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

Signed-off-by: Heinz Hölzl <heinz.hoelzl@gvcc.net>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Björn Baumbach <bb@sernet.de>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Wed Oct 23 15:54:43 UTC 2019 on sn-devel-184

4 years agoreplace: Only link libnsl and libsocket if requrired
Andreas Schneider [Mon, 21 Oct 2019 15:08:08 +0000 (17:08 +0200)]
replace: Only link libnsl and libsocket if requrired

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Oct 23 08:23:13 UTC 2019 on sn-devel-184

4 years agos3:lib:wins fix a compile warning on Ubuntu 18.04
Christian Ambach [Tue, 22 Oct 2019 09:02:05 +0000 (11:02 +0200)]
s3:lib:wins fix a compile warning on Ubuntu 18.04

gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) with -O2 puts up a warning here:
../../source3/lib/wins_srv.c: In function ‘wins_srv_tags’:
../../source3/lib/wins_srv.c:235:3: error: assuming signed overflow does not
occur when simplifying conditional to constant [-Werror=strict-overflow]
   for (j=0;j<count;j++) {
   ^~~
cc1: all warnings being treated as errors

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Oct 23 04:57:09 UTC 2019 on sn-devel-184

4 years agosmbd: Save 520 bytes of writable memory from every smbd
Volker Lendecke [Mon, 21 Oct 2019 12:38:47 +0000 (14:38 +0200)]
smbd: Save 520 bytes of writable memory from every smbd

Move what can be const from the "data" to the "text" segment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Oct 23 02:37:12 UTC 2019 on sn-devel-184

4 years agosmbd: Remove an unused #define from mangle_hash2.c
Volker Lendecke [Mon, 21 Oct 2019 12:37:04 +0000 (14:37 +0200)]
smbd: Remove an unused #define from mangle_hash2.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosmbd: Mark #else/#endif with the if-#define
Volker Lendecke [Tue, 22 Oct 2019 06:30:01 +0000 (08:30 +0200)]
smbd: Mark #else/#endif with the if-#define

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-tests: Add -l option to set number of local daemons
Martin Schwenke [Thu, 17 Oct 2019 05:42:36 +0000 (16:42 +1100)]
ctdb-tests: Add -l option to set number of local daemons

This is the only place where setting an environment variable by hand
is recommended, so remove the anomaly.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Oct 22 21:02:11 UTC 2019 on sn-devel-184

4 years agoctdb-tests: Prefix remaining environment variables with CTDB_
Martin Schwenke [Thu, 17 Oct 2019 05:33:48 +0000 (16:33 +1100)]
ctdb-tests: Prefix remaining environment variables with CTDB_

Now they are clearly all part of CTDB.

TEST_SOCKET_WRAPPER_SO_PATH gets too long in
integration_local_daemons.bash, so change it to
CTDB_TEST_SWRAP_SO_PATH instead of just prefixing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Drop setting of test state directory for testonly target
Martin Schwenke [Thu, 17 Oct 2019 05:19:58 +0000 (16:19 +1100)]
ctdb-tests: Drop setting of test state directory for testonly target

This is the default and deciding this should be left to run_tests.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Enable printing of logs on failure in autobuild
Martin Schwenke [Thu, 17 Oct 2019 05:19:33 +0000 (16:19 +1100)]
ctdb-tests: Enable printing of logs on failure in autobuild

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Add run_tests.sh option to print logs on test failure
Martin Schwenke [Thu, 17 Oct 2019 04:53:09 +0000 (15:53 +1100)]
ctdb-tests: Add run_tests.sh option to print logs on test failure

Implement this for local daemons integration tests, dumping last 100
lines of logs.  This makes it possible to debug some failures in
automated tests where the logs are unavailable for analysis.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Avoid running valgrind under valgrind
Martin Schwenke [Wed, 16 Oct 2019 06:21:51 +0000 (17:21 +1100)]
ctdb-tests: Avoid running valgrind under valgrind

When run from integration tests $CTDB already includes $VALGRIND, if
set.  So only add $VALGRIND if $CTDB is not set.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Simplify tool unit test runner
Martin Schwenke [Sun, 13 Oct 2019 23:15:07 +0000 (10:15 +1100)]
ctdb-tests: Simplify tool unit test runner

There is no good reason why the code needs to be this way.  The
intervening code was removed years ago leaving a more complex version
of something very simple.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agosamba-tool domain: fix an unhandled exception
Amit Kumar [Mon, 2 Sep 2019 09:26:08 +0000 (04:26 -0500)]
samba-tool domain: fix an unhandled exception

Uncaught exception on running 'samba-tool domain schemaupgrade'

ERROR(<class 'ModuleNotFoundError'>): uncaught exception - No module named
'markdown' File "/usr/lib64/python3.7/site-packages/samba/netcmd/__init__.py",
line 185, in _run return self.run(*args, **kwargs) File
"/usr/lib64/python3.7/site-packages/samba/netcmd/domain.py", line 4157, in run
from samba.ms_schema_markdown import read_ms_markdown File
"/usr/lib64/python3.7/site-packages/samba/ms_schema_markdown.py", line 26, in
<module> import markdown

Signed-off-by: Amit Kumar amitkuma@redhat.com
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agonet: 'net ads gpo getgpo' command not dumping gpo
Amit Kumar [Mon, 15 Jul 2019 20:59:44 +0000 (02:29 +0530)]
net: 'net ads gpo getgpo' command not dumping gpo

We have passed dump_gpo(debuglevel=1), hence gpo is not
dumped at debuglevel=0. But end user will expect gpo
to be dumped without setting debug flag.

Signed-off-by: Amit Kumar <amitkuma@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3/libsmb: clang: Fix 'the left operand of '-' is a garbage value'
Noel Power [Tue, 13 Aug 2019 14:57:22 +0000 (15:57 +0100)]
s3/libsmb: clang: Fix 'the left operand of '-' is a garbage value'

Fixes:

source3/libsmb/clifile.c:360:19: warning: The left operand of '-' is a garbage value <--[clang]
        if (data[num_data-1] != '\0') {
                 ~~~~~~~~^
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Oct 22 18:48:43 UTC 2019 on sn-devel-184

4 years agos3/libsmb: clang: Fix 'Assigned value is garbage or undefined'
Noel Power [Tue, 13 Aug 2019 14:55:13 +0000 (15:55 +0100)]
s3/libsmb: clang: Fix 'Assigned value is garbage or undefined'

Fixes:

source3/libsmb/clirap.c:1490:9: warning: Assigned value is garbage or undefined <--[clang]
                *mode = attr;
                      ^ ~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3/libsmb: clang: Fix 'Value stored to 'p' is never read'
Noel Power [Tue, 13 Aug 2019 14:52:46 +0000 (15:52 +0100)]
s3/libsmb: clang: Fix 'Value stored to 'p' is never read'

Fixes:

source3/libsmb/clirap.c:145:3: warning: Value stored to 'p' is never read <--[clang]
                p = rdata;
                ^   ~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3/libsmb: clang: Fix 'Assigned value is garbage or undefined'
Noel Power [Tue, 13 Aug 2019 14:43:30 +0000 (15:43 +0100)]
s3/libsmb: clang: Fix 'Assigned value is garbage or undefined'

Fixes:

source3/libsmb/smbsock_connect.c:786:13: warning: Assigned value is garbage or undefined <--[clang]
                state->fd = fd;
                          ^ ~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3/libsmb: clang: Fix 'Value stored to 'create_options' is never read'
Noel Power [Tue, 13 Aug 2019 14:36:56 +0000 (15:36 +0100)]
s3/libsmb: clang: Fix 'Value stored to 'create_options' is never read'

It looks like the create_options are accumulated as the depending on the
failure reasons returned for cli_smb2_create_fnum (except for when a
directory is encountered) this looks like a mistake
Fixes:

source3/libsmb/cli_smb2_fnum.c:1870:3: warning: Value stored to 'create_options' is never read <--[clang]
                create_options |= FILE_DIRECTORY_FILE;
                ^
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3/libsmb: clang: Fix 'Dereference of undefined pointer value'
Noel Power [Tue, 13 Aug 2019 14:27:35 +0000 (15:27 +0100)]
s3/libsmb: clang: Fix 'Dereference of undefined pointer value'

Fixes:

source3/libsmb/clidfs.c:350:3: warning: Dereference of undefined pointer value <--[clang]
                DLIST_ADD_END(referring_cli, cli);
                ^
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>