samba.git
4 years agosmbd: Use file_id_str_buf() in downgrade_lease()
Volker Lendecke [Mon, 4 Nov 2019 06:39:48 +0000 (07:39 +0100)]
smbd: Use file_id_str_buf() in downgrade_lease()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use file_id_str_buf() in downgrade_oplock()
Volker Lendecke [Mon, 4 Nov 2019 06:39:48 +0000 (07:39 +0100)]
smbd: Use file_id_str_buf() in downgrade_oplock()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use file_id_str_buf() in set_file_oplock()
Volker Lendecke [Mon, 4 Nov 2019 06:39:48 +0000 (07:39 +0100)]
smbd: Use file_id_str_buf() in set_file_oplock()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use file_id_str_buf() in set_file_oplock()
Volker Lendecke [Sun, 3 Nov 2019 17:52:07 +0000 (18:52 +0100)]
smbd: Use file_id_str_buf() in set_file_oplock()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agontlm_auth: Fix nonempty line endings
Volker Lendecke [Sat, 2 Nov 2019 13:08:00 +0000 (14:08 +0100)]
ntlm_auth: Fix nonempty line endings

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agontlm_auth: Simplify session generation
Volker Lendecke [Sat, 2 Nov 2019 13:01:10 +0000 (14:01 +0100)]
ntlm_auth: Simplify session generation

We don't need to parse a text sid, we have those as binary available

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoauth: Simplify session generation
Volker Lendecke [Sat, 2 Nov 2019 12:56:49 +0000 (13:56 +0100)]
auth: Simplify session generation

We don't need to parse a text sid, we have those as binary available

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Avoid includes.h in g_lock.c
Volker Lendecke [Thu, 10 Oct 2019 14:30:14 +0000 (16:30 +0200)]
lib: Avoid includes.h in g_lock.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Remove g_lock_do()
Volker Lendecke [Thu, 10 Oct 2019 11:40:44 +0000 (13:40 +0200)]
lib: Remove g_lock_do()

This puts too much logic into this lowlevel infrastructure module,
given the two minor external users.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agonet: Avoid the use of g_lock_do()
Volker Lendecke [Thu, 10 Oct 2019 11:38:17 +0000 (13:38 +0200)]
net: Avoid the use of g_lock_do()

g_lock_do() does too much in g_lock.c, and it's rarely used.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agonet: Avoid the use of g_lock_do()
Volker Lendecke [Thu, 10 Oct 2019 08:27:54 +0000 (10:27 +0200)]
net: Avoid the use of g_lock_do()

g_lock_do() does too much in g_lock.c, and it's rarely used.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agog_lock: Avoid sys_random(), use generate_random()
Volker Lendecke [Wed, 9 Oct 2019 19:38:42 +0000 (21:38 +0200)]
g_lock: Avoid sys_random(), use generate_random()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodbwrap_tdb: Avoid a use of talloc_stackframe()
Volker Lendecke [Wed, 16 Oct 2019 13:27:49 +0000 (15:27 +0200)]
dbwrap_tdb: Avoid a use of talloc_stackframe()

For really large keys (that probably don't exist), use dump_data()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Remove #define serverid_equal server_id_equal
Volker Lendecke [Wed, 9 Oct 2019 19:38:04 +0000 (21:38 +0200)]
lib: Remove #define serverid_equal server_id_equal

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3: smbd: SMB1 UNIX extensions - remove dead code.
Jeremy Allison [Tue, 15 Oct 2019 20:28:11 +0000 (13:28 -0700)]
s3: smbd: SMB1 UNIX extensions - remove dead code.

We no longer set delete_on_fail on return from mknod.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov  6 19:31:00 UTC 2019 on sn-devel-184

4 years agos3: smbd: SMB1 UNIX extensions - POSIX mknod should just create the object, not chang...
Jeremy Allison [Tue, 15 Oct 2019 20:39:00 +0000 (13:39 -0700)]
s3: smbd: SMB1 UNIX extensions - POSIX mknod should just create the object, not change attributes after.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3: smbd: SMB1 UNIX extensions - only allow size change on regular file.
Jeremy Allison [Tue, 15 Oct 2019 22:04:39 +0000 (15:04 -0700)]
s3: smbd: SMB1 UNIX extensions - only allow size change on regular file.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years ago3: smbd: SMB1 UNIX extensions - For POSIX mknod we can only create blk/chr/fifo/sock...
Jeremy Allison [Tue, 15 Oct 2019 20:35:44 +0000 (13:35 -0700)]
3: smbd: SMB1 UNIX extensions - For POSIX mknod we can only create blk/chr/fifo/sock objects.

Fail requests to create other object types.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3: smbd: SMB1 UNIX extensions - Ensure POSIX mknod is root-only.
Jeremy Allison [Tue, 15 Oct 2019 20:25:14 +0000 (13:25 -0700)]
s3: smbd: SMB1 UNIX extensions - Ensure POSIX mknod is root-only.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agobootstrap: Fix centos7 image creation
Andreas Schneider [Wed, 6 Nov 2019 07:43:05 +0000 (08:43 +0100)]
bootstrap: Fix centos7 image creation

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 Nov  6 13:35:17 UTC 2019 on sn-devel-184

4 years agobootstrap: Add Fedora 31
Andreas Schneider [Tue, 5 Nov 2019 09:39:16 +0000 (10:39 +0100)]
bootstrap: Add Fedora 31

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agobootstrap: Remove Fedora 28 which is already EOL
Andreas Schneider [Tue, 5 Nov 2019 09:38:48 +0000 (10:38 +0100)]
bootstrap: Remove Fedora 28 which is already EOL

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agoctdb-tests: Make process exists test more resilient
Martin Schwenke [Tue, 5 Nov 2019 04:34:18 +0000 (15:34 +1100)]
ctdb-tests: Make process exists test more resilient

This can fail as follows:

--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
Running test ./tests/UNIT/tool/ctdb.process-exists.003.sh (02:26:30)
--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
ctdb.process-exists.003      - ctdbd process with multiple connections on node 0
Setting up fake ctdbd
<10||0|
OK
<10|PID 26107 exists
|0|
OK
==================================================
Running "ctdb -d NOTICE process-exists 26107 0x1234567812345678"
PASSED
==================================================
Running "ctdb -d NOTICE process-exists 26107 0xaebbccdd12345678"
Registered SRVID 0xaebbccdd12345678
--------------------------------------------------
Output (Exit status: 1):
--------------------------------------------------
PID 26107 with SRVID 0xaebbccdd12345678 does not exist
--------------------------------------------------
Required output (Exit status: 0):
--------------------------------------------------
PID 26107 with SRVID 0xaebbccdd12345678 exists

FAILED
connection to daemon closed, exiting
==========================================================================
TEST FAILED: ./tests/UNIT/tool/ctdb.process-exists.003.sh (status 1) (duration: 0s)
==========================================================================

This happens when dummy_client has not registered the SRVID (for its
10th connection) before the 2nd simple_test.

Change the initial wait to ensure that the SRVID is registered.

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): Wed Nov  6 02:46:24 UTC 2019 on sn-devel-184

4 years agoctdb-tests: Improve code quality in ctdb_init()
Martin Schwenke [Tue, 29 Oct 2019 04:22:38 +0000 (15:22 +1100)]
ctdb-tests: Improve code quality in ctdb_init()

Improve quoting and indentation.  Print a clear error if the cluster
goes back into recovery and doesn't come back out.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: No longer retry starting the cluster
Martin Schwenke [Tue, 29 Oct 2019 04:11:31 +0000 (15:11 +1100)]
ctdb-tests: No longer retry starting the cluster

Retrying like this hides bugs.  The cluster should come up first time,
every time.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tcp: Drop tracking of file descriptor for incoming connections
Martin Schwenke [Tue, 29 Oct 2019 06:28:22 +0000 (17:28 +1100)]
ctdb-tcp: Drop tracking of file descriptor for incoming connections

This file descriptor is owned by the incoming queue.  It will be
closed when the queue is torn down.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14175
RN: Avoid communication breakdown on node reconnect

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tcp: Avoid orphaning the TCP incoming queue
Martin Schwenke [Tue, 29 Oct 2019 04:29:11 +0000 (15:29 +1100)]
ctdb-tcp: Avoid orphaning the TCP incoming queue

CTDB's incoming queue handling does not check whether an existing
queue exists, so can overwrite the pointer to the queue.  This used to
be harmless until commit c68b6f96f26664459187ab2fbd56767fb31767e0
changed the read callback to use a parent structure as the callback
data.  Instead of cleaning up an orphaned queue on disconnect, as
before, this will now free the new queue.

At first glance it doesn't seem possible that 2 incoming connections
from the same node could be processed before the intervening
disconnect.  However, the incoming connections and disconnect occur on
different file descriptors.  The queue can become orphaned on node A
when the following sequence occurs:

1. Node A comes up
2. Node A accepts an incoming connection from node B
3. Node B processes a timeout before noticing that outgoing the queue is writable
4. Node B tears down the outgoing connection to node A
5. Node B initiates a new connection to node A
6. Node A accepts an incoming connection from node B

Node A processes then the disconnect of the old incoming connection
from (2) but tears down the new incoming connection from (6).  This
then occurs until the originally affected node is restarted.

However, due to the number of outgoing connection attempts and
associated teardowns, this induces the same behaviour on the
corresponding incoming queue on all nodes that node A attempts to
connect to.  Therefore, other nodes become affected and need to be
restarted too.

As a result, the whole cluster probably needs to be restarted to
recover from this situation.

The problem can occur any time CTDB is started on a node.

The fix is to avoid accepting new incoming connections when a queue
for incoming connections is already present.  The connecting node will
simply retry establishing its outgoing connection.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tcp: Check incoming queue to see if incoming connection is up
Martin Schwenke [Tue, 29 Oct 2019 04:25:26 +0000 (15:25 +1100)]
ctdb-tcp: Check incoming queue to see if incoming connection is up

This makes it consistent with the reverse case.  Also, in_fd will soon
be removed.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agos3: libsmb: Ensure return from net_share_enum_rpc() sets cli->raw_status on error.
Jeremy Allison [Thu, 31 Oct 2019 21:38:35 +0000 (14:38 -0700)]
s3: libsmb: Ensure return from net_share_enum_rpc() sets cli->raw_status on error.

Convert net_share_enum_rpc() to return an NTSTATUS and ensure the
status is set correctly on error so SMBC_errno() can return it.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Nov  5 12:36:48 UTC 2019 on sn-devel-184

4 years agos3:libads: Fix mem leak in ads_create_machine_acct
Jones Syue [Fri, 1 Nov 2019 07:50:29 +0000 (15:50 +0800)]
s3:libads: Fix mem leak in ads_create_machine_acct

Use 'goto done' instead of 'return' to fix machine_escaped leak.

Signed-off-by: Jones Syue <jonessyue@qnap.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov  4 22:48:50 UTC 2019 on sn-devel-184

4 years agogitlab-ci: Run 'samba' tests also with MIT Kerberos
Andreas Schneider [Mon, 4 Nov 2019 06:47:15 +0000 (07:47 +0100)]
gitlab-ci: Run 'samba' tests also with MIT Kerberos

This runs the tests of the ktest environment.

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): Mon Nov  4 14:19:17 UTC 2019 on sn-devel-184

4 years agolibcli:smb: Do not use gnutls_aead_cipher_encryptv2() with GnuTLS 3.6.10
Andreas Schneider [Mon, 4 Nov 2019 07:40:34 +0000 (08:40 +0100)]
libcli:smb: Do not use gnutls_aead_cipher_encryptv2() with GnuTLS 3.6.10

The gnutls_aead_cipher_encryptv2() implementation was released with a
bug. This wont be fixed before 3.6.11.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agoCVE-2019-14847 dsdb: Correct behaviour of ranged_results when combined with dirsync
Andrew Bartlett [Tue, 15 Oct 2019 02:44:34 +0000 (15:44 +1300)]
CVE-2019-14847 dsdb: Correct behaviour of ranged_results when combined with dirsync

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu Oct 31 23:29:15 UTC 2019 on sn-devel-184

4 years agoCVE-2019-14847 dsdb: Demonstrate the correct interaction of ranged_results style...
Andrew Bartlett [Tue, 15 Oct 2019 03:28:46 +0000 (16:28 +1300)]
CVE-2019-14847 dsdb: Demonstrate the correct interaction of ranged_results style attributes and dirsync

Incremental results are provided by a flag on the dirsync control, not
by changing the attribute name.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
4 years agos4-torture: Reduce flapping in SambaToolDrsTests.test_samba_tool_replicate_local
Andrew Bartlett [Thu, 31 Oct 2019 17:53:56 +0000 (06:53 +1300)]
s4-torture: Reduce flapping in SambaToolDrsTests.test_samba_tool_replicate_local

This test often flaps in Samba 4.9 (where more tests and DCs run in the environment)
with obj_1 being 3.  This is quite OK, we just need to see some changes get
replicated, not 0 changes.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
4 years agodocs-xml: Update krb5_ccache_type in pam_winbind.8
Andreas Schneider [Mon, 28 Oct 2019 07:34:16 +0000 (08:34 +0100)]
docs-xml: Update krb5_ccache_type in pam_winbind.8

This is a copy from pam_winbind.conf.5

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

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): Thu Oct 31 19:32:55 UTC 2019 on sn-devel-184

4 years agodocs-xml: Improve krb5_ccache_type documentation
Andreas Schneider [Thu, 31 Oct 2019 16:10:59 +0000 (17:10 +0100)]
docs-xml: Improve krb5_ccache_type documentation

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agodocs-xml/manpages/pam_winbind.conf.5.xml: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
docs-xml/manpages/pam_winbind.conf.5.xml: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Björn Jacke <bjacke@samba.org>
Autobuild-Date(master): Thu Oct 31 02:18:12 UTC 2019 on sn-devel-184

4 years agodocs-xml/manpages/pam_winbind.8.xml: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
docs-xml/manpages/pam_winbind.8.xml: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agodocs-xml/Samba-Developers-Guide/unix-smb.xml: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
docs-xml/Samba-Developers-Guide/unix-smb.xml: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/utils/smnotify/smnotify.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
ctdb/utils/smnotify/smnotify.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/utils/scsi_io/scsi_io.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
ctdb/utils/scsi_io/scsi_io.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/server/ctdb_daemon.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
ctdb/server/ctdb_daemon.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/server/ctdb_client.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/server/ctdb_client.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/server/ctdb_call.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/server/ctdb_call.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/include/ctdb_private.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/include/ctdb_private.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/ib/ibwrapper_test.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/ib/ibwrapper_test.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/ib/ibw_ctdb.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/ib/ibw_ctdb.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/doc/readonlyrecords.txt: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/doc/readonlyrecords.txt: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/doc/ctdb.1.xml: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/doc/ctdb.1.xml: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/doc/ctdb-tunables.7.xml: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/doc/ctdb-tunables.7.xml: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/doc/ctdb-statistics.7.xml: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/doc/ctdb-statistics.7.xml: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/common/srvid.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/common/srvid.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb/client/client.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
ctdb/client/client.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agobuildtools/wafsamba/wscript: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
buildtools/wafsamba/wscript: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agobuildtools/wafsamba/samba_install.py: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:08 +0000 (02:41 +0200)]
buildtools/wafsamba/samba_install.py: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource4/scripting/bin/samba_upgradeprovision: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:10 +0000 (02:41 +0200)]
source4/scripting/bin/samba_upgradeprovision: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource4/rpc_server/lsa/lsa_lookup.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source4/rpc_server/lsa/lsa_lookup.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource4/libcli/libcli.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source4/libcli/libcli.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource4/libcli/clireadwrite.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source4/libcli/clireadwrite.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource4/dsdb/schema/schema_description.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source4/dsdb/schema/schema_description.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/winbindd/winbindd_util.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/winbindd/winbindd_util.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/utils/net_rpc.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/utils/net_rpc.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/smbd/reply.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/smbd/reply.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/registry/reg_parse.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/registry/reg_parse.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/registry/reg_import.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/registry/reg_import.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/registry/reg_format.h: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/registry/reg_format.h: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/modules/vfs_virusfilter.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/modules/vfs_virusfilter.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agosource3/modules/vfs_recycle.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
source3/modules/vfs_recycle.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agopython/samba/upgradehelpers.py: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
python/samba/upgradehelpers.py: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agopython/samba/netcmd/gpo.py: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
python/samba/netcmd/gpo.py: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agopython/samba/dbchecker.py: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
python/samba/dbchecker.py: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agolibrpc/ndr/ndr_compression.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
librpc/ndr/ndr_compression.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agolibgpo/gpo_filesync.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
libgpo/gpo_filesync.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agolib/tdb/docs/tracing.txt: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
lib/tdb/docs/tracing.txt: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agolib/replace/xattr.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
lib/replace/xattr.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoexamples/VFS/skel_transparent.c: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
examples/VFS/skel_transparent.c: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agodynconfig/wscript: typo fixes
Björn Jacke [Sat, 26 Oct 2019 00:41:09 +0000 (02:41 +0200)]
dynconfig/wscript: typo fixes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agos3:smbclient added ABI signature file
Puran Chand [Mon, 21 Oct 2019 06:09:18 +0000 (11:39 +0530)]
s3:smbclient added ABI signature file

Signed-off-by: Puran Chand <pchand@vmware.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Oct 30 22:18:15 UTC 2019 on sn-devel-184

4 years agos4: torture: Add additional smbc_readdirplus2() tests into readdirplus_seek().
Jeremy Allison [Fri, 18 Oct 2019 18:44:07 +0000 (11:44 -0700)]
s4: torture: Add additional smbc_readdirplus2() tests into readdirplus_seek().

Make sure we haven't broken anything :-).

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4: torture Add a test for smbc_readdirplus2()
Jeremy Allison [Fri, 18 Oct 2019 18:29:19 +0000 (11:29 -0700)]
s4: torture Add a test for smbc_readdirplus2()

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: libsmb: Added new API smbc_readdirplus2()
Jeremy Allison [Fri, 18 Oct 2019 17:29:48 +0000 (10:29 -0700)]
s3: libsmb: Added new API smbc_readdirplus2()

Returns the same as smbc_readdirplus() but also
can return a struct stat if passed in by the caller.

struct stat is synthesized from the data
returned by the SMB server.

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: libsmb: Add missing ino field to internal struct smbc_dirplus_list.
Jeremy Allison [Fri, 18 Oct 2019 16:45:33 +0000 (09:45 -0700)]
s3: libsmb: Add missing ino field to internal struct smbc_dirplus_list.

This should have been added to struct libsmb_file_info, but
this is user-visible so I don't want to change this now. Adding
it to the containing struct allows us to synthesise a struct stat
to return from smbc_readdirplus2() to return all the info from
the server to callers.

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: libsmb: Move setting all struct stat fields into setup_stat().
Jeremy Allison [Fri, 18 Oct 2019 17:48:55 +0000 (10:48 -0700)]
s3: libsmb: Move setting all struct stat fields into setup_stat().

That way we only have one place where a struct stat is synthesised
for libsmbclient callers.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: libsmb: Move setting st->st_ino into setup_stat.
Jeremy Allison [Fri, 18 Oct 2019 16:34:02 +0000 (09:34 -0700)]
s3: libsmb: Move setting st->st_ino into setup_stat.

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: libsmb: Change generate_inode()/setup_stat() to modern coding standards.
Jeremy Allison [Fri, 18 Oct 2019 16:24:38 +0000 (09:24 -0700)]
s3: libsmb: Change generate_inode()/setup_stat() to modern coding standards.

Change setup_stat() to be void. It doesn't return anything. Export
so it can be used by upcoming smbc_readdirplus2() call.

Remove unused SMBCCTX *context parameters.
Remove unused talloc_stackframe().

Signed-off-by: Puran Chand <pchand@vmware.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: utils: smbtree. Ensure we don't call cli_RNetShareEnum() on an SMB1 connection.
Jeremy Allison [Tue, 29 Oct 2019 19:11:49 +0000 (12:11 -0700)]
s3: utils: smbtree. Ensure we don't call cli_RNetShareEnum() on an SMB1 connection.

Last unprotected call of cli_RNetShareEnum(). Not a libsmbclient
bug here but might as well fix the last caller as part of the
fix for the bug.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: libsmb: Ensure we don't call cli_RNetShareEnum() on an SMB1 connection.
Jeremy Allison [Tue, 29 Oct 2019 19:11:01 +0000 (12:11 -0700)]
s3: libsmb: Ensure we don't call cli_RNetShareEnum() on an SMB1 connection.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:smb2_server: add message mid to SMB2 request done log message
Ralph Boehme [Wed, 30 Oct 2019 14:05:13 +0000 (15:05 +0100)]
s3:smb2_server: add message mid to SMB2 request done log message

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): Wed Oct 30 18:42:35 UTC 2019 on sn-devel-184

4 years agos3:smb2_server: modernize a debug statement
Ralph Boehme [Wed, 30 Oct 2019 13:23:20 +0000 (14:23 +0100)]
s3:smb2_server: modernize a debug statement

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib/adouble: pass filesize to ad_unpack()
Ralph Boehme [Thu, 24 Oct 2019 15:15:18 +0000 (17:15 +0200)]
lib/adouble: pass filesize to ad_unpack()

ad_unpack() needs the filesize, not the capped IO size we're using in the caller
to read up to "size" bystem from the ._ AppleDouble file.

This fixes a regression introduced by bdc257a1cbac7e8c73a084b618ba642476807483
for bug 13968.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14171
RN: vfs_fruit returns capped resource fork length

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Oct 30 14:52:34 UTC 2019 on sn-devel-184

4 years agolib/adouble: drop ad_data reallocate logic
Ralph Boehme [Fri, 25 Oct 2019 13:21:32 +0000 (15:21 +0200)]
lib/adouble: drop ad_data reallocate logic

Simply set the buffer size to AD_XATTR_MAX_HDR_SIZE. When reading the
AppleDouble file, read up to AD_XATTR_MAX_HDR_SIZE from the file.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolib/adouble: README.Coding fix: multi-line if expression
Ralph Boehme [Thu, 24 Oct 2019 15:26:08 +0000 (17:26 +0200)]
lib/adouble: README.Coding fix: multi-line if expression

Also remove a TAB.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolib/adouble: fix a long line
Ralph Boehme [Thu, 24 Oct 2019 15:17:28 +0000 (17:17 +0200)]
lib/adouble: fix a long line

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agotorture: expand test "vfs.fruit.resource fork IO" to check size
Ralph Boehme [Fri, 25 Oct 2019 13:41:40 +0000 (15:41 +0200)]
torture: expand test "vfs.fruit.resource fork IO" to check size

Reveals a bug where the resource fork size is capped at 65454 bytes.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-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