samba.git
10 months 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>
10 months 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>
10 months agos3:lib: Use portable format specifiers
Joseph Sutton [Tue, 1 Aug 2023 03:49:36 +0000 (15:49 +1200)]
s3:lib: Use portable format specifiers

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

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos3:client: Remove unnecessary newline from logging message
Joseph Sutton [Tue, 8 Aug 2023 00:15:00 +0000 (12:15 +1200)]
s3:client: Remove unnecessary newline from logging message

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>
10 months agos3:lib: Consistently return a string with a trailing newline
Joseph Sutton [Tue, 8 Aug 2023 03:38:26 +0000 (15:38 +1200)]
s3:lib: Consistently return a string with a trailing newline

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

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibrpc: Fix typo
Joseph Sutton [Tue, 1 Aug 2023 21:43:48 +0000 (09:43 +1200)]
librpc: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibrpc:ndr: Fix leaks
Joseph Sutton [Mon, 7 Aug 2023 01:46:50 +0000 (13:46 +1200)]
librpc:ndr: Fix leaks

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibcli/security: Remove unnecessary cast
Joseph Sutton [Tue, 1 Aug 2023 03:48:21 +0000 (15:48 +1200)]
libcli/security: Remove unnecessary cast

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibcli/security: Use portable format specifiers
Joseph Sutton [Tue, 1 Aug 2023 03:47:50 +0000 (15:47 +1200)]
libcli/security: Use portable format specifiers

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibcli/security: Fix integer overflow
Joseph Sutton [Wed, 2 Aug 2023 02:27:31 +0000 (14:27 +1200)]
libcli/security: Fix integer overflow

On a typical machine where the size of ‘int’ is 32 bits or smaller, a
sub-authority of 2147483649 would be ordered before a sub-authority of
1, even though it is greater.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibcli/security: Remove unused function sid_compare_domain()
Joseph Sutton [Wed, 2 Aug 2023 02:27:01 +0000 (14:27 +1200)]
libcli/security: Remove unused function sid_compare_domain()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos3:modules: Call dom_sid_compare_domain() instead of sid_compare_domain()
Joseph Sutton [Wed, 2 Aug 2023 02:26:41 +0000 (14:26 +1200)]
s3:modules: Call dom_sid_compare_domain() instead of sid_compare_domain()

The two functions are identical in behaviour.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibcli/security: Call dom_sid_compare_domain() instead of sid_compare_domain()
Joseph Sutton [Wed, 2 Aug 2023 02:26:03 +0000 (14:26 +1200)]
libcli/security: Call dom_sid_compare_domain() instead of sid_compare_domain()

The two functions are identical in behaviour.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibcli/auth: Add missing newline to logging message
Joseph Sutton [Mon, 7 Aug 2023 04:34:07 +0000 (16:34 +1200)]
libcli/auth: Add missing newline to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolib/util: Fix code spelling
Joseph Sutton [Tue, 1 Aug 2023 03:47:18 +0000 (15:47 +1200)]
lib/util: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolib:socket: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:33:45 +0000 (16:33 +1200)]
lib:socket: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolib:mscat: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:33:05 +0000 (16:33 +1200)]
lib:mscat: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agotalloc: Fix typo
Joseph Sutton [Wed, 12 Jul 2023 23:42:16 +0000 (11:42 +1200)]
talloc: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoctdb: Add missing newline to logging message
Joseph Sutton [Mon, 7 Aug 2023 04:32:34 +0000 (16:32 +1200)]
ctdb: Add missing newline to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoauth: Add missing newlines to logging messages
Joseph Sutton [Mon, 7 Aug 2023 04:31:51 +0000 (16:31 +1200)]
auth: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agonsswitch:libwbclient: Fix memory leak
Joseph Sutton [Wed, 19 Jul 2023 00:55:15 +0000 (12:55 +1200)]
nsswitch:libwbclient: Fix memory leak

Found by Balazs Scheidler <bazsi@balabit.hu>.

Reported by Ferenc Wágner <wferi@niif.hu> at
https://lists.samba.org/archive/samba-technical/2023-June/138271.html

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolib:charset: Update NUM_CHARSETS to reflect true value
Joseph Sutton [Tue, 11 Jul 2023 01:50:53 +0000 (13:50 +1200)]
lib:charset: Update NUM_CHARSETS to reflect true value

CH_DISPLAY was removed in commit
125a2ff262aa312df20eec68802fd5f8a47f492f, but NUM_CHARSETS was not
updated to match.

By assigning to NUM_CHARSETS the last enumeration value in charset_t, we
guard against its falling out of sync again.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agondr_string: Move string length calculation fallback into default case
Joseph Sutton [Tue, 1 Aug 2023 22:04:23 +0000 (10:04 +1200)]
ndr_string: Move string length calculation fallback into default case

We are about to add a new enumeration constant (NUM_CHARSETS) to
charset_t. To do that we must have a default case in this switch
statement, or the compiler will refuse to compile it, stating that we
haven’t handled all the cases.

The alternative, adding a case for NUM_CHARSETS, would just look silly.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agosmbXcli: Remove call to utf16_len_n()
Joseph Sutton [Mon, 10 Jul 2023 01:27:56 +0000 (13:27 +1200)]
smbXcli: Remove call to utf16_len_n()

This code was probably intended to refer to ‘blob1’ rather than to
‘blob2’. As it is, it fails to achieve anything.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoldb: Work around inconsistent behaviour in PyObject_AsMessageElement()
Joseph Sutton [Thu, 6 Jul 2023 23:28:01 +0000 (11:28 +1200)]
ldb: Work around inconsistent behaviour in PyObject_AsMessageElement()

PyObject_AsMessageElement() has ‘flags’ and ‘attr_name’ parameters to
set properties of the returned MessageElement, but they apply only
*sometimes*.

‘attr_name’ not being set can result in cryptic and misleading error
messages from various ldb operations.

Changing the function’s behaviour to be more consistent could break
existing code, so we work around the issue instead.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoldb: Clarify documentation for PyObject_AsMessageElement()
Joseph Sutton [Thu, 6 Jul 2023 23:18:49 +0000 (11:18 +1200)]
ldb: Clarify documentation for PyObject_AsMessageElement()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoldb: Don’t leak ‘el’
Joseph Sutton [Thu, 6 Jul 2023 22:43:15 +0000 (10:43 +1200)]
ldb: Don’t leak ‘el’

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoldb: Check talloc_zero_array() return value
Joseph Sutton [Thu, 6 Jul 2023 22:42:38 +0000 (10:42 +1200)]
ldb: Check talloc_zero_array() return value

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoldb: Don’t leak ‘msg’
Joseph Sutton [Thu, 6 Jul 2023 22:42:01 +0000 (10:42 +1200)]
ldb: Don’t leak ‘msg’

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoldb: Check talloc_strdup() return value
Joseph Sutton [Mon, 31 Jul 2023 21:48:35 +0000 (09:48 +1200)]
ldb: Check talloc_strdup() return value

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoldb: Don’t decrement reference count until object is no longer needed
Joseph Sutton [Mon, 31 Jul 2023 21:56:49 +0000 (09:56 +1200)]
ldb: Don’t decrement reference count until object is no longer needed

If ‘tmp’ happens to be garbage-collected, ‘name’ will become invalid.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoldb: Fix leaks
Joseph Sutton [Mon, 31 Jul 2023 21:51:15 +0000 (09:51 +1200)]
ldb: Fix leaks

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoldb: Account for ‘name’ possibly being NULL
Joseph Sutton [Mon, 31 Jul 2023 21:34:34 +0000 (09:34 +1200)]
ldb: Account for ‘name’ possibly being NULL

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoldb: Don’t pass NULL pointer into strcasecmp()
Joseph Sutton [Thu, 6 Jul 2023 22:37:57 +0000 (10:37 +1200)]
ldb: Don’t pass NULL pointer into strcasecmp()

Doing so is undefined behaviour.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibcli/ldap: Don’t try to encode NULL name
Joseph Sutton [Thu, 6 Jul 2023 22:37:09 +0000 (10:37 +1200)]
libcli/ldap: Don’t try to encode NULL name

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibgpo:admx: Fix code spelling
Joseph Sutton [Sun, 25 Jun 2023 20:50:48 +0000 (08:50 +1200)]
libgpo:admx: Fix code spelling

(NEGOgiation → NEGOtiation)

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agotests/krb5: Correct comment
Joseph Sutton [Wed, 19 Jul 2023 00:50:16 +0000 (12:50 +1200)]
tests/krb5: Correct comment

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agopython:tests: Remove references to now-gone files
Joseph Sutton [Sun, 16 Jul 2023 22:44:36 +0000 (10:44 +1200)]
python:tests: Remove references to now-gone files

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agopyglue: Add missing whitespace in docstrings
Joseph Sutton [Thu, 27 Jul 2023 20:15:15 +0000 (08:15 +1200)]
pyglue: Add missing whitespace in docstrings

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agopyglue: Fix leak
Joseph Sutton [Thu, 27 Jul 2023 20:15:02 +0000 (08:15 +1200)]
pyglue: Fix leak

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agopython: Check return value of talloc_strndup()
Joseph Sutton [Thu, 27 Jul 2023 20:14:47 +0000 (08:14 +1200)]
python: Check return value of talloc_strndup()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agopython: Fix leak
Joseph Sutton [Thu, 27 Jul 2023 20:14:27 +0000 (08:14 +1200)]
python: Fix leak

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agopython:samba:kcc: Fix log message formatting
Joseph Sutton [Thu, 6 Jul 2023 03:56:38 +0000 (15:56 +1200)]
python:samba:kcc: Fix log message formatting

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agopython: Use correct function signatures
Joseph Sutton [Mon, 31 Jul 2023 21:26:27 +0000 (09:26 +1200)]
python: Use correct function signatures

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agosamba-tool/ntacl: Remove unused imports
Joseph Sutton [Thu, 22 Jun 2023 05:02:47 +0000 (17:02 +1200)]
samba-tool/ntacl: Remove unused imports

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agosamba-tool/ntacl: Remove unused variable
Joseph Sutton [Thu, 22 Jun 2023 05:02:19 +0000 (17:02 +1200)]
samba-tool/ntacl: Remove unused variable

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agosamba-tool/ntacl: Remove unused and unnecessary return
Joseph Sutton [Thu, 22 Jun 2023 04:59:36 +0000 (16:59 +1200)]
samba-tool/ntacl: Remove unused and unnecessary return

setntacl() just returns None.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agotestprogs: Fix code spelling
Joseph Sutton [Thu, 22 Jun 2023 04:04:03 +0000 (16:04 +1200)]
testprogs: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoselftest: Add missing import
Joseph Sutton [Wed, 12 Jul 2023 23:36:17 +0000 (11:36 +1200)]
selftest: Add missing import

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoselftest: Fix code spelling
Joseph Sutton [Wed, 5 Jul 2023 00:06:33 +0000 (12:06 +1200)]
selftest: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:rpc_server/backupkey: Fix code spelling
Joseph Sutton [Thu, 20 Jul 2023 03:10:36 +0000 (15:10 +1200)]
s4:rpc_server/backupkey: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:rpc_server: Add missing newlines to debugging messages
Joseph Sutton [Mon, 31 Jul 2023 04:39:38 +0000 (16:39 +1200)]
s4:rpc_server: Add missing newlines to debugging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:librpc: Fix code spelling
Joseph Sutton [Thu, 20 Jul 2023 23:30:59 +0000 (11:30 +1200)]
s4:librpc: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:libcli/smb_composite: Fix code spelling
Joseph Sutton [Fri, 21 Jul 2023 00:43:07 +0000 (12:43 +1200)]
s4:libcli/smb_composite: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:libcli/ldap: Fix code spelling
Joseph Sutton [Fri, 21 Jul 2023 00:42:43 +0000 (12:42 +1200)]
s4:libcli/ldap: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:kdc: Avoid operator precedence issues
Joseph Sutton [Fri, 21 Jul 2023 00:55:24 +0000 (12:55 +1200)]
s4:kdc: Avoid operator precedence issues

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:kdc: Fix comment
Joseph Sutton [Fri, 21 Jul 2023 00:38:09 +0000 (12:38 +1200)]
s4:kdc: Fix comment

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:kdc: Inline some variables
Joseph Sutton [Thu, 20 Jul 2023 23:49:18 +0000 (11:49 +1200)]
s4:kdc: Inline some variables

IMO, this code is easier to read if the reader can tell at a glance what
the values of these enumerations are, rather than having to think about
where the values come from.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:kdc: Use newer debugging macros
Joseph Sutton [Thu, 20 Jul 2023 23:44:05 +0000 (11:44 +1200)]
s4:kdc: Use newer debugging macros

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:kdc: Use portable format specifiers
Joseph Sutton [Mon, 31 Jul 2023 22:20:11 +0000 (10:20 +1200)]
s4:kdc: Use portable format specifiers

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:kdc: Remove casts in debug messages
Joseph Sutton [Mon, 31 Jul 2023 22:19:45 +0000 (10:19 +1200)]
s4:kdc: Remove casts in debug messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:kdc: Remove redundant comment
Joseph Sutton [Thu, 20 Jul 2023 23:03:03 +0000 (11:03 +1200)]
s4:kdc: Remove redundant comment

We don’t need two copies of the same comment.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:kdc: Remove unused variable
Joseph Sutton [Thu, 20 Jul 2023 21:37:57 +0000 (09:37 +1200)]
s4:kdc: Remove unused variable

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:kdc: Fix code spelling
Joseph Sutton [Tue, 11 Jul 2023 04:52:25 +0000 (16:52 +1200)]
s4:kdc: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:kdc: Check that client and server are not NULL (CID 1534695)
Joseph Sutton [Sun, 2 Jul 2023 21:04:01 +0000 (09:04 +1200)]
s4:kdc: Check that client and server are not NULL (CID 1534695)

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:kdc: Add missing newlines to logging messages
Joseph Sutton [Mon, 31 Jul 2023 04:37:48 +0000 (16:37 +1200)]
s4:kdc: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:dsdb: Fix code spelling
Joseph Sutton [Tue, 27 Jun 2023 21:01:34 +0000 (09:01 +1200)]
s4:dsdb: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:dsdb: Move comment to more appropriate place
Joseph Sutton [Thu, 22 Jun 2023 02:31:12 +0000 (14:31 +1200)]
s4:dsdb: Move comment to more appropriate place

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:dsdb: Add missing newlines to logging messages
Joseph Sutton [Mon, 31 Jul 2023 04:18:17 +0000 (16:18 +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>
10 months agonmbd_become_lmb.c: Fix debug message formatting
Joseph Sutton [Thu, 6 Jul 2023 03:49:00 +0000 (15:49 +1200)]
nmbd_become_lmb.c: Fix debug message formatting

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos3:utils: Fix debug message formatting
Joseph Sutton [Thu, 6 Jul 2023 03:57:08 +0000 (15:57 +1200)]
s3:utils: Fix debug message formatting

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos3:eventlog: Fix code spelling
Joseph Sutton [Wed, 5 Jul 2023 22:49:11 +0000 (10:49 +1200)]
s3:eventlog: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agopidl: Remove unneeded semicolon
Joseph Sutton [Thu, 20 Jul 2023 01:51:39 +0000 (13:51 +1200)]
pidl: Remove unneeded semicolon

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibrpc/ndr: Fix code spelling
Joseph Sutton [Wed, 19 Jul 2023 22:41:24 +0000 (10:41 +1200)]
librpc/ndr: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibrpc/py_security: Don’t pass a NULL pointer to PyUnicode_FromString()
Joseph Sutton [Thu, 20 Jul 2023 00:22:45 +0000 (12:22 +1200)]
librpc/py_security: Don’t pass a NULL pointer to PyUnicode_FromString()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibrpc/ndr: Format NDR pull sizes as ‘size_t’
Joseph Sutton [Wed, 19 Jul 2023 23:18:14 +0000 (11:18 +1200)]
librpc/ndr: Format NDR pull sizes as ‘size_t’

The arguments to these macros are occasionally of type size_t.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agondr/dns-utils: Make error message slightly more readable
Joseph Sutton [Mon, 17 Jul 2023 23:18:54 +0000 (11:18 +1200)]
ndr/dns-utils: Make error message slightly more readable

max_length will always be greater than one, so we can use the plural.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agondr_string: Remove dodgy-looking casts
Joseph Sutton [Thu, 20 Jul 2023 23:38:14 +0000 (11:38 +1200)]
ndr_string: Remove dodgy-looking casts

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agondr_string: Fix typo
Joseph Sutton [Mon, 10 Jul 2023 02:42:55 +0000 (14:42 +1200)]
ndr_string: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agondr_string: Add overflow check in ndr_pull_charset_to_null()
Joseph Sutton [Mon, 10 Jul 2023 02:42:23 +0000 (14:42 +1200)]
ndr_string: Add overflow check in ndr_pull_charset_to_null()

This matches ndr_pull_charset().

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibrpc/ndr: Remove unneeded casts
Joseph Sutton [Thu, 6 Jul 2023 02:18:33 +0000 (14:18 +1200)]
librpc/ndr: Remove unneeded casts

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibrpc/rpc: Add missing newline to logging message
Joseph Sutton [Mon, 31 Jul 2023 04:16:20 +0000 (16:16 +1200)]
librpc/rpc: Add missing newline to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibcli/security: Cast isupper() argument to ‘unsigned char’
Joseph Sutton [Thu, 20 Jul 2023 01:26:27 +0000 (13:26 +1200)]
libcli/security: Cast isupper() argument to ‘unsigned char’

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibcli/security: Remove unnecessary code
Joseph Sutton [Mon, 17 Jul 2023 03:48:50 +0000 (15:48 +1200)]
libcli/security: Remove unnecessary code

The revision has already been set at the start of this function.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibcli/auth: Fix code spelling
Joseph Sutton [Thu, 20 Jul 2023 03:09:42 +0000 (15:09 +1200)]
libcli/auth: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolibcli: Add missing newlines to logging messages
Joseph Sutton [Mon, 31 Jul 2023 04:15:40 +0000 (16:15 +1200)]
libcli: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agos4:auth: Add missing newlines to logging messages
Joseph Sutton [Mon, 31 Jul 2023 04:17:16 +0000 (16:17 +1200)]
s4:auth: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolib/ldb-samba: Add missing newline to logging message
Joseph Sutton [Mon, 31 Jul 2023 04:09:05 +0000 (16:09 +1200)]
lib/ldb-samba: Add missing newline to logging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolib/util: Add missing newlines to logging messages
Joseph Sutton [Mon, 31 Jul 2023 04:14:00 +0000 (16:14 +1200)]
lib/util: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoctdb: Add missing newlines to logging messages
Joseph Sutton [Mon, 31 Jul 2023 04:07:36 +0000 (16:07 +1200)]
ctdb: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoauth: Fix code spelling
Joseph Sutton [Fri, 7 Jul 2023 02:18:49 +0000 (14:18 +1200)]
auth: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoauth: Add missing newlines to logging messages
Joseph Sutton [Mon, 31 Jul 2023 04:06:56 +0000 (16:06 +1200)]
auth: Add missing newlines to logging messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolib/replace: Const-qualify sys_errlist
Joseph Sutton [Wed, 5 Jul 2023 22:48:38 +0000 (10:48 +1200)]
lib/replace: Const-qualify sys_errlist

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agolib:dbwrap: Remove unneeded space in debug message
Joseph Sutton [Thu, 20 Jul 2023 22:29:45 +0000 (10:29 +1200)]
lib:dbwrap: Remove unneeded space in debug message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 months agoctdb-doc: Fix documentation for ctdb event status
Martin Schwenke [Sat, 29 Jul 2023 00:07:35 +0000 (10:07 +1000)]
ctdb-doc: Fix documentation for ctdb event status

Behaviour was changed, documentation wasn't.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Aug  7 09:43:33 UTC 2023 on atb-devel-224

10 months agoctdb-tools: Fix CID 1539212 - signed/unsigned issue
Martin Schwenke [Sun, 30 Jul 2023 01:07:47 +0000 (11:07 +1000)]
ctdb-tools: Fix CID 1539212 - signed/unsigned issue

>>>     CID 1539212:  Control flow issues  (NO_EFFECT)
>>>     This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "p >= 0UL".
216      while (p >= 0 && output[p] == '\n') {

This is a real problem in the unlikely event that the output contains
only newlines.

Fix the issue by using a pointer and add a test to cover this case.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>