]>
git.ipfire.org Git - thirdparty/samba.git/log
Stefan Metzmacher [Thu, 19 Sep 2024 04:39:02 +0000 (06:39 +0200)]
s3:librpc/rpc: split out dcerpc_internal.h for struct pipe_auth_data
This should be anonymous for callers.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Sep 2024 08:32:58 +0000 (10:32 +0200)]
s3:libsmb: make use of dcerpc_binding_get_abstract_syntax()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Sep 2024 07:39:44 +0000 (09:39 +0200)]
s3:lib/netapi: make use of dcerpc_binding_get_abstract_syntax()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Sep 2024 07:20:03 +0000 (09:20 +0200)]
s3:rpcclient: make use of dcerpc_binding_handle_get_transport()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Sep 2024 07:13:03 +0000 (09:13 +0200)]
s3:winbindd: make use of dcerpc_binding_handle_get_transport()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Sep 2024 07:12:10 +0000 (09:12 +0200)]
s3:rpc_client: remove references to rpc_pipe_client from wsp_cli.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Sep 2024 04:27:22 +0000 (06:27 +0200)]
s3:rpc_client: remember rpc_pipe_client->print_username
This is ugly, but it's less ugly than doing it deep
inside of cli_spoolss.c and other code.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 18 Sep 2024 21:35:20 +0000 (23:35 +0200)]
s4:librpc: make all but dcerpc_pipe->binding_handle internal struct members
We could use a dcerpc_internal.h for struct dcecli_security and
struct dcecli_connection, but in struct dcerpc_pipe we still
expose binding_handle and changing that would require way too
much work for now...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 17 Sep 2024 20:41:16 +0000 (22:41 +0200)]
s4:torture/rpc: make use of dcerpc_binding_handle_get_transport()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 18 Sep 2024 21:27:17 +0000 (23:27 +0200)]
s4:tortore/rpc: make use of dcerpc_binding_get_abstract_syntax() and dcerpc_binding_get_flags()
We should not use p->syntax nor p->transfer_syntax...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 17 Sep 2024 21:04:23 +0000 (23:04 +0200)]
s4:torture/rpc: make use of dcerpc_binding_handle_get_binding() and dcerpc_binding_get_flags()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 18 Sep 2024 21:34:44 +0000 (23:34 +0200)]
s4:libnet: make use of dcerpc_binding_handle_get_transport()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 18 Sep 2024 21:33:53 +0000 (23:33 +0200)]
s4:libnet: make use of dcerpc_binding_handle_get_binding()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Sep 2024 22:00:31 +0000 (00:00 +0200)]
librpc/rpc: un-const dcerpc_default_transport_endpoint()
It returns an alloced string so it should not be marked as
const...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 17 Sep 2024 20:29:58 +0000 (22:29 +0200)]
librpc/rpc: add dcerpc_binding_handle_get_transport() helper function
This will allow callers to avoid the dcerpc_binding_handle_get_binding()
dcerpc_binding_get_transport() dance...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 17 Sep 2024 18:56:07 +0000 (20:56 +0200)]
librpc/rpc: add dcerpc_binding_handle_get_binding()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 17 Sep 2024 20:21:23 +0000 (22:21 +0200)]
s3:rpc_client: implement rpccli_bh_get_binding()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 17 Sep 2024 18:55:35 +0000 (20:55 +0200)]
s4:librpc/rpc: implement dcerpc_bh_get_binding()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 18 Sep 2024 21:25:34 +0000 (23:25 +0200)]
s4:librpc/rpc: call dcerpc_binding_set_abstract_syntax after bind or alter context
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 17 Sep 2024 18:52:41 +0000 (20:52 +0200)]
s3:winbindd: implement wbint_bh_get_binding() in winbindd_dual_ndr.c
We use NCACN_INTERNAL here too...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 17 Sep 2024 18:43:28 +0000 (20:43 +0200)]
s4:lib/messaging: implement irpc_bh_get_binding()
We just use NCACN_INTERNAL here...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 17 Sep 2024 18:43:28 +0000 (20:43 +0200)]
libcli/tstream_binding_handle: implement get_binding()
We just create an dummy binding handle here
as it's not really dcerpc...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 17 Sep 2024 17:28:55 +0000 (19:28 +0200)]
librpc/rpc: add get_binding() to dcerpc_binding_handle_ops
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sun, 15 Sep 2024 15:58:53 +0000 (17:58 +0200)]
s3:rpc_client: header signing is negotiated per transport connection
All gensec backends support GENSEC_FEATURE_SIGN_PKT_HEADER, so there's
no point in negotiating header signing based on the
auth context used during the DCERPC Bind.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sun, 15 Sep 2024 03:35:30 +0000 (05:35 +0200)]
s3:rpc_client: make use of struct samba_sockaddr in rpc_pipe_open_ncalrpc()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 16:54:43 +0000 (18:54 +0200)]
s3:winbindd: cm_connect_lsa_tcp() doesn't need to check for NCACN_IP_TCP or LEVEL_INTEGRITY
We only ever create domain->lsa_pipe_tcp with
cli_rpc_pipe_open_schannel_with_creds() and hardcoded NCACN_IP_TCP.
And schannel_update_internal returns an error with
an auth level lower than DCERPC_AUTH_LEVEL_INTEGRITY.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 14:46:47 +0000 (16:46 +0200)]
s3:rpcclient: make use of dcerpc_binding_handle_auth_info()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 13:59:29 +0000 (15:59 +0200)]
s3:rpc_client: the transport_session_key is per connection!
It's not per auth_context_id, currently there's no difference
but that will change in future...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 13:58:44 +0000 (15:58 +0200)]
s3:rpc_client: remove unused cli_get_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 13:57:03 +0000 (15:57 +0200)]
s3:rpcclient/cli_drsuapi: make use of dcerpc_binding_handle_auth_session_key()
Note we only need to call this once per connection, not after
each request...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 13:57:03 +0000 (15:57 +0200)]
s3:libnet_dssync: make use of dcerpc_binding_handle_auth_session_key()
Note we only need to call this once per connection, not after
each request...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 13:55:30 +0000 (15:55 +0200)]
s3:rpc_client: make use of dcerpc_binding_handle_transport_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 13:54:25 +0000 (15:54 +0200)]
s3:utils/net_rpc: make use of dcerpc_binding_handle_transport_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 13:52:29 +0000 (15:52 +0200)]
s3:libnet_join: make use of dcerpc_binding_handle_transport_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 13:51:20 +0000 (15:51 +0200)]
s3:lib/netapi: make use of dcerpc_binding_handle_transport_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 13:00:37 +0000 (15:00 +0200)]
s4:torture/drs: make use of dcerpc_binding_handle_auth_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 12:20:46 +0000 (14:20 +0200)]
s4:pyrpc: make use of dcerpc_binding_handle_auth_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 12:19:55 +0000 (14:19 +0200)]
s4:py_net: make use of dcerpc_binding_handle_auth_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 12:16:42 +0000 (14:16 +0200)]
s4:libnet: make use of dcerpc_binding_handle_auth_session_key() in libnet_become_dc.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 12:16:01 +0000 (14:16 +0200)]
s4:drepl: make use of dcerpc_binding_handle_auth_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 07:55:20 +0000 (09:55 +0200)]
s3:rpc_client: add rpccli_bh_auth_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 07:55:20 +0000 (09:55 +0200)]
s4:librpc/rpc: add dcerpc_bh_auth_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 07:55:20 +0000 (09:55 +0200)]
librpc/rpc: add dcerpc_binding_handle_auth_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 12:32:22 +0000 (14:32 +0200)]
s4:librpc/rpc: remove unused dcerpc_fetch_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 12:31:58 +0000 (14:31 +0200)]
s4:torture/rpc: make use of dcerpc_binding_handle_transport_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 12:20:46 +0000 (14:20 +0200)]
xss4:pyrpc: make use of dcerpc_binding_handle_transport_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 12:16:42 +0000 (14:16 +0200)]
s4:libnet: make use of dcerpc_binding_handle_transport_session_key() in libnet_passwd.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 12:16:42 +0000 (14:16 +0200)]
s4:libnet: add struct dcerpc_binding_handle helper variables in libnet_passwd.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 11:37:34 +0000 (13:37 +0200)]
s4:librpc/rpc: remove unused dcerpc_transport_encrypted()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 11:35:47 +0000 (13:35 +0200)]
s4:pyrpc: let py_iface_transport_encrypted() use dcerpc_binding_handle_transport_encrypted()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 07:55:20 +0000 (09:55 +0200)]
s3:rpc_client: add rpccli_bh_transport_session_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 07:55:20 +0000 (09:55 +0200)]
s4:librpc/rpc: add dcerpc_bh_transport_{encrypted,session_key}()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 14 Sep 2024 07:55:20 +0000 (09:55 +0200)]
librpc/rpc: add dcerpc_binding_handle_transport_{encrypted,session_key}()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 18 Sep 2024 04:27:30 +0000 (06:27 +0200)]
s4:torture/rpc: avoid using DCERPC_NDR_REF_ALLOC in fsrvp.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 18 Sep 2024 02:31:04 +0000 (04:31 +0200)]
s4:torture/rpc: remove useless usage of DCERPC_SIGN, DCERPC_SEAL
We already used DCERPC_AUTH_LEVEL_PRIVACY for the connection.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 18 Sep 2024 20:42:17 +0000 (22:42 +0200)]
s4:torture/rpc: avoid checking p->last_fault_code in iremotewinspool*
Now that we check for NT_STATUS_RPC_UNSUPPORTED_TYPE, there's no
need to check for DCERPC_NCA_S_UNSUPPORTED_TYPE.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 18 Sep 2024 20:37:14 +0000 (22:37 +0200)]
librpc/rpc: map DCERPC_NCA_S_UNSUPPORTED_TYPE to NT_STATUS_RPC_UNSUPPORTED_TYPE
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 18 Sep 2024 20:36:26 +0000 (22:36 +0200)]
librpc/rpc: map DCERPC_NCA_S_SERVER_TOO_BUSY to NT_STATUS_RPC_SERVER_TOO_BUSY
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Thu, 2 May 2024 14:38:47 +0000 (16:38 +0200)]
lib:ldb: Use tdb_traverse_read() in ldb_kv_index_sub_transaction_commit()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Sep 26 09:59:34 UTC 2024 on atb-devel-224
Andreas Schneider [Thu, 2 May 2024 13:15:43 +0000 (15:15 +0200)]
lib:ldb: Use tdb_parse_record() in ldb_kv_sub_transaction_traverse()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Andreas Schneider [Thu, 2 May 2024 14:45:59 +0000 (16:45 +0200)]
lib:ldb: Use tdb_parse_record() in ldb_kv_dn_list_store()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Andreas Schneider [Mon, 29 Apr 2024 12:16:17 +0000 (14:16 +0200)]
lib:ldb: Use tdb_parse_record() in ldb_kv_dn_list_load()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Andreas Schneider [Tue, 24 Sep 2024 13:48:23 +0000 (15:48 +0200)]
ldb: Build lmdb backend also in non-AD case
We should build with lmdb support also if it is not in AD case. The lmdb
backend is also used e.g. by sssd.
If you don't want to build it, you can always specify --without-ldb-lmdb
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15721
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Sep 25 05:36:13 UTC 2024 on atb-devel-224
Jones Syue [Mon, 2 Sep 2024 09:11:00 +0000 (17:11 +0800)]
s3: SIGHUP handlers use consistent log level 3
When turn-on 'log level = 3', sending SIGHUP to samba processes, for
example: smbd parent/children, smbd-notifyd, and smbd-cleanupd. Then
monitor log.smbd in order to parse sighup logs, it looks like the log level
is inconsistent among these processes: smbd parent/children use level 1,
and smbd-notifyd/smbd-cleanupd use level 3.
This patch raises sighup handler's log level from level 1 to level 3, which
is more consistent with smbd-notifyd by Commit
6e5bff80a0a0b ("s3:notifyd:
Handle sigup in notifyd to reparse smb.conf"), and smbd-cleanupd by Commit
57c1e115ecef4 ("smbd: reopen logs on SIGHUP for notifyd and cleanupd").
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15706
Signed-off-by: Jones Syue <jonessyue@qnap.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Sep 25 01:38:02 UTC 2024 on atb-devel-224
Kacper Boström [Tue, 10 Sep 2024 16:40:24 +0000 (18:40 +0200)]
samba-tool: Fix for inability to delete GPOs containing GPWL policies
GPOs containing GPWL (Wireless/Wired Protocol Extension) policies could not be deleted with samba-tool
as those policies were stored as subentries of the GPO and only the main root was deleted.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15387
RN: Fix for inability to delete GPOs containing GPWL policies using samba-tool
Signed-off-by: Kacper Boström <kacper@kacper.se>
Reviewed-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Sep 24 17:11:53 UTC 2024 on atb-devel-224
Douglas Bagnall [Thu, 29 Aug 2024 00:52:13 +0000 (12:52 +1200)]
ldb:test:api_search: shift remaining setUp adds to class add_index
Before:
ldb.python.api_search -> 52
ldb.python.api_search.tr -> 48
After:
ldb.python.api_search.tr -> 10
ldb.python.api_search -> 9
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Sep 24 10:38:03 UTC 2024 on atb-devel-224
Douglas Bagnall [Thu, 29 Aug 2024 00:39:09 +0000 (12:39 +1200)]
ldb:test:api_search: remove pass-through setUp()s
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Thu, 29 Aug 2024 00:38:27 +0000 (12:38 +1200)]
ldb:test:api_search: use @unittest.skipIf for LMDB tests
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Thu, 29 Aug 2024 00:23:55 +0000 (12:23 +1200)]
ldb:test:api_search: skip LMDB tests at class level
LMDB is not going to turn up midway through the testsuite, so we might
as well skip the whole class
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 23:03:54 +0000 (11:03 +1200)]
ldb:test:api_search: use class method to add index
The index attribute of these classes was a mutable object, which made
me nervous. If a subclass were to alter the class.index (rather than
replace it), it would affect tests in other subclasses.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Wed, 28 Aug 2024 23:05:28 +0000 (11:05 +1200)]
ldb:test:api_search: tidy up files in each subclass
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 08:21:36 +0000 (20:21 +1200)]
ldb:test:api_search: set up the database once and use copies
The api_search tests are really slow, in part because we populate the
database identically for all the individual tests. We can instead do
it once and use copies.
This makes the test several times faster.
Comparing "make test TESTS=ldb.python":
Before:
TOP 10 slowest tests
ldb.python.api_search.tr -> 415
ldb.python.api_search -> 413
ldb.python.api_add_modify -> 5
ldb.python.api_add_modify.tr -> 4
ldb.python.index.tr -> 4
ldb.python.index -> 4
ldb.python.api_simple.tr -> 2
ldb.python.api_simple -> 2
ldb.python.repack -> 2
ldb.python.api_misc.tr -> 1
'testonly' finished successfully (14m13.276s)
After:
TOP 10 slowest tests
ldb.python.api_search.tr -> 52
ldb.python.api_search -> 50
ldb.python.api_add_modify -> 7
ldb.python.api_add_modify.tr -> 7
ldb.python.index.tr -> 4
ldb.python.index -> 4
ldb.python.api_simple -> 4
ldb.python.api_simple.tr -> 2
ldb.python.repack -> 2
ldb.python.api_misc -> 1
'testonly' finished successfully (2m14.505s)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Wed, 28 Aug 2024 22:56:38 +0000 (10:56 +1200)]
ldb:test:api_search: use test name as db name
This will help enusre we are using the right DB when (in the next
commit) we set up the database for each test via copy. It also helps
with debugging.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 08:47:39 +0000 (20:47 +1200)]
ldb:test:api_search: put config options on class, not instance.
This makes them available to class methods.
In a later commit we will convert the index attribute into an
add_index() class method, because having a mutable variable on a class
is a slightly bad idea.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 08:18:02 +0000 (20:18 +1200)]
ldb:test:api_search: improve attribute access tests
`list = res.msgs` tests nothing more than a bare `res.msgs`,
and we can instead assert that the result is a list.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 08:49:23 +0000 (20:49 +1200)]
ldb:test:api_base: make flags method a class method
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 08:12:11 +0000 (20:12 +1200)]
ldb:test:api_base: simplify prefix selection
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 06:13:00 +0000 (18:13 +1200)]
ldb:tests:index: use abi_base
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 06:10:33 +0000 (18:10 +1200)]
ldb:tests:crash: rationalise imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 06:10:02 +0000 (18:10 +1200)]
ldb:tests:api_simple uses conventional 4 space indent
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 06:09:11 +0000 (18:09 +1200)]
ldb:tests:repack: use common api_base variables
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 06:08:09 +0000 (18:08 +1200)]
ldb:tests:api_misc: fix Control test
`self.assertRaises(TypeError, ldb.Control, ldb, 1234)` is raising a
TypeError because `ldb` is not an ldb.Ldb object, it is the ldb module.
What we want to test here is that the non-string `1234` raises a
TypeError -- the previous line tests the type of the ldb argument.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 02:48:57 +0000 (14:48 +1200)]
ldb:tests: move api.py to api_misc
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 02:46:05 +0000 (14:46 +1200)]
ldb:tests: make api_simple module
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 02:42:24 +0000 (14:42 +1200)]
ldb:tests: make api_add_modify module
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 02:41:18 +0000 (14:41 +1200)]
ldb:tests: make api_search module
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 02:35:48 +0000 (14:35 +1200)]
ldb:tests: make api_base module
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Sat, 17 Aug 2024 01:27:52 +0000 (13:27 +1200)]
ldb:tests:api.py uses .disconnect before rmdir
super.tearDown() was removing the tmpdir, but because self.ldb had
the file open, the directory was not cleared.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Fri, 16 Aug 2024 02:21:20 +0000 (14:21 +1200)]
ldb:pytest:api: remove unnecessary super() parameters
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Fri, 16 Aug 2024 02:06:53 +0000 (14:06 +1200)]
ldb:pytest:api: remove pass-though tearDowns
The result is exactly the same, unless we previously had the wrong
class name in the pass-through, in which case the result is *probably*
the same, only more correct.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Mon, 19 Aug 2024 00:19:22 +0000 (12:19 +1200)]
ldb:py bindings: ldb.Ldb().__str__ prints connection URL
before: "<ldb connection>"
after: "<ldb connection tdb:///path/to/samdb.ldb>"
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Volker Lendecke [Thu, 19 Sep 2024 15:32:42 +0000 (17:32 +0200)]
ctdb: Use str_list_add_printf() in lock_helper_args()
Saves lines, str_list_add_printf takes care of NULL checks
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sun Sep 22 10:44:59 UTC 2024 on atb-devel-224
Volker Lendecke [Fri, 20 Sep 2024 00:54:57 +0000 (02:54 +0200)]
ctdb: Change the ctdb_vfork_exec prototype to const char*const*
I could not find out how to cast a char ** to const char ** without
warning. This transfers fine to the execv call as well.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Volker Lendecke [Thu, 19 Sep 2024 14:09:43 +0000 (16:09 +0200)]
smbd: We can expect the file to exist in is_visible_fsp()
Another leftover from symlinks in posix context to not open an fsp
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 12 Sep 2024 19:33:54 +0000 (21:33 +0200)]
auth: Fix CID
1615191 Uninitialized scalar variable
Protect against winbind successfully returning 0 groups
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Sep 20 18:25:54 UTC 2024 on atb-devel-224
Volker Lendecke [Wed, 18 Sep 2024 16:29:56 +0000 (18:29 +0200)]
ctdb: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Volker Lendecke [Thu, 19 Sep 2024 15:32:42 +0000 (17:32 +0200)]
ctdb: Use str_list_add_printf() in debug_locks_args()
Saves lines, str_list_add_printf takes care of NULL checks
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Volker Lendecke [Thu, 19 Sep 2024 15:10:58 +0000 (17:10 +0200)]
ctdb: Make ctdb_lock_timeout_handler() easier to understand
Don't hide the real action inside an if-branch
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Volker Lendecke [Wed, 18 Sep 2024 14:57:02 +0000 (16:57 +0200)]
lib: Avoid unused includes
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Volker Lendecke [Tue, 10 Sep 2024 07:59:54 +0000 (09:59 +0200)]
vfs: Simplify capdecode() with hex_byte()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>