]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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

2 years 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>
2 years agonetcmd: user: readpasswords: move syncpasswords command to readpasswords
Rob van der Linde [Tue, 1 Aug 2023 01:28:33 +0000 (13:28 +1200)] 
netcmd: user: readpasswords: move syncpasswords command to readpasswords

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-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): Fri Aug  4 05:27:53 UTC 2023 on atb-devel-224

2 years agonetcmd: user: readpasswords: move getpassword command to readpasswords
Rob van der Linde [Tue, 1 Aug 2023 01:25:54 +0000 (13:25 +1200)] 
netcmd: user: readpasswords: move getpassword command to readpasswords

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: readpasswords: move common.py to readpasswords
Rob van der Linde [Tue, 1 Aug 2023 01:19:51 +0000 (13:19 +1200)] 
netcmd: user: readpasswords: move common.py to readpasswords

it only contains code relating to the getpassword module

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: readpasswords: move show command to readpasswords
Rob van der Linde [Tue, 1 Aug 2023 01:09:06 +0000 (13:09 +1200)] 
netcmd: user: readpasswords: move show command to readpasswords

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: readpasswords: turn getpassword.py into readpasswords module
Rob van der Linde [Tue, 1 Aug 2023 01:05:28 +0000 (13:05 +1200)] 
netcmd: user: readpasswords: turn getpassword.py into readpasswords module

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user sensitive command
Rob van der Linde [Thu, 27 Jul 2023 05:30:14 +0000 (17:30 +1200)] 
netcmd: user: move user sensitive command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user add_unix_attrs command
Rob van der Linde [Thu, 27 Jul 2023 05:28:10 +0000 (17:28 +1200)] 
netcmd: user: move user add_unix_attrs command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user unlock command
Rob van der Linde [Thu, 27 Jul 2023 05:26:06 +0000 (17:26 +1200)] 
netcmd: user: move user unlock command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user rename command
Rob van der Linde [Thu, 27 Jul 2023 05:22:55 +0000 (17:22 +1200)] 
netcmd: user: move user rename command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user move command
Rob van der Linde [Thu, 27 Jul 2023 05:19:34 +0000 (17:19 +1200)] 
netcmd: user: move user move command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user show command
Rob van der Linde [Thu, 27 Jul 2023 05:18:04 +0000 (17:18 +1200)] 
netcmd: user: move user show command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user edit command
Rob van der Linde [Thu, 27 Jul 2023 05:09:23 +0000 (17:09 +1200)] 
netcmd: user: move user edit command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user getpassword and syncpasswords commands
Rob van der Linde [Thu, 27 Jul 2023 05:03:57 +0000 (17:03 +1200)] 
netcmd: user: move user getpassword and syncpasswords commands

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user setpassword command
Rob van der Linde [Thu, 27 Jul 2023 04:39:04 +0000 (16:39 +1200)] 
netcmd: user: move user setpassword command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user setprimarygroup command
Rob van der Linde [Thu, 27 Jul 2023 04:35:38 +0000 (16:35 +1200)] 
netcmd: user: move user setprimarygroup command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user getgroups command
Rob van der Linde [Thu, 27 Jul 2023 04:33:17 +0000 (16:33 +1200)] 
netcmd: user: move user getgroups command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user password command
Rob van der Linde [Thu, 27 Jul 2023 04:31:01 +0000 (16:31 +1200)] 
netcmd: user: move user password command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move common code used by various password commands
Rob van der Linde [Thu, 27 Jul 2023 04:17:55 +0000 (16:17 +1200)] 
netcmd: user: move common code used by various password commands

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user setexpiry command
Rob van der Linde [Thu, 27 Jul 2023 01:25:34 +0000 (13:25 +1200)] 
netcmd: user: move user setexpiry command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user list command
Rob van der Linde [Thu, 27 Jul 2023 01:08:57 +0000 (13:08 +1200)] 
netcmd: user: move user list command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user disable command
Rob van der Linde [Thu, 27 Jul 2023 01:04:54 +0000 (13:04 +1200)] 
netcmd: user: move user disable command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user enable command
Rob van der Linde [Thu, 27 Jul 2023 00:56:25 +0000 (12:56 +1200)] 
netcmd: user: move user enable command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user delete command
Rob van der Linde [Thu, 27 Jul 2023 00:51:40 +0000 (12:51 +1200)] 
netcmd: user: move user delete command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: move user add command
Rob van der Linde [Thu, 27 Jul 2023 00:41:34 +0000 (12:41 +1200)] 
netcmd: user: move user add command

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: user: turn user.py into module netcmd.user
Rob van der Linde [Thu, 27 Jul 2023 00:14:26 +0000 (12:14 +1200)] 
netcmd: user: turn user.py into module netcmd.user

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Fix code spelling
Andreas Schneider [Wed, 2 Aug 2023 08:47:30 +0000 (10:47 +0200)] 
s4:kdc: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Aug  3 15:25:01 UTC 2023 on atb-devel-224

2 years agos4:dsdb:tests: Fix code spelling
Andreas Schneider [Wed, 2 Aug 2023 08:44:32 +0000 (10:44 +0200)] 
s4:dsdb:tests: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:dsdb:schema: Fix code spelling
Andreas Schneider [Wed, 2 Aug 2023 08:44:02 +0000 (10:44 +0200)] 
s4:dsdb:schema: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:dsdb:schema: Fix trailing white spaces
Andreas Schneider [Wed, 2 Aug 2023 08:44:50 +0000 (10:44 +0200)] 
s4:dsdb:schema: Fix trailing white spaces

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:dsdb:samdb: Fix code spelling
Andreas Schneider [Wed, 2 Aug 2023 08:41:31 +0000 (10:41 +0200)] 
s4:dsdb:samdb: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:dsdb:repl: Fix code spelling
Andreas Schneider [Wed, 2 Aug 2023 08:40:56 +0000 (10:40 +0200)] 
s4:dsdb:repl: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:dsdb:kcc: Fix code spelling
Andreas Schneider [Wed, 2 Aug 2023 08:40:35 +0000 (10:40 +0200)] 
s4:dsdb:kcc: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:dsdb:common: Fix code spelling
Andreas Schneider [Wed, 2 Aug 2023 08:39:57 +0000 (10:39 +0200)] 
s4:dsdb:common: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:dns_server: Fix code spelling
Andreas Schneider [Wed, 2 Aug 2023 08:37:18 +0000 (10:37 +0200)] 
s4:dns_server: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:client: Fix code spelling
Andreas Schneider [Thu, 20 Jul 2023 09:36:01 +0000 (11:36 +0200)] 
s4:client: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:cldap_server: Fix code spelling
Andreas Schneider [Thu, 20 Jul 2023 09:35:39 +0000 (11:35 +0200)] 
s4:cldap_server: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:auth: Fix code spelling
Andreas Schneider [Thu, 20 Jul 2023 09:34:28 +0000 (11:34 +0200)] 
s4:auth: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos3:spoolss: Remove dead code
Andreas Schneider [Wed, 2 Aug 2023 08:35:27 +0000 (10:35 +0200)] 
s3:spoolss: Remove dead code

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos3:utils: Fix code spelling
Andreas Schneider [Thu, 20 Jul 2023 09:33:37 +0000 (11:33 +0200)] 
s3:utils: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:tevent: Fix code spelling
Andreas Schneider [Wed, 2 Aug 2023 08:33:35 +0000 (10:33 +0200)] 
lib:tevent: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:fuzzing: Fix code spelling
Andreas Schneider [Thu, 20 Jul 2023 09:31:43 +0000 (11:31 +0200)] 
lib:fuzzing: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agothird_party/heimdal: Import lorikeet-heimdal-202308030152 (commit 2a036a6fd8083379931...
Joseph Sutton [Thu, 3 Aug 2023 01:57:20 +0000 (13:57 +1200)] 
third_party/heimdal: Import lorikeet-heimdal-202308030152 (commit 2a036a6fd80833799316b8a85623cdea3a1135df)

This import fixes the build on 32-bit FreeBSD.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Joseph Sutton <jsutton@samba.org>
Autobuild-Date(master): Thu Aug  3 05:40:28 UTC 2023 on atb-devel-224

2 years agodsdb: Make a shallow copy of ldb_parse_tree in operational module
Andrew Bartlett [Wed, 2 Aug 2023 02:13:00 +0000 (14:13 +1200)] 
dsdb: Make a shallow copy of ldb_parse_tree in operational module

We should not be making modifications to caller memory.  In
particular, this causes problems for logging of requests if the
original request becomes modified.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug  2 12:10:20 UTC 2023 on atb-devel-224

2 years agodsdb: Replace talloc_steal() with a shallow copy and reference in dsdb_paged_results
Andrew Bartlett [Wed, 2 Aug 2023 02:12:07 +0000 (14:12 +1200)] 
dsdb: Replace talloc_steal() with a shallow copy and reference in dsdb_paged_results

We should not be stealing caller memory like this, and while a
talloc_reference() is not much better, this combined with a
shallow copy should be a little better in terms of polite
memory management.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agopaged_results: add no memory checks in paged_search()
Stefan Metzmacher [Mon, 7 Feb 2022 23:41:54 +0000 (00:41 +0100)] 
paged_results: add no memory checks in paged_search()

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

Signed-off-by: Arvid Requate <requate@univention.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
[abartlet@samba.org combination of two patches by the above authors]

2 years agoselftest: Add test for combination of anr and paged_results
Andrew Bartlett [Wed, 2 Aug 2023 01:40:03 +0000 (13:40 +1200)] 
selftest: Add test for combination of anr and paged_results

This combination was known to cause a segfault in Samba 4.13, fixed by
5f0590362c5c0c5ee20503a67467f9be2d50e73b in later versions.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agovfs_aio_pthread: fix segfault if samba-tool ntacl get
Jones Syue [Wed, 2 Aug 2023 01:48:40 +0000 (09:48 +0800)] 
vfs_aio_pthread: fix segfault if samba-tool ntacl get

If configured as AD DC and aio_pthread appended into 'vfs objects'[1],
run these commands would get segfault:
1. sudo samba-tool ntacl get .
2. sudo net vfs getntacl sysvol .
gdb said it goes through aio_pthread_openat_fn() @ vfs_aio_pthread.c[2],
and the fsp->conn->sconn->client is null (0x0).

'sconn->client' memory is allocated when a new connection is accpeted:
smbd_accept_connection > smbd_process > smbXsrv_client_create
While running local commands looks like it would not go through
smbXsrv_client_create so the 'client' is null, segfault might happen.
We should not dereference 'client->server_multi_channel_enabled',
if 'client' is null.

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

[1] smb.conf example, samba-4.18.5, ubuntu 22.04.2
[global]
        dns forwarder = 127.0.0.53
        netbios name = U22-JONES-88X1
        realm = U22-JONES-88X1.X88X1.JONES
        server role = active directory domain controller
        workgroup = X88X1
        idmap_ldb:use rfc2307 = yes
        vfs objects = dfs_samba4 acl_xattr aio_pthread

[sysvol]
        path = /var/lib/samba/sysvol
        read only = No

[netlogon]
        path = /var/lib/samba/sysvol/u22-jones-88x1.x88x1.jones/scripts
        read only = No

[2] gdb
(gdb) run /usr/local/samba/bin/samba-tool ntacl get .
Starting program: /usr/local/Python3/bin/python3 /usr/local/samba/bin/samba-tool ntacl get .
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007fffd0eb809e in aio_pthread_openat_fn (handle=0x8d5cc0, dirfsp=0x8c3070, smb_fname=0x18ab4f0, fsp=0x1af3550, flags=196608, mode=0)
    at ../../source3/modules/vfs_aio_pthread.c:467
warning: Source file is more recent than executable.
467             if (fsp->conn->sconn->client->server_multi_channel_enabled) {
(gdb) bt
    at ../../source3/modules/vfs_aio_pthread.c:467
    at ../../source3/smbd/pysmbd.c:320
---Type <return> to continue, or q <return> to quit---
(gdb) f
    at ../../source3/modules/vfs_aio_pthread.c:467
467             if (fsp->conn->sconn->client->server_multi_channel_enabled) {
(gdb) p fsp->conn->sconn->client
$1 = (struct smbXsrv_client *) 0x0
(gdb)

Signed-off-by: Jones Syue <jonessyue@qnap.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agodsdb: Add tracing to dsdb_search_dn() similar to gendb_search_v()
Andrew Bartlett [Mon, 31 Jul 2023 04:07:46 +0000 (16:07 +1200)] 
dsdb: Add tracing to dsdb_search_dn() similar to gendb_search_v()

The aim of this tracing is to make it simple to follow the
requests made from the RPC server and similar to LDB now that
gendb_search_v() is no longer the dominant interface.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jul 31 11:49:19 UTC 2023 on atb-devel-224

2 years agodsdb: Add tracing to dsdb_search() similar to gendb_search_v()
Andrew Bartlett [Mon, 31 Jul 2023 04:03:53 +0000 (16:03 +1200)] 
dsdb: Add tracing to dsdb_search() similar to gendb_search_v()

The aim of this tracing is to make it simple to follow the
requests made from the RPC server and similar to LDB now that
gendb_search_v() is no longer the dominant interface.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agodsdb: Add dsdb_search_scope_as_string() and use in ldap_backend.c
Andrew Bartlett [Mon, 31 Jul 2023 04:02:25 +0000 (16:02 +1200)] 
dsdb: Add dsdb_search_scope_as_string() and use in ldap_backend.c

This will be useful when adding debugging to other routines.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agolib/util: Move DEBUG() calls in gendb_search_v to common levels and new DBG_*() pattern
Andrew Bartlett [Mon, 31 Jul 2023 02:02:12 +0000 (14:02 +1200)] 
lib/util: Move DEBUG() calls in gendb_search_v to common levels and new DBG_*() pattern

This moves success logs 6 -> 10, failure logs 4 -> 5.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agolib:krb5_wrap: Fix resource leak in smb_krb5_kt_seek_and_delete_old_entries
Pavel Filipenský [Wed, 26 Jul 2023 20:37:51 +0000 (22:37 +0200)] 
lib:krb5_wrap: Fix resource leak in smb_krb5_kt_seek_and_delete_old_entries

Reported by Red Hat internal covscan
leaked_storage: Variable "cursor" going out of scope leaks the storage it points to.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoauth:credentials: Fix resource leak in cli_credentials_set_from_ccache()
Pavel Filipenský [Wed, 26 Jul 2023 14:28:36 +0000 (16:28 +0200)] 
auth:credentials: Fix resource leak in cli_credentials_set_from_ccache()

Reported by Red Hat internal covscan
leaked_storage: Variable "princ" going out of scope leaks the storage it points to.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoauth:kerberos: Fix resource leak in smb_krb5_update_keytab()
Pavel Filipenský [Wed, 26 Jul 2023 14:25:26 +0000 (16:25 +0200)] 
auth:kerberos: Fix resource leak in smb_krb5_update_keytab()

Reported by Red Hat internal covscan
leaked_storage: Variable "keytab" going out of scope leaks the storage it points to.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoauth:kerberos: Fix resource leak in smb_krb5_get_keytab_container()
Pavel Filipenský [Wed, 26 Jul 2023 14:28:36 +0000 (16:28 +0200)] 
auth:kerberos: Fix resource leak in smb_krb5_get_keytab_container()

Reported by Red Hat internal covscan
leaked_storage: Variable "keytab" going out of scope leaks the storage it points to.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoauth:kerberos: Fix resource leak in parse_principal()
Pavel Filipenský [Wed, 26 Jul 2023 14:28:36 +0000 (16:28 +0200)] 
auth:kerberos: Fix resource leak in parse_principal()

Reported by Red Hat internal covscan
leaked_storage: Variable "princ" going out of scope leaks the storage it points to.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:auth: Fix trailing whitespaces in kerberos_util.c
Pavel Filipenský [Wed, 26 Jul 2023 14:07:12 +0000 (16:07 +0200)] 
s4:auth: Fix trailing whitespaces in kerberos_util.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agogp: Cleanup some unused code
David Mulder [Tue, 10 Jan 2023 17:07:33 +0000 (10:07 -0700)] 
gp: Cleanup some unused code

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-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): Mon Jul 31 10:55:26 UTC 2023 on atb-devel-224

2 years agogp: Ensure centrify crontab user policy performs proper cleanup
David Mulder [Tue, 25 Jul 2023 19:23:10 +0000 (13:23 -0600)] 
gp: Ensure centrify crontab user policy performs proper cleanup

This resolves cleanup issues for user and group
centrify compatible policies. It also ensures the
crontab policies use functions from the scripts
policy, to avoid code duplication and simplify
cleanup.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Ensure script user policy performs proper cleanup
David Mulder [Tue, 10 Jan 2023 20:21:49 +0000 (13:21 -0700)] 
gp: Ensure script user policy performs proper cleanup

This resolves cleanup issues for scripts user
policy.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Ensure smb.conf policy preforms proper cleanup
David Mulder [Tue, 10 Jan 2023 16:57:21 +0000 (09:57 -0700)] 
gp: Ensure smb.conf policy preforms proper cleanup

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Ensure MOTD policy preforms proper cleanup
David Mulder [Tue, 10 Jan 2023 00:19:44 +0000 (17:19 -0700)] 
gp: Ensure MOTD policy preforms proper cleanup

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Ensure Issue policy preforms proper cleanup
David Mulder [Tue, 10 Jan 2023 00:12:53 +0000 (17:12 -0700)] 
gp: Ensure Issue policy preforms proper cleanup

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Ensure Messages policy preforms proper cleanup
David Mulder [Mon, 9 Jan 2023 23:33:59 +0000 (16:33 -0700)] 
gp: Ensure Messages policy preforms proper cleanup

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Ensure Firefox policy preforms proper cleanup
David Mulder [Mon, 9 Jan 2023 22:20:57 +0000 (15:20 -0700)] 
gp: Ensure Firefox policy preforms proper cleanup

Now uses gp_misc_applier to ensure old settings
are properly cleaned up.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Add a misc applier, to assist some gp exts
David Mulder [Mon, 9 Jan 2023 22:19:48 +0000 (15:19 -0700)] 
gp: Add a misc applier, to assist some gp exts

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Ensure Firewalld preforms proper cleanup
David Mulder [Fri, 6 Jan 2023 21:48:12 +0000 (14:48 -0700)] 
gp: Ensure Firewalld preforms proper cleanup

Now uses gp_applier to ensure old settings are
properly cleaned up.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Test modifying centrify crontab user policy enforces changes
David Mulder [Tue, 25 Jul 2023 19:48:25 +0000 (13:48 -0600)] 
gp: Test modifying centrify crontab user policy enforces changes

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Test modifying script user policy enforces changes
David Mulder [Tue, 25 Jul 2023 19:41:06 +0000 (13:41 -0600)] 
gp: Test modifying script user policy enforces changes

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Test modifying smb.conf policy enforces changes
David Mulder [Fri, 10 Feb 2023 21:12:03 +0000 (14:12 -0700)] 
gp: Test modifying smb.conf policy enforces changes

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Test modifying Issue policy enforces changes
David Mulder [Fri, 10 Feb 2023 20:55:13 +0000 (13:55 -0700)] 
gp: Test modifying Issue policy enforces changes

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agogp: Test modifying Messages policy enforces changes
David Mulder [Tue, 25 Jul 2023 18:52:11 +0000 (12:52 -0600)] 
gp: Test modifying Messages policy enforces changes

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>