]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
2 years agopython: Remove const from PyList_AsStringList()
Andrew Bartlett [Fri, 21 Jul 2023 02:32:46 +0000 (14:32 +1200)] 
python: Remove const from PyList_AsStringList()

The returned strings are not owned by python, so need not be const.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agopython: Move PyList_AsStringList to common code so we can reuse
Andrew Bartlett [Fri, 21 Jul 2023 02:31:30 +0000 (14:31 +1200)] 
python: Move PyList_AsStringList to common code so we can reuse

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agolib/cmdline: Return if the commandline was redacted in samba_cmdline_burn()
Andrew Bartlett [Fri, 21 Jul 2023 03:27:00 +0000 (15:27 +1200)] 
lib/cmdline: Return if the commandline was redacted in samba_cmdline_burn()

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agoclaims.idl: Fix AD claims encoding
Joseph Sutton [Wed, 19 Jul 2023 23:14:23 +0000 (11:14 +1200)] 
claims.idl: Fix AD claims encoding

Up to now we have been absorbing the discriminant in the NDR padding,
and setting it to zero in the push. But if the discriminant is not set
correctly, Windows will refuse to regard any of the claims.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jul 21 02:19:48 UTC 2023 on atb-devel-224

2 years agolib/fault: During smb_panic() print process comment and setprocname() title
Andrew Bartlett [Thu, 20 Jul 2023 02:10:43 +0000 (14:10 +1200)] 
lib/fault: During smb_panic() print process comment and setprocname() title

The purpose of this is to make it clear which part of the AD DC (in particular)
has faulted without having to deduce it from the stacktrace.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agopython/samba: Adjust tarfile extraction filter
Noel Power [Fri, 14 Jul 2023 13:53:29 +0000 (14:53 +0100)] 
python/samba: Adjust tarfile extraction filter

The 'data_filter' is far too restrictive, this filter doesn't apply any
mode bits to directories which in turn will result in unexpected
directory permissions of the amongst others msg.[ls]ock directories.

With 'data_filter' and a 'patched' python at best we experience
CI failures with samba-ad-back1 & samba-ad-back2 CI jobs due to server
startup failures, at worst user/admins will need to adjust directory
permissions post backup.

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agoWHATSNEW: Mention new unicodePwd only over encrypted LDAP restriction
Andrew Bartlett [Thu, 20 Jul 2023 03:49:08 +0000 (15:49 +1200)] 
WHATSNEW: Mention new unicodePwd only over encrypted LDAP restriction

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agoWHATSNEW: mention KDC auditing
Andrew Bartlett [Thu, 20 Jul 2023 03:48:40 +0000 (15:48 +1200)] 
WHATSNEW: mention KDC auditing

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agoWHATSNEW: FAST support, Claims compression, SID compression
Andrew Bartlett [Thu, 20 Jul 2023 03:36:09 +0000 (15:36 +1200)] 
WHATSNEW: FAST support, Claims compression, SID compression

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agoWHATSNEW: Mention Heimdal updates
Andrew Bartlett [Thu, 20 Jul 2023 03:19:51 +0000 (15:19 +1200)] 
WHATSNEW: Mention Heimdal updates

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agoWHATSNEW: Expand detail on what of 2012, 2012R2 and 2016 support is implemented
Andrew Bartlett [Thu, 20 Jul 2023 03:01:43 +0000 (15:01 +1200)] 
WHATSNEW: Expand detail on what of 2012, 2012R2 and 2016 support is implemented

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agoWHATSNEW: PKINIT testing
Andrew Bartlett [Thu, 20 Jul 2023 03:01:07 +0000 (15:01 +1200)] 
WHATSNEW: PKINIT testing

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agoWHATSNEW: Include info on new samba-tool features
Andrew Bartlett [Thu, 20 Jul 2023 02:54:02 +0000 (14:54 +1200)] 
WHATSNEW: Include info on new samba-tool features

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agoWHATSNEW: Add text on PKINIT Certificate Revocation
Andrew Bartlett [Wed, 19 Jul 2023 03:50:43 +0000 (15:50 +1200)] 
WHATSNEW: Add text on PKINIT Certificate Revocation

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9612
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agos4:param: replace calls to deprecated Python methods
Dmitry Antipov [Thu, 30 Mar 2023 11:04:37 +0000 (14:04 +0300)] 
s4:param: replace calls to deprecated Python methods

Replace calls to (obsolete but still stable)
PyEval_CallObjectWithKeywords() with PyObject_Call()
by using trivial wrapper.

Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
[abartlet@samba.org Adjusted to always use the PyObject_Call()
 as it is available in all of Samba's supported python versions]

2 years agos3:script: Replace --merge by --merge-by-timestamp in samba-log-parser
Pavel Filipenský [Wed, 28 Jun 2023 12:59:29 +0000 (14:59 +0200)] 
s3:script: Replace --merge by --merge-by-timestamp in samba-log-parser

For --merge-by-timestamp the traces do not need to contain the traceid
header field.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Thu Jul 20 19:14:05 UTC 2023 on atb-devel-224

2 years agodocs-xml:manpages: Fix tabs in samba-log-parser.1.xml
Pavel Filipenský [Wed, 28 Jun 2023 14:51:35 +0000 (16:51 +0200)] 
docs-xml:manpages: Fix tabs in samba-log-parser.1.xml

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agos3:winbindd: Change the TALLOC_CTX to fix the tevent call depth tracking
Pavel Filipenský [Wed, 19 Jul 2023 09:33:56 +0000 (11:33 +0200)] 
s3:winbindd: Change the TALLOC_CTX to fix the tevent call depth tracking

Call depth is not working for winbindd_list_users_send as expected,
it is visible in the flow traces:

  -> process_request_send
      -> winbindd_list_users_send
  -> wb_query_user_list_send

It should look like:

  -> process_request_send
      -> winbindd_list_users_send
          -> wb_query_user_list_send

Tevent call depth tracking internal implementation relies on the fact
that the talloc memory context has type  "struct tevent_req".
Then it can obtain the depth from the parent and increment it by one.

The implementation of winbindd_list_users_send() is passing to
wb_query_user_list_send() context of type
"struct winbindd_list_users_state", and from there the parent
"struct tevent_req" cannot be identified.

So we will pass as TALLOC_CTX 'state' instead of 'state->domains'.
After the call, we can reparent back.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Thu Jul 20 10:38:19 UTC 2023 on atb-devel-224

2 years agoRevert "s3:winbindd: set TEVENT_DEPRECATED as tevent_thread_call_depth_*() api will...
Andreas Schneider [Wed, 19 Jul 2023 09:19:55 +0000 (11:19 +0200)] 
Revert "s3:winbindd: set TEVENT_DEPRECATED as tevent_thread_call_depth_*() api will change soon"

This reverts commit 28ddcaf4d8ebb7a4e3498518580ff71662d3cee0.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jul 19 10:57:27 UTC 2023 on atb-devel-224

2 years agos4:dns_server: Add some more debugging in order to find problems with level 10 logs
Stefan Metzmacher [Thu, 14 Jul 2022 10:00:51 +0000 (12:00 +0200)] 
s4:dns_server: Add some more debugging in order to find problems with level 10 logs

We had customer problems where level 10 logs were not good enough in
order to find the reason for failing dns updates.

With the new debug message there's at least a chance to
find out what the problem could be.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agos4:dns_server: defer calling werr_to_dns_err() in a central place
Stefan Metzmacher [Thu, 14 Jul 2022 10:00:51 +0000 (12:00 +0200)] 
s4:dns_server: defer calling werr_to_dns_err() in a central place

The WERROR codes are much more verbose and it's better to
keep them until we really need the mapping to DNS error codes.

This will allow us to create much better debug messages in
the next commit.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agos3:waf: Fix code spelling
Andreas Schneider [Tue, 18 Jul 2023 10:29:12 +0000 (12:29 +0200)] 
s3:waf: Fix code spelling

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

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 [Tue, 18 Jul 2023 09:36:49 +0000 (11:36 +0200)] 
s3:utils: Fix code spelling

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

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos3:smbd: Fix trailing white spaces in quotas.c
Andreas Schneider [Tue, 18 Jul 2023 09:30:56 +0000 (11:30 +0200)] 
s3:smbd: Fix trailing white spaces in quotas.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos3:smbd: Fix trailing white spaces in dmapi.c
Andreas Schneider [Tue, 18 Jul 2023 09:30:37 +0000 (11:30 +0200)] 
s3:smbd: Fix trailing white spaces in dmapi.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos3:selftest: Fix code spelling
Andreas Schneider [Mon, 17 Jul 2023 16:25:41 +0000 (18:25 +0200)] 
s3:selftest: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos3:script: Fix code spelling
Andreas Schneider [Mon, 17 Jul 2023 13:03:58 +0000 (15:03 +0200)] 
s3:script: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos3:rpc_server: Fix code spelling
Andreas Schneider [Mon, 17 Jul 2023 13:01:21 +0000 (15:01 +0200)] 
s3:rpc_server: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos3:rpc_client: Fix code spelling
Andreas Schneider [Mon, 17 Jul 2023 12:59:06 +0000 (14:59 +0200)] 
s3:rpc_client: Fix code spelling

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos3:printing: Rename variably to dummy to make codespell happy
Andreas Schneider [Thu, 13 Jul 2023 07:25:50 +0000 (09:25 +0200)] 
s3:printing: Rename variably to dummy to make codespell happy

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos3:printing: Fix trailing white spaces in print_iprint.c
Andreas Schneider [Thu, 13 Jul 2023 07:21:13 +0000 (09:21 +0200)] 
s3:printing: Fix trailing white spaces in print_iprint.c

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

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos3:param: Rename bLoaded global variable
Andreas Schneider [Thu, 13 Jul 2023 07:18:42 +0000 (09:18 +0200)] 
s3:param: Rename bLoaded global variable

This makes codespell happy.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agoctdb-tests: Log to stderr in statd-callout tests
Martin Schwenke [Sun, 16 Jul 2023 10:55:57 +0000 (20:55 +1000)] 
ctdb-tests: Log to stderr in statd-callout tests

Errors logged when testing statd-callout don't currently go anywhere.
This is because arguments to the hacked version of script_log() are
ignored.

Remove the hack and configure logging to stderr.

This could go in the local statd-callout.sh setup script.  However,
make it available for other script tests.

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): Wed Jul 19 09:57:37 UTC 2023 on atb-devel-224

2 years agoctdb-scripts: Support script logging to stderr
Martin Schwenke [Sun, 16 Jul 2023 10:52:54 +0000 (20:52 +1000)] 
ctdb-scripts: Support script logging to stderr

Logging in statd-callout tests is currently useless.  This will
provide a way of seeing errors in those tests.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-scripts: Avoid ShellCheck warning SC2162
Martin Schwenke [Sun, 16 Jul 2023 10:49:57 +0000 (20:49 +1000)] 
ctdb-scripts: Avoid ShellCheck warning SC2162

  SC2162 read without -r will mangle backslashes.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-scripts: Reformat with "shfmt -w -p -i 0 -fn"
Martin Schwenke [Sun, 16 Jul 2023 10:47:09 +0000 (20:47 +1000)] 
ctdb-scripts: Reformat with "shfmt -w -p -i 0 -fn"

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-recoverd: CID 1509028 - Use of 32-bit time_t (Y2K38_SAFETY)
Martin Schwenke [Tue, 11 Oct 2022 22:05:25 +0000 (09:05 +1100)] 
ctdb-recoverd: CID 1509028 - Use of 32-bit time_t (Y2K38_SAFETY)

usecs is going to be passed as a uint32_t.  There is no need to
calculate it as a time_t.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb: Do not use egrep
Martin Schwenke [Mon, 10 Jul 2023 22:03:22 +0000 (08:03 +1000)] 
ctdb: Do not use egrep

On some platforms, egrep prints a deprecation warning to stderr:

  egrep: warning: egrep is obsolescent; using grep -E

Use grep -E instead.

This is nice and simple, so no use splitting this commit into 2
separate commits for each of tools and test.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-doc: Correct bit-rotted documenation
Martin Schwenke [Fri, 16 Jun 2023 03:29:22 +0000 (13:29 +1000)] 
ctdb-doc: Correct bit-rotted documenation

Loading tunables is now done in ctdbd, so find another example for the
"setup" event.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-utils: Drop unused scsi_io.c source file
Martin Schwenke [Wed, 22 Mar 2023 23:24:49 +0000 (10:24 +1100)] 
ctdb-utils: Drop unused scsi_io.c source file

It will be in the git history if we ever decide to use SCSI persistent
reservations as a cluster lock.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agos3:winbind: Set/unset the winbind_call_flow callback if log level changes
Pavel Filipenský [Wed, 3 May 2023 09:21:11 +0000 (11:21 +0200)] 
s3:winbind: Set/unset the winbind_call_flow callback if log level changes

Done only for the parent process. Works with 'smbcontrol reload-config'

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jul 19 09:00:50 UTC 2023 on atb-devel-224

2 years agos3:winbind: Update winbind to tevent 0.15.0 API
Pavel Filipenský [Tue, 2 May 2023 19:59:53 +0000 (21:59 +0200)] 
s3:winbind: Update winbind to tevent 0.15.0 API

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos3:winbind: Add callback winbind_call_flow()
Pavel Filipenský [Wed, 3 May 2023 09:19:45 +0000 (11:19 +0200)] 
s3:winbind: Add callback winbind_call_flow()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoldb: call tevent_set_max_debug_level(TEVENT_DEBUG_TRACE) together with ldb_tevent_debug()
Stefan Metzmacher [Tue, 31 Jan 2023 15:25:40 +0000 (16:25 +0100)] 
ldb: call tevent_set_max_debug_level(TEVENT_DEBUG_TRACE) together with ldb_tevent_debug()

This means ldb_tevent_debug() is only called for TEVENT_DEBUG_TRACE.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agolib/util: call tevent_set_max_debug_level() in samba_tevent_set_debug()
Stefan Metzmacher [Tue, 31 Jan 2023 15:25:40 +0000 (16:25 +0100)] 
lib/util: call tevent_set_max_debug_level() in samba_tevent_set_debug()

This means samba_tevent_debug() is only called when needed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agotevent: version 0.15.0 tevent-0.15.0
Stefan Metzmacher [Wed, 18 Jan 2023 14:41:37 +0000 (15:41 +0100)] 
tevent: version 0.15.0

- remove py2 ifdefs
- python: Safely clear structure members
- the tevent_thread_call_depth API is updated
  in order to allow better tracing.
- add tevent_set_max_debug_level() only and don't
  pass TEVENT_DEBUG_TRACE to tevent_debug() callbacks by default.
- Spelling fixes
- Make use of epoll_create1() for epoll backend
- Optimize overhead in the epoll backend

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agotevent: add tevent_common_fd_str() helper
Stefan Metzmacher [Fri, 11 Nov 2022 21:25:34 +0000 (22:25 +0100)] 
tevent: add tevent_common_fd_str() helper

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agotevent: avoid calling epoll_update_event() again if epoll_check_reopen() already...
Stefan Metzmacher [Wed, 11 Jan 2023 07:21:47 +0000 (08:21 +0100)] 
tevent: avoid calling epoll_update_event() again if epoll_check_reopen() already did it

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agotevent: let epoll_check_reopen() clear all events before reopening them
Stefan Metzmacher [Wed, 11 Jan 2023 07:21:47 +0000 (08:21 +0100)] 
tevent: let epoll_check_reopen() clear all events before reopening them

This is clearer for multiplexed fdes as it means both sides are
already cleared before we call epoll_update_event() again.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agotevent: avoid epoll_check_reopen() overhead unless required
Stefan Metzmacher [Thu, 20 Apr 2023 12:59:33 +0000 (12:59 +0000)] 
tevent: avoid epoll_check_reopen() overhead unless required

The preparation, function call and cleanup for epoll_check_reopen()
is quite some overhead and not needed most of the time!

So check the pid in the caller avoids most of it.

Review with: git show -w

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agotevent: make use of TEVENT_DEBUG() when using TEVENT_DEBUG_TRACE
Stefan Metzmacher [Fri, 11 Nov 2022 21:25:34 +0000 (22:25 +0100)] 
tevent: make use of TEVENT_DEBUG() when using TEVENT_DEBUG_TRACE

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agotevent: add TEVENT_DEBUG() avoid argument overhead when log is not active...
Stefan Metzmacher [Fri, 11 Nov 2022 14:05:53 +0000 (15:05 +0100)] 
tevent: add TEVENT_DEBUG() avoid argument overhead when log is not active...

It can be very costly to calculate the arguments passed to
tevent_debug(), just to drop the message within tevent_debug()
or the callback function.

So we add a way to avoid the overhead, it will be used in the
next commits.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agotevent: introduce tevent_set_max_debug_level() (default TEVENT_DEBUG_WARNING)
Stefan Metzmacher [Fri, 11 Nov 2022 14:05:53 +0000 (15:05 +0100)] 
tevent: introduce tevent_set_max_debug_level() (default TEVENT_DEBUG_WARNING)

Allow an application to decide which log levels it wants to get
in the callback function passed to tevent_set_debug().

By default TEVENT_DEBUG_WARNING is the maximal reported level
and TEVENT_DEBUG_TRACE message no longer reach the callback function
by default.

It seems Samba is the only consumer of tevent_set_debug(), so it
should not be a huge problem, as Samba only reports TEVENT_DEBUG_TRACE
message with log level 50 anyway. And future Samba versions will
call tevent_set_max_debug_level() if needed.

Note the change to tevent-0.14.1.sigs will be reverted
with the release of tevent 0.15.0.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agotevent: add fd_speed test
Stefan Metzmacher [Fri, 27 Jan 2023 11:12:45 +0000 (12:12 +0100)] 
tevent: add fd_speed test

This is similar to the "context" test, but without signal handlers.

It also creates a constant load instead of being time limited,
which makes it useful to analyse using callgrind and other tools.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agotevent: Flow: add tevent_thread_call_depth_set_callback()
Pavel Filipenský [Tue, 2 May 2023 19:57:16 +0000 (21:57 +0200)] 
tevent: Flow: add tevent_thread_call_depth_set_callback()

Note the tevent-0.14.1.sigs changes will be reverted in
the 'tevent 0.15.0' commit.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotevent: Flow: store cleanup function name in tevent_req
Stefan Metzmacher [Tue, 23 May 2023 04:39:06 +0000 (06:39 +0200)] 
tevent: Flow: store cleanup function name in tevent_req

Note the tevent-0.14.1.sigs changes will be reverted in
the 'tevent 0.15.0' commit.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2 years agotevent: Flow: store cancel function name in tevent_req
Stefan Metzmacher [Tue, 23 May 2023 04:38:27 +0000 (06:38 +0200)] 
tevent: Flow: store cancel function name in tevent_req

Note the tevent-0.14.1.sigs changes will be reverted in
the 'tevent 0.15.0' commit.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2 years agotevent: Flow: store trigger function name in tevent_queue_entry
Pavel Filipenský [Mon, 15 May 2023 10:57:09 +0000 (12:57 +0200)] 
tevent: Flow: store trigger function name in tevent_queue_entry

Note the tevent-0.14.1.sigs changes will be reverted in
the 'tevent 0.15.0' commit.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotevent: Flow: store callback function name in tevent_req
Pavel Filipenský [Mon, 24 Apr 2023 13:04:06 +0000 (15:04 +0200)] 
tevent: Flow: store callback function name in tevent_req

Note the tevent-0.14.1.sigs changes will be reverted in
the 'tevent 0.15.0' commit.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotevent: Flow: pass function name to tevent_req_create()
Pavel Filipenský [Sat, 18 Jun 2022 08:57:11 +0000 (10:57 +0200)] 
tevent: Flow: pass function name to tevent_req_create()

Note the tevent-0.14.1.sigs changes will be reverted in
the 'tevent 0.15.0' commit.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotevent: Deprecate some tevent_thread_call_depth_*() functions
Pavel Filipenský [Fri, 28 Apr 2023 18:45:20 +0000 (20:45 +0200)] 
tevent: Deprecate some tevent_thread_call_depth_*() functions

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotevent: Move definition of _DEPRECATED_ to the top of tevent.h
Pavel Filipenský [Fri, 28 Apr 2023 18:13:29 +0000 (20:13 +0200)] 
tevent: Move definition of _DEPRECATED_ to the top of tevent.h

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos3:winbindd: set TEVENT_DEPRECATED as tevent_thread_call_depth_*() api will change...
Stefan Metzmacher [Fri, 19 May 2023 09:16:49 +0000 (11:16 +0200)] 
s3:winbindd: set TEVENT_DEPRECATED as tevent_thread_call_depth_*() api will change soon

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2 years agotevent: add tevent_dlinklist.h as copy from lib/util/dlinklist.h
Stefan Metzmacher [Mon, 24 Apr 2023 10:39:17 +0000 (12:39 +0200)] 
tevent: add tevent_dlinklist.h as copy from lib/util/dlinklist.h

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agolib/util: dlinklist.h sync with LGPL copy from lib/ldb/include/dlinklist.h
Stefan Metzmacher [Thu, 20 Apr 2023 14:35:25 +0000 (14:35 +0000)] 
lib/util: dlinklist.h sync with LGPL copy from lib/ldb/include/dlinklist.h

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agoldb: clarify LGPL scope of include/dlinklist.h
Stefan Metzmacher [Mon, 30 Jan 2023 15:10:07 +0000 (16:10 +0100)] 
ldb: clarify LGPL scope of include/dlinklist.h

Removing the explicit notice about ldb in order to
have the same content in all copies of dlinklist.h
in the next commits.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agoldb: remove trailing whitespaces from include/dlinklist.h
Stefan Metzmacher [Mon, 30 Jan 2023 15:10:07 +0000 (16:10 +0100)] 
ldb: remove trailing whitespaces from include/dlinklist.h

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agotevent: rely on epoll_create1() for epoll interface
Dmitry Antipov [Fri, 7 Apr 2023 11:47:15 +0000 (14:47 +0300)] 
tevent: rely on epoll_create1() for epoll interface

Prefer epoll_create1(2) over epoll_create(2) and
always require the former to use epoll(7) interface,
thus saving extra fcntl(2) call to set FD_CLOEXEC.

Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agolib:replace: rely on epoll_create1() for epoll interface
Dmitry Antipov [Fri, 7 Apr 2023 11:42:10 +0000 (14:42 +0300)] 
lib:replace: rely on epoll_create1() for epoll interface

Prefer epoll_create1(2) over epoll_create(2) and
always require the former to use epoll(7) interface.

Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotdb: release 1.4.9 tdb-1.4.9
Stefan Metzmacher [Tue, 18 Jul 2023 09:39:38 +0000 (11:39 +0200)] 
tdb: release 1.4.9

* Remove remaining, but broken python2 support
* Spelling fixes
* python: Safely clear structure members

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotalloc: release 2.4.1 talloc-2.4.1
Stefan Metzmacher [Tue, 18 Jul 2023 09:39:38 +0000 (11:39 +0200)] 
talloc: release 2.4.1

* Remove remaining, but broken python2 support
* Spelling fixes
* Remove unneeded va_copy()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agonetcmd: sites: add sites and subnet list and view commands to manpage
Rob van der Linde [Wed, 12 Jul 2023 12:42:56 +0000 (00:42 +1200)] 
netcmd: sites: add sites and subnet list and view commands to manpage

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jul 19 04:29:15 UTC 2023 on atb-devel-224

2 years agonetcmd: sites: add missing subnet commands to samba-tool manpage
Rob van der Linde [Wed, 12 Jul 2023 12:42:03 +0000 (00:42 +1200)] 
netcmd: sites: add missing subnet commands to samba-tool manpage

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agonetcmd: sites: tests for list and view sites and subnet
Rob van der Linde [Wed, 5 Jul 2023 05:40:48 +0000 (17:40 +1200)] 
netcmd: sites: tests for list and view sites and subnet

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agonetcmd: sites: make use of ldb_connect from base class
Rob van der Linde [Tue, 4 Jul 2023 10:02:01 +0000 (22:02 +1200)] 
netcmd: sites: make use of ldb_connect from base class

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agonetcmd: add list and view commands for sites and subnets
Rob van der Linde [Tue, 4 Jul 2023 09:47:46 +0000 (21:47 +1200)] 
netcmd: add list and view commands for sites and subnets

* samba-tool sites list
* samba-tool sites view
* samba-tool sites subnet list
* samba-tool sites subnet view

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agonetcmd: add Subnet and Site models
Rob van der Linde [Tue, 4 Jul 2023 09:34:38 +0000 (21:34 +1200)] 
netcmd: add Subnet and Site models

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agoWHATSNEW: Update minimum GnuTLS version
Andrew Bartlett [Mon, 17 Jul 2023 22:29:50 +0000 (10:29 +1200)] 
WHATSNEW: Update minimum GnuTLS version

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agolib/fuzzing: patch for collecting fuzz_security_token_vs_descriptor seeds
Douglas Bagnall [Tue, 18 Jul 2023 00:54:40 +0000 (12:54 +1200)] 
lib/fuzzing: patch for collecting fuzz_security_token_vs_descriptor seeds

If this patch is applied, and an environment variable is set, all
access_check calls will be recorded as seeds for
fuzz_security_token_vs_descriptor. See the patch for details.

You probably will never want to apply this patch, but it is here just
in case.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolib/fuzzing: adapt fuzz_sddl_access_check for AD variant
Douglas Bagnall [Mon, 17 Jul 2023 20:56:40 +0000 (08:56 +1200)] 
lib/fuzzing: adapt fuzz_sddl_access_check for AD variant

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolib/fuzzing: adapt fuzz_security_token_vs_descriptor for AD variant
Douglas Bagnall [Mon, 17 Jul 2023 04:20:58 +0000 (16:20 +1200)] 
lib/fuzzing: adapt fuzz_security_token_vs_descriptor for AD variant

This of course doesn't exercise the object tree or default SID code,
but it still covers a lot to the *_ds access_check functions.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolib/fuzzing: add fuzzer for arbitrary token/sd access checks
Douglas Bagnall [Sat, 15 Jul 2023 10:49:22 +0000 (22:49 +1200)] 
lib/fuzzing: add fuzzer for arbitrary token/sd access checks

The token and descriptor are stored in NDR format; for this purpose we
add a new IDL struct containing this pair (along with a desired access
mask).

An upcoming commit will show how to collect seeds for this fuzzer.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolib/fuzzing: add fuzz_sddl_access_check
Douglas Bagnall [Wed, 12 Jul 2023 01:03:53 +0000 (13:03 +1200)] 
lib/fuzzing: add fuzz_sddl_access_check

This fuzzer parses SDDL into a security descriptor and runs an access
check on it using a known security token. This is purely for crash
detection -- we don't know enough to assert whether the check should
succeed or not.

The seed strings used are compatible with those of fuzz_sddl_parse --
anything found by fuzz_sddl_parse is worth trying as a seed here, and
vice versa.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:provision: use better values for operatingSystem[Version]
Stefan Metzmacher [Wed, 22 Jul 2015 10:44:32 +0000 (12:44 +0200)] 
s4:provision: use better values for operatingSystem[Version]

Some clients (e.g. an exchange server) check operatingSystemVersion
in order to check if a domain controller is new enough.

So we better use a value matching the dc functional level.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:pydsdb: add dc_operatingSystemVersion() helper
Stefan Metzmacher [Tue, 18 Jul 2023 15:17:21 +0000 (17:17 +0200)] 
s4:pydsdb: add dc_operatingSystemVersion() helper

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dsdb: let dsdb_check_and_update_fl() also operatingSystem[Version]
Stefan Metzmacher [Fri, 7 Jul 2023 12:18:14 +0000 (14:18 +0200)] 
s4:dsdb: let dsdb_check_and_update_fl() also operatingSystem[Version]

Some clients (e.g. an exchange server) check operatingSystemVersion
in order to check if a domain controller is new enough.

So we better use a value matching the dc functional level.

While we also fixed operatingSystem[Version] at provision time,
we do it also in dsdb_check_and_update_fl() in order to
handle old provisions and systems joined to an existing domain.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agoupgradeprovision: handle operatingSystem similar to operatingSystemVersion
Stefan Metzmacher [Tue, 18 Jul 2023 09:01:31 +0000 (11:01 +0200)] 
upgradeprovision: handle operatingSystem similar to operatingSystemVersion

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agoldapcmp: also ignore operatingSystem similar to operatingSystemVersion
Stefan Metzmacher [Tue, 18 Jul 2023 09:00:56 +0000 (11:00 +0200)] 
ldapcmp: also ignore operatingSystem similar to operatingSystemVersion

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetlogon.idl: add some comments to netr_OsVersionInfoEx
Stefan Metzmacher [Mon, 20 Dec 2021 19:53:35 +0000 (20:53 +0100)] 
netlogon.idl: add some comments to netr_OsVersionInfoEx

[MS-RPRN] 7 Appendix B: Product Behavior contains information
about the products and their announced versions.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agothird_party/heimdal: Import lorikeet-heimdal-202307050413 (commit e0597fe1d01b109e64d...
Joseph Sutton [Wed, 5 Jul 2023 04:21:07 +0000 (16:21 +1200)] 
third_party/heimdal: Import lorikeet-heimdal-202307050413 (commit e0597fe1d01b109e64d9c2a5bcada664ac199498)

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jul 19 02:41:25 UTC 2023 on atb-devel-224

2 years agotests/krb5: Add a test for PK-INIT with a revoked certificate
Joseph Sutton [Mon, 3 Jul 2023 02:31:03 +0000 (14:31 +1200)] 
tests/krb5: Add a test for PK-INIT with a revoked certificate

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agotests/krb5: Allow passing a pre-created certificate into _pkinit_req()
Joseph Sutton [Wed, 5 Jul 2023 04:12:42 +0000 (16:12 +1200)] 
tests/krb5: Allow passing a pre-created certificate into _pkinit_req()

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agotests/krb5: Have the caller of create_certificate() fetch the CA certificate and...
Joseph Sutton [Wed, 5 Jul 2023 00:55:41 +0000 (12:55 +1200)] 
tests/krb5: Have the caller of create_certificate() fetch the CA certificate and private key

These are useful to keep around for other purposes.

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

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