]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
2 years agos4-torture/drs: Add test showing that if present in the set the NC root leads and...
Andrew Bartlett [Mon, 24 Jul 2023 00:05:18 +0000 (12:05 +1200)] 
s4-torture/drs: Add test showing that if present in the set the NC root leads and tmp_highest_usn moves

The NC root, on any replication when it appears, is the first object to be
replicated, including for all subsequent chunks in the replication.

However the tmp_highest_usn is not updated by that USN, it must
only be updated for the non-NC changes (to match Windows exactly),
or at least only updated with the non-NC changes until it would
naturally appear.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4-torture/drs: Add test demonstrating that a GetNCChanges REPL_OBJ will not reset...
Andrew Bartlett [Mon, 26 Jun 2023 04:25:32 +0000 (16:25 +1200)] 
s4-torture/drs: Add test demonstrating that a GetNCChanges REPL_OBJ will not reset the replication cookie

This demonstrates the behaviour used by the "Azure AD Connect" cloud sync tool.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4-torture/drs: Add a test matching Azure AD Connect REPL_OBJ behaviour
Andrew Bartlett [Tue, 27 Jun 2023 00:20:32 +0000 (12:20 +1200)] 
s4-torture/drs: Add a test matching Azure AD Connect REPL_OBJ behaviour

Azure AD Connect will send a GUID but no DummyDN.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4-torture/drs: Use addCleanup() in getchanges.py for OU handling
Andrew Bartlett [Sun, 23 Jul 2023 23:37:19 +0000 (11:37 +1200)] 
s4-torture/drs: Use addCleanup() in getchanges.py for OU handling

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4-torture/drs: Create temp OU with a unique name per test
Andrew Bartlett [Sun, 23 Jul 2023 23:36:36 +0000 (11:36 +1200)] 
s4-torture/drs: Create temp OU with a unique name per test

It is always better to keep the testing OUs unique if possible.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4-torture/drs: Save the server dnsname on the DcConnection object
Andrew Bartlett [Sun, 23 Jul 2023 23:40:46 +0000 (11:40 +1200)] 
s4-torture/drs: Save the server dnsname on the DcConnection object

This object is used to hold one of many possible connections and
it is helpful for debugging and uniqueness to know which DC is being
connected to.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4-rpc_server/drsuapi: Remove rudundant check for valid and non-NULL ncRoot_dn
Andrew Bartlett [Tue, 27 Jun 2023 02:22:52 +0000 (14:22 +1200)] 
s4-rpc_server/drsuapi: Remove rudundant check for valid and non-NULL ncRoot_dn

This check was valuable before aee2039e63ceeb5e69a0461fb77e0f18278e4dc4
but now only checks things we know to be true, as the value has come
from Samba via drs_ObjectIdentifier_to_dn_and_nc_root() either on this
or a previous call.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4-dsdb: Improve logging for drs_ObjectIdentifier_to_dn_and_nc_root()
Andrew Bartlett [Tue, 27 Jun 2023 02:59:49 +0000 (14:59 +1200)] 
s4-dsdb: Improve logging for drs_ObjectIdentifier_to_dn_and_nc_root()

At this layer we can make a reasonable assumption about being able
to read ldb_errstring() to print that for extra useful debugging.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4-rpc_server/drsuapi: Improve debug message for drs_ObjectIdentifier_to_dn_and_nc_ro...
Andrew Bartlett [Tue, 27 Jun 2023 05:18:39 +0000 (17:18 +1200)] 
s4-rpc_server/drsuapi: Improve debug message for drs_ObjectIdentifier_to_dn_and_nc_root() failure

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4-rpc_server/drsuapi: Improve debugging of invalid DNs
Andrew Bartlett [Tue, 27 Jun 2023 00:18:24 +0000 (12:18 +1200)] 
s4-rpc_server/drsuapi: Improve debugging of invalid DNs

This is still unreachable, so but improve the logging
to give more detail in this area anyway.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4-rpc_server/drsuapi: Add tmp_highest_usn tracking to replication log
Andrew Bartlett [Sun, 23 Jul 2023 23:35:45 +0000 (11:35 +1200)] 
s4-rpc_server/drsuapi: Add tmp_highest_usn tracking to replication log

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agosmbclient3: Get all reparse data for allinfo
Volker Lendecke [Thu, 6 Jul 2023 15:53:35 +0000 (17:53 +0200)] 
smbclient3: Get all reparse data for allinfo

If we hit a reparse point in point, it might be something but a
symlink.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug 10 14:36:40 UTC 2023 on atb-devel-224

2 years agolibsmb: Retry with OPEN_REPARSE_POINT on IO_REPARSE_TAG_NOT_HANDLED
Volker Lendecke [Wed, 5 Jul 2023 14:38:32 +0000 (16:38 +0200)] 
libsmb: Retry with OPEN_REPARSE_POINT on IO_REPARSE_TAG_NOT_HANDLED

Eventually we'll have to make STOPPED_ON_SYMLINK special to handle the
symlink response, but for now they are the same.

STOPPED_ON_SYMLINK will tell us where the symlink is,
REPARSE_TAG_NOT_HANDLED won't. So if there's an unhandled reparse
point somewhere in the path, there's no really good way to handle
this. We'll get the REPARSE_TAG_NOT_HANDLED the second time as
well. Even SMB1 QPATHINFO gets this when you try to cross a NFS
reparse point.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolibsmb: Factor out cli_get_reparse_data() from cli_readlink()
Volker Lendecke [Thu, 6 Jul 2023 15:34:31 +0000 (17:34 +0200)] 
libsmb: Factor out cli_get_reparse_data() from cli_readlink()

Will be used in smbclient's allinfo command: Reparse points are more
than just symlinks.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolibsmb: Move symlink_reparse_buffer_parse() to reparse.c
Volker Lendecke [Tue, 1 Aug 2023 13:57:50 +0000 (15:57 +0200)] 
libsmb: Move symlink_reparse_buffer_parse() to reparse.c

The goal of this is to eventually remove reparse_symlink.c once we
have marshalling routines for symlinks in reparse.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolibsmb: Some README.Coding for symlink_reparse_buffer_parse()
Volker Lendecke [Tue, 1 Aug 2023 13:36:15 +0000 (15:36 +0200)] 
libsmb: Some README.Coding for symlink_reparse_buffer_parse()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agopylibsmb: Use reparse_data_buffer_parse()
Volker Lendecke [Tue, 1 Aug 2023 13:26:49 +0000 (15:26 +0200)] 
pylibsmb: Use reparse_data_buffer_parse()

Remove the last direct caller of symlink_reparse_buffer_parse()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolibsmb: Use reparse_data_buffer_parse() to get symlink error resp
Volker Lendecke [Fri, 7 Jul 2023 09:55:50 +0000 (11:55 +0200)] 
libsmb: Use reparse_data_buffer_parse() to get symlink error resp

Gets a nicer error message

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolibsmb: Use reparse_data_buffer_parse() in cli_readlink()
Volker Lendecke [Fri, 7 Jul 2023 09:40:19 +0000 (11:40 +0200)] 
libsmb: Use reparse_data_buffer_parse() in cli_readlink()

Gives the chance of better debug higher up (not used yet)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolibcli: Add general reparse point data parsing
Volker Lendecke [Thu, 6 Jul 2023 09:51:07 +0000 (11:51 +0200)] 
libcli: Add general reparse point data parsing

When we retrieve reparse point data, we don't know before what we
get. Right now all we do is expect a symlink, but we could get other
types as well.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolibcli: Make symlink_reparse_buffer_parse() more flexible
Volker Lendecke [Thu, 6 Jul 2023 14:19:06 +0000 (16:19 +0200)] 
libcli: Make symlink_reparse_buffer_parse() more flexible

Allow the destination struct to be preallocated

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Don't crash in cli_fsctl_send()
Volker Lendecke [Wed, 5 Jul 2023 12:07:11 +0000 (14:07 +0200)] 
smbd: Don't crash in cli_fsctl_send()

If you run "allinfo" on a symlink with NT1, cli_readlink_send sends a
NULL "in" blob. Do the same as smb2cli_ioctl_send() does, just send
NULL/0 in that case and don't crash.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3:smbd: fix multichannel connection passing race
Stefan Metzmacher [Thu, 3 Aug 2023 13:45:45 +0000 (15:45 +0200)] 
s3:smbd: fix multichannel connection passing race

If a client opens multiple connection with the same
client guid in parallel, our connection passing is likely
to hit a race.

Assume we have 3 processes:

smbdA: This process already handles all connections for
       a given client guid
smbdB: This just received a new connection with an
       SMB2 neprot for the same client guid
smbdC: This also received a new connection with an
       SMB2 neprot for the same client guid

Now both smbdB and smbdC send a MSG_SMBXSRV_CONNECTION_PASS
message to smbdA. These messages contain the socket fd
for each connection.

While waiting for a MSG_SMBXSRV_CONNECTION_PASSED message
from smbdA, both smbdB and smbdC watch the smbXcli_client.tdb
record for changes (that also verifies smbdA stays alive).

Once one of them say smbdB received the MSG_SMBXSRV_CONNECTION_PASSED
message, the dbwrap_watch logic will wakeup smbdC in order to
let it recheck the smbXcli_client.tdb record in order to
handle the case where smbdA died or deleted its record.

Now smbdC rechecks the smbXcli_client.tdb record, but it
was not woken because of a problem with smbdA. It meant
that smbdC sends a MSG_SMBXSRV_CONNECTION_PASS message
including the socket fd again.

As a result smbdA got the socket fd from smbdC twice (or even more),
and creates two (or more) smbXsrv_connection structures for the
same low level tcp connection. And it also sends more than one
SMB2 negprot response. Depending on the tevent logic, it will
use different smbXsrv_connection structures to process incoming
requests. And this will almost immediately result in errors.

The typicall error is:
 smb2_validate_sequence_number: smb2_validate_sequence_number: bad message_id 2 (sequence id 2) (granted = 1, low = 1, range = 1)

But other errors would also be possible.

The detail that leads to the long delays on the client side is
that our smbd_server_connection_terminate_ex() code will close
only the fd of a single smbXsrv_connection, but the refcount
on the socket fd in the kernel is still not 0, so the tcp
connection is still alive...

Now we remember the server_id of the process that we send
the MSG_SMBXSRV_CONNECTION_PASS message to. And just keep
watching the smbXcli_client.tdb record if the server_id
don't change. As we just need more patience to wait for
the MSG_SMBXSRV_CONNECTION_PASSED message.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Aug  8 13:59:58 UTC 2023 on atb-devel-224

2 years agos3:smbd: always clear filter_subreq in smb2srv_client_mc_negprot_next()
Stefan Metzmacher [Thu, 3 Aug 2023 13:34:29 +0000 (15:34 +0200)] 
s3:smbd: always clear filter_subreq in smb2srv_client_mc_negprot_next()

Commit 5d66d5b84f87267243dcd5223210906ce589af91 introduced a
'verify_again:' target, if we ever hit that, we would leak
the existing filter_subreq.

Moving it just above a possible messaging_filtered_read_send()
will allow us to only clear it if we actually create a new
request. That will help us in the next commits.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:torture/smb2: add smb2.multichannel.bugs.bug_15346
Stefan Metzmacher [Fri, 4 Aug 2023 15:16:14 +0000 (17:16 +0200)] 
s4:torture/smb2: add smb2.multichannel.bugs.bug_15346

This demonstrates the race quite easily against
Samba and works fine against Windows Server 2022.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:torture/smb2: make it possible to pass existing_conn to smb2_connect_ext()
Stefan Metzmacher [Mon, 7 Aug 2023 10:22:43 +0000 (12:22 +0200)] 
s4:torture/smb2: make it possible to pass existing_conn to smb2_connect_ext()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:torture/smb2: let us have a common torture_smb2_con_share()
Stefan Metzmacher [Mon, 7 Aug 2023 09:03:41 +0000 (11:03 +0200)] 
s4:torture/smb2: let us have a common torture_smb2_con_share()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:torture/smb2: let torture_smb2_con_sopt() use smb2_connect()
Stefan Metzmacher [Mon, 7 Aug 2023 09:03:41 +0000 (11:03 +0200)] 
s4:torture/smb2: let torture_smb2_con_sopt() use smb2_connect()

There's no need for smb2_connect_ext().

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agodcerpc.idl: fix definitions for DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED payload
Stefan Metzmacher [Fri, 4 Aug 2023 12:03:43 +0000 (14:03 +0200)] 
dcerpc.idl: fix definitions for DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED payload

It seems commit 259129e8f4bc8cacd1850eba3f6551134835d079 was partly just
fantasy...

Windows clients just use 16 bytes for DCERPC_PKT_CO_CANCEL and
DCERPC_PKT_ORPHANED pdus.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Aug  8 08:57:46 UTC 2023 on atb-devel-224

2 years agolibrpc/rpc: let dcerpc_read_ncacn_packet_next_vector() handle fragments without any...
Stefan Metzmacher [Mon, 7 Aug 2023 14:16:27 +0000 (16:16 +0200)] 
librpc/rpc: let dcerpc_read_ncacn_packet_next_vector() handle fragments without any payload

DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED don't have any payload by
default. In order to receive them via dcerpc_read_ncacn_packet_send/recv
we need to allow fragments with frag_len == DCERPC_NCACN_PAYLOAD_OFFSET.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 years agos4:torture/ndr: add tests for DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED
Stefan Metzmacher [Fri, 4 Aug 2023 11:57:12 +0000 (13:57 +0200)] 
s4:torture/ndr: add tests for DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED

The PDUs were generated by Windows clients.

And we fail to parse them currently.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 years agolib/replace: fix strlcat/strlcpy compile for Honggfuzz
Douglas Bagnall [Fri, 28 Jul 2023 03:36:21 +0000 (15:36 +1200)] 
lib/replace: fix strlcat/strlcpy compile for Honggfuzz

Otherwise we getthis kind of thing:

../../lib/replace/replace.c:837:3: error: implicit declaration of function 'strlcpy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                strlcpy(buf, s, buflen);

../../third_party/heimdal/lib/roken/getarg.c:288:6: error: implicit declaration of function 'strlcat' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            strlcat(buf, "]", sizeof(buf));

because we found the symbol names in libc, but didn't check that the
functions are declared in <string.h>. We already include
<bsd/string.h> whenever we have it.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug  8 05:35:08 UTC 2023 on atb-devel-224

2 years agotldap: avoid infinite loop when filter contains "\)"
Douglas Bagnall [Sat, 19 Dec 2020 23:17:56 +0000 (12:17 +1300)] 
tldap: avoid infinite loop when filter contains "\)"

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agofuzz: add fuzzer for ldb_comparison_fold
Douglas Bagnall [Fri, 5 Mar 2021 23:40:17 +0000 (12:40 +1300)] 
fuzz: add fuzzer for ldb_comparison_fold

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agofuzz: add fuzzer for sess_crypt_blob
Douglas Bagnall [Fri, 18 Dec 2020 04:56:29 +0000 (17:56 +1300)] 
fuzz: add fuzzer for sess_crypt_blob

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolibcli:auth:sess_crypt_blob: ensure key has 7 bytes
Douglas Bagnall [Sat, 14 May 2022 03:05:16 +0000 (15:05 +1200)] 
libcli:auth:sess_crypt_blob: ensure key has 7 bytes

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agoutil/base64: add a note about zero length strings
Douglas Bagnall [Thu, 12 May 2022 22:59:24 +0000 (10:59 +1200)] 
util/base64: add a note about zero length strings

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolib/fuzzing:fuzz_sddl_access_check fix nul-term check
Douglas Bagnall [Sat, 5 Aug 2023 02:18:46 +0000 (14:18 +1200)] 
lib/fuzzing:fuzz_sddl_access_check fix nul-term check

We were wanting to ensure the string contains a zero byte, but
instead were checking for a non-zero byte.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolib/fuzzing: LLVMFuzzerTestOneInput() takes const uint8_t*
Douglas Bagnall [Sat, 5 Aug 2023 02:30:24 +0000 (14:30 +1200)] 
lib/fuzzing: LLVMFuzzerTestOneInput() takes const uint8_t*

We have been using `uint8_t *`, which works fine as far as
linking goes, but leads fuzz target developers to sometimes
forget why they can't just modify the passed in string instead of
copying it for modification (e.g. to NUL-terminate).

REF: https://llvm.org/docs/LibFuzzer.html#fuzz-target

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:torture: Fix code spelling
Joseph Sutton [Wed, 2 Aug 2023 02:52:13 +0000 (14:52 +1200)] 
s4:torture: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:smb_server: Fix code spelling
Joseph Sutton [Tue, 1 Aug 2023 03:52:07 +0000 (15:52 +1200)] 
s4:smb_server: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:smb_server: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:54:43 +0000 (16:54 +1200)] 
s4:smb_server: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:samba: Add missing newline to logging message
Joseph Sutton [Mon, 7 Aug 2023 04:54:26 +0000 (16:54 +1200)] 
s4:samba: Add missing newline to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:rpc_server: Fix typo
Joseph Sutton [Tue, 1 Aug 2023 21:45:41 +0000 (09:45 +1200)] 
s4:rpc_server: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:rpc_server: Remove unnecessary parentheses
Joseph Sutton [Tue, 1 Aug 2023 03:51:33 +0000 (15:51 +1200)] 
s4:rpc_server: Remove unnecessary parentheses

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:rpc_server/backupkey: Fix leaks
Joseph Sutton [Thu, 27 Jul 2023 23:53:57 +0000 (11:53 +1200)] 
s4:rpc_server/backupkey: Fix leaks

Allocate these objects on a shorter-lived memory context.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:rpc_server: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:54:15 +0000 (16:54 +1200)] 
s4:rpc_server: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:policy: Fix leak
Joseph Sutton [Sun, 30 Jul 2023 23:23:29 +0000 (11:23 +1200)] 
s4:policy: Fix leak

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:param: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:54:03 +0000 (16:54 +1200)] 
s4:param: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:ntvfs: Add missing newline to logging message
Joseph Sutton [Mon, 7 Aug 2023 04:53:51 +0000 (16:53 +1200)] 
s4:ntvfs: Add missing newline to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:librpc: Add missing newline to logging message
Joseph Sutton [Mon, 7 Aug 2023 04:53:35 +0000 (16:53 +1200)] 
s4:librpc: Add missing newline to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:libnet: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:53:23 +0000 (16:53 +1200)] 
s4:libnet: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:lib: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:53:13 +0000 (16:53 +1200)] 
s4:lib: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:ldap_server: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:52:59 +0000 (16:52 +1200)] 
s4:ldap_server: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dsdb:tests: Remove unused variables
Joseph Sutton [Wed, 2 Aug 2023 21:45:47 +0000 (09:45 +1200)] 
s4:dsdb:tests: Remove unused variables

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dsdb:tests: Use control that was (presumably) intended
Joseph Sutton [Wed, 2 Aug 2023 21:38:15 +0000 (09:38 +1200)] 
s4:dsdb:tests: Use control that was (presumably) intended

Otherwise ‘control4’ goes unused.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dsdb: Do not dereference a NULL pointer
Joseph Sutton [Mon, 7 Aug 2023 03:12:30 +0000 (15:12 +1200)] 
s4:dsdb: Do not dereference a NULL pointer

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dsdb: Check result of talloc functions
Joseph Sutton [Mon, 7 Aug 2023 03:05:24 +0000 (15:05 +1200)] 
s4:dsdb: Check result of talloc functions

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dsdb: Correct error messages
Joseph Sutton [Mon, 7 Aug 2023 03:04:58 +0000 (15:04 +1200)] 
s4:dsdb: Correct error messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dsdb: Fix leaks
Joseph Sutton [Wed, 2 Aug 2023 23:39:12 +0000 (11:39 +1200)] 
s4:dsdb: Fix leaks

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dsdb: Remove unnecessary parentheses
Joseph Sutton [Tue, 1 Aug 2023 03:51:14 +0000 (15:51 +1200)] 
s4:dsdb: Remove unnecessary parentheses

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dsdb: Improve grammar
Joseph Sutton [Tue, 4 Jul 2023 00:55:53 +0000 (12:55 +1200)] 
s4:dsdb: Improve grammar

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dsdb: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:52:45 +0000 (16:52 +1200)] 
s4:dsdb: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dns_server: Add missing newline to logging message
Joseph Sutton [Mon, 7 Aug 2023 04:52:33 +0000 (16:52 +1200)] 
s4:dns_server: Add missing newline to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:client: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:52:17 +0000 (16:52 +1200)] 
s4:client: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:cldap_server: Add missing newline to logging message
Joseph Sutton [Mon, 7 Aug 2023 04:51:55 +0000 (16:51 +1200)] 
s4:cldap_server: Add missing newline to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:auth: Correct condition and remove redundant check
Joseph Sutton [Mon, 7 Aug 2023 00:41:45 +0000 (12:41 +1200)] 
s4:auth: Correct condition and remove redundant check

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:auth: Check return value of talloc_reference()
Joseph Sutton [Wed, 2 Aug 2023 22:49:51 +0000 (10:49 +1200)] 
s4:auth: Check return value of talloc_reference()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:auth: Fix leaks
Joseph Sutton [Wed, 2 Aug 2023 22:47:42 +0000 (10:47 +1200)] 
s4:auth: Fix leaks

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:winbindd: Fix debug messages
Joseph Sutton [Tue, 1 Aug 2023 21:45:19 +0000 (09:45 +1200)] 
s3:winbindd: Fix debug messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:winbindd: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:51:21 +0000 (16:51 +1200)] 
s3:winbindd: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:vfs: Add missing space in debug message
Joseph Sutton [Tue, 1 Aug 2023 03:50:11 +0000 (15:50 +1200)] 
s3:vfs: Add missing space in debug message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:utils: Fix code spelling
Joseph Sutton [Wed, 2 Aug 2023 02:54:17 +0000 (14:54 +1200)] 
s3:utils: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:utils: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:51:02 +0000 (16:51 +1200)] 
s3:utils: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:smbd: Add missing space to warning message
Joseph Sutton [Tue, 1 Aug 2023 21:44:51 +0000 (09:44 +1200)] 
s3:smbd: Add missing space to warning message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:smbd: Fix code spelling
Joseph Sutton [Tue, 1 Aug 2023 21:44:40 +0000 (09:44 +1200)] 
s3:smbd: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:smbd Remove unnecessary newlines from logging messages
Joseph Sutton [Tue, 8 Aug 2023 00:15:18 +0000 (12:15 +1200)] 
s3:smbd Remove unnecessary newlines from logging messages

time_to_asc() adds a trailing newline of its own.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:smbd: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:50:39 +0000 (16:50 +1200)] 
s3:smbd: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:rpc_server: Fix typo
Joseph Sutton [Tue, 1 Aug 2023 21:44:18 +0000 (09:44 +1200)] 
s3:rpc_server: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:rpc_server: Add missing space to debug message
Joseph Sutton [Tue, 1 Aug 2023 21:21:45 +0000 (09:21 +1200)] 
s3:rpc_server: Add missing space to debug message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:rpc_server: Fix incomplete logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:50:04 +0000 (16:50 +1200)] 
s3:rpc_server: Fix incomplete logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:rpc_server: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:48:06 +0000 (16:48 +1200)] 
s3:rpc_server: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:rpc_client: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:47:47 +0000 (16:47 +1200)] 
s3:rpc_client: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:registry: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:47:30 +0000 (16:47 +1200)] 
s3:registry: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:printing: Fix code spelling
Joseph Sutton [Tue, 8 Aug 2023 00:20:31 +0000 (12:20 +1200)] 
s3:printing: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:printing: Add missing spaces to error messages
Joseph Sutton [Tue, 1 Aug 2023 03:50:43 +0000 (15:50 +1200)] 
s3:printing: Add missing spaces to error messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:printing: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:47:10 +0000 (16:47 +1200)] 
s3:printing: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:passdb: Fix typo
Joseph Sutton [Tue, 1 Aug 2023 21:44:07 +0000 (09:44 +1200)] 
s3:passdb: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:passdb: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:46:42 +0000 (16:46 +1200)] 
s3:passdb: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:nmbd: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:46:18 +0000 (16:46 +1200)] 
s3:nmbd: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:modules: Fix error message
Joseph Sutton [Mon, 7 Aug 2023 04:45:42 +0000 (16:45 +1200)] 
s3:modules: Fix error message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:modules: Correct escape sequence
Joseph Sutton [Mon, 7 Aug 2023 04:44:54 +0000 (16:44 +1200)] 
s3:modules: Correct escape sequence

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:modules: Remove redundant newlines in logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:43:37 +0000 (16:43 +1200)] 
s3:modules: Remove redundant newlines in logging messages

ctime() and time_to_asc() each add a trailing newline of their own.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:modules: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:37:51 +0000 (16:37 +1200)] 
s3:modules: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:libsmb: Add missing parenthesis to logging message
Joseph Sutton [Mon, 7 Aug 2023 22:19:06 +0000 (10:19 +1200)] 
s3:libsmb: Add missing parenthesis to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:libsmb: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:37:19 +0000 (16:37 +1200)] 
s3:libsmb: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:librpc: Add missing newline to logging message
Joseph Sutton [Mon, 7 Aug 2023 04:37:05 +0000 (16:37 +1200)] 
s3:librpc: Add missing newline to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:libnet: Add missing newline to logging message
Joseph Sutton [Mon, 7 Aug 2023 04:36:49 +0000 (16:36 +1200)] 
s3:libnet: Add missing newline to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:libads: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:36:27 +0000 (16:36 +1200)] 
s3:libads: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agotldap: Use portable integer constant
Joseph Sutton [Mon, 7 Aug 2023 01:20:22 +0000 (13:20 +1200)] 
tldap: Use portable integer constant

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>