]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
10 months agos3:lib/netapi: make use of dcerpc_binding_handle_transport_session_key()
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>
10 months agos4:torture/drs: make use of dcerpc_binding_handle_auth_session_key()
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>
10 months agos4:pyrpc: make use of dcerpc_binding_handle_auth_session_key()
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>
10 months agos4:py_net: make use of dcerpc_binding_handle_auth_session_key()
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>
10 months agos4:libnet: make use of dcerpc_binding_handle_auth_session_key() in libnet_become_dc.c
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>
10 months agos4:drepl: make use of dcerpc_binding_handle_auth_session_key()
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>
10 months agos3:rpc_client: add rpccli_bh_auth_session_key()
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>
10 months agos4:librpc/rpc: add dcerpc_bh_auth_session_key()
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>
10 months agolibrpc/rpc: add dcerpc_binding_handle_auth_session_key()
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>
10 months agos4:librpc/rpc: remove unused dcerpc_fetch_session_key()
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>
10 months agos4:torture/rpc: make use of dcerpc_binding_handle_transport_session_key()
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>
10 months agoxss4:pyrpc: make use of dcerpc_binding_handle_transport_session_key()
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>
10 months agos4:libnet: make use of dcerpc_binding_handle_transport_session_key() in libnet_passwd.c
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>
10 months agos4:libnet: add struct dcerpc_binding_handle helper variables in libnet_passwd.c
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>
10 months agos4:librpc/rpc: remove unused dcerpc_transport_encrypted()
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>
10 months agos4:pyrpc: let py_iface_transport_encrypted() use dcerpc_binding_handle_transport_encr...
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>
10 months agos3:rpc_client: add rpccli_bh_transport_session_key()
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>
10 months agos4:librpc/rpc: add dcerpc_bh_transport_{encrypted,session_key}()
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>
10 months agolibrpc/rpc: add dcerpc_binding_handle_transport_{encrypted,session_key}()
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>
10 months agos4:torture/rpc: avoid using DCERPC_NDR_REF_ALLOC in fsrvp.c
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>
10 months agos4:torture/rpc: remove useless usage of DCERPC_SIGN, DCERPC_SEAL
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>
10 months agos4:torture/rpc: avoid checking p->last_fault_code in iremotewinspool*
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>
10 months agolibrpc/rpc: map DCERPC_NCA_S_UNSUPPORTED_TYPE to NT_STATUS_RPC_UNSUPPORTED_TYPE
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>
10 months agolibrpc/rpc: map DCERPC_NCA_S_SERVER_TOO_BUSY to NT_STATUS_RPC_SERVER_TOO_BUSY
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>
10 months agolib:ldb: Use tdb_traverse_read() in ldb_kv_index_sub_transaction_commit()
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

10 months agolib:ldb: Use tdb_parse_record() in ldb_kv_sub_transaction_traverse()
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>
10 months agolib:ldb: Use tdb_parse_record() in ldb_kv_dn_list_store()
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>
10 months agolib:ldb: Use tdb_parse_record() in ldb_kv_dn_list_load()
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>
10 months agoldb: Build lmdb backend also in non-AD case
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

10 months agos3: SIGHUP handlers use consistent log level 3
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

10 months agosamba-tool: Fix for inability to delete GPOs containing GPWL policies
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

10 months agoldb:test:api_search: shift remaining setUp adds to class add_index
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

10 months agoldb:test:api_search: remove pass-through setUp()s
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>
10 months agoldb:test:api_search: use @unittest.skipIf for LMDB tests
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>
10 months agoldb:test:api_search: skip LMDB tests at class level
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>
10 months agoldb:test:api_search: use class method to add index
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>
10 months agoldb:test:api_search: tidy up files in each subclass
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>
10 months agoldb:test:api_search: set up the database once and use copies
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>
10 months agoldb:test:api_search: use test name as db name
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>
10 months agoldb:test:api_search: put config options on class, not instance.
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>
10 months agoldb:test:api_search: improve attribute access tests
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>
10 months agoldb:test:api_base: make flags method a class method
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>
10 months agoldb:test:api_base: simplify prefix selection
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>
10 months agoldb:tests:index: use abi_base
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>
10 months agoldb:tests:crash: rationalise imports
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>
10 months agoldb:tests:api_simple uses conventional 4 space indent
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>
10 months agoldb:tests:repack: use common api_base variables
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>
10 months agoldb:tests:api_misc: fix Control test
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>
10 months agoldb:tests: move api.py to api_misc
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>
10 months agoldb:tests: make api_simple module
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>
10 months agoldb:tests: make api_add_modify module
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>
10 months agoldb:tests: make api_search module
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>
10 months agoldb:tests: make api_base module
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>
10 months agoldb:tests:api.py uses .disconnect before rmdir
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>
10 months agoldb:pytest:api: remove unnecessary super() parameters
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>
10 months agoldb:pytest:api: remove pass-though tearDowns
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>
10 months agoldb:py bindings: ldb.Ldb().__str__ prints connection URL
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>
10 months agoctdb: Use str_list_add_printf() in lock_helper_args()
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

10 months agoctdb: Change the ctdb_vfork_exec prototype to const char*const*
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>
10 months agosmbd: We can expect the file to exist in is_visible_fsp()
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>
10 months agoauth: Fix CID 1615191 Uninitialized scalar variable
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

10 months agoctdb: Fix a typo
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>
10 months agoctdb: Use str_list_add_printf() in debug_locks_args()
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>
10 months agoctdb: Make ctdb_lock_timeout_handler() easier to understand
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>
10 months agolib: Avoid unused includes
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>
10 months agovfs: Simplify capdecode() with hex_byte()
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>
10 months agovfs: Simplify capencode() with nybble_to_hex_lower()
Volker Lendecke [Tue, 10 Sep 2024 07:55:36 +0000 (09:55 +0200)] 
vfs: Simplify capencode() with nybble_to_hex_lower()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
10 months agopassdb: Simplify pdb_gethexhours() with hex_byte()
Volker Lendecke [Tue, 10 Sep 2024 06:55:16 +0000 (08:55 +0200)] 
passdb: Simplify pdb_gethexhours() with hex_byte()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
10 months agolibsmb: Use nybble_to_hex_upper() in virusfilter_url_quote()
Volker Lendecke [Tue, 10 Sep 2024 06:52:16 +0000 (08:52 +0200)] 
libsmb: Use nybble_to_hex_upper() in virusfilter_url_quote()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
10 months agolibsmb: Use nybble_to_hex_upper() in smbc_urlencode()
Volker Lendecke [Tue, 10 Sep 2024 06:50:16 +0000 (08:50 +0200)] 
libsmb: Use nybble_to_hex_upper() in smbc_urlencode()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
10 months agolibndr: Use TALLOC_FREE instead of talloc_free
Volker Lendecke [Thu, 12 Sep 2024 14:18:57 +0000 (16:18 +0200)] 
libndr: Use TALLOC_FREE instead of talloc_free

All the existing calls are right before returns, so they don't really
matter. But you never know when the code will change, and any compiler
will wipe the NULL assignment.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
10 months agorpc_host: Fix max_workers calculation
Volker Lendecke [Sat, 14 Sep 2024 13:21:49 +0000 (15:21 +0200)] 
rpc_host: Fix max_workers calculation

To limit max_workers into 16 bits, cap it at UINT16_MAX (65535, not 65536)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
10 months agorpc_server: Fix a comment
Volker Lendecke [Sat, 14 Sep 2024 11:37:13 +0000 (13:37 +0200)] 
rpc_server: Fix a comment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
10 months agos3:utils: use the correct secrets.tdb in net_use_krb_machine_account()
Stefan Metzmacher [Wed, 11 Sep 2024 16:21:58 +0000 (18:21 +0200)] 
s3:utils: use the correct secrets.tdb in net_use_krb_machine_account()

On a cluster we need to use the ctdb controlled database and not
a local secrets.tdb...

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Sep 20 05:54:43 UTC 2024 on atb-devel-224

10 months agos3:utils: let 'net ads testjoin' fail without valid machine credentials
Stefan Metzmacher [Wed, 18 Sep 2024 21:48:00 +0000 (23:48 +0200)] 
s3:utils: let 'net ads testjoin' fail without valid machine credentials

This will allow doing tests and make sure using anonymous credentials
doesn't cause false positive results...

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 months agos3:test_update_keytab_clustered: add net ads testjoin checks in more places
Stefan Metzmacher [Wed, 18 Sep 2024 22:14:56 +0000 (00:14 +0200)] 
s3:test_update_keytab_clustered: add net ads testjoin checks in more places

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 months agosmbd: SMB3 POSIX Extensions statfs() is broken
Ralph Boehme [Mon, 29 Apr 2024 16:38:10 +0000 (18:38 +0200)] 
smbd: SMB3 POSIX Extensions statfs() is broken

Regression introduced by 55d98b29eb294542cc4947573f233e0d5e6966cb. D'oh!

We'll add a regression test for this soon,
but for now we want to unblocking testing from the linux
client...

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Sep 19 21:27:07 UTC 2024 on atb-devel-224

10 months agosmbd: remove just created sharemode entry in the error codepaths
Ralph Boehme [Tue, 9 Apr 2024 12:53:32 +0000 (14:53 +0200)] 
smbd: remove just created sharemode entry in the error codepaths

Without this we leave stale sharemode entries around that can lead to all sorts
of havoc.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Sep 19 19:36:19 UTC 2024 on atb-devel-224

10 months agosmbd: consolidate DH reconnect failure code
Ralph Boehme [Tue, 9 Apr 2024 12:52:44 +0000 (14:52 +0200)] 
smbd: consolidate DH reconnect failure code

No change in behaviour, except that we now
also call fd_close() if vfs_default_durable_cookie()
failed.

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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agos3:tests: let test_durable_handle_reconnect.sh run smb2.durable-v2-regressions.durabl...
Stefan Metzmacher [Mon, 26 Aug 2024 12:42:12 +0000 (14:42 +0200)] 
s3:tests: let test_durable_handle_reconnect.sh run smb2.durable-v2-regressions.durable_v2_reconnect_bug15624

This demonstrates the dead lock after a durable reconnect failed
because the stat info changed, the file can't be accessed anymore
as we leak the incomplete share mode entry in a still running
process.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agos4:torture/smb2: add smb2.durable-v2-regressions.durable_v2_reconnect_bug15624
Stefan Metzmacher [Mon, 26 Aug 2024 12:42:02 +0000 (14:42 +0200)] 
s4:torture/smb2: add smb2.durable-v2-regressions.durable_v2_reconnect_bug15624

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agovfs_error_inject: add 'error_inject:durable_reconnect = st_ex_nlink'
Stefan Metzmacher [Mon, 26 Aug 2024 12:11:02 +0000 (14:11 +0200)] 
vfs_error_inject: add 'error_inject:durable_reconnect = st_ex_nlink'

This allows to simulate durable reconnect failures because the stat
information of the file changed.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agosmbd: add option "smbd:debug events" for tevent handling duration threshold warnings
Ralph Boehme [Wed, 20 Mar 2024 13:28:43 +0000 (14:28 +0100)] 
smbd: add option "smbd:debug events" for tevent handling duration threshold warnings

Can be used to enable printing an error message if tevent event handlers ran
longer then three seconds. Also logs a message with a loglevel of 3 if there
were no events at hall.

Enabled by default with 'log level = 10' or
'smbd profiling level = on'...

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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agosmbd: move trace_state variable behind tv variable
Ralph Boehme [Wed, 20 Mar 2024 13:27:27 +0000 (14:27 +0100)] 
smbd: move trace_state variable behind tv variable

Next commit adds timestamp variables to trace_state that want to be initialized
with the current time, so moving behind tv we can then just reuse tv for that.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agosmbd: add option "smbd lease break:debug hung procs"
Ralph Boehme [Thu, 4 Apr 2024 17:18:19 +0000 (19:18 +0200)] 
smbd: add option "smbd lease break:debug hung procs"

By enabling this a process sending a lease break message to another process
holding a lease will start watching that process and if that process didn't
process the lease break within 10 seconds (cf server_id_watch_waited()), we log
a kernel stack backtrace of that process.

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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agosmbd: log share_mode_watch_recv() errors as errors
Ralph Boehme [Fri, 5 Apr 2024 10:15:28 +0000 (12:15 +0200)] 
smbd: log share_mode_watch_recv() errors as errors

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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agos3/lib: add option "serverid watch:debug script"
Ralph Boehme [Thu, 25 Apr 2024 13:17:08 +0000 (15:17 +0200)] 
s3/lib: add option "serverid watch:debug script"

This takes just PID and NODE:PID on a cluster.

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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agos3/lib: add option "serverid watch:debug = yes" to print kernel stack of hanging...
Ralph Boehme [Thu, 4 Apr 2024 10:31:05 +0000 (12:31 +0200)] 
s3/lib: add option "serverid watch:debug = yes" to print kernel stack of hanging process

We only do if sys_have_proc_fds() returns true, so it's most likely
linux...

Enabled by default with log level 10...

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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agos3/lib: add next helper variable in server_id_watch_*
Ralph Boehme [Thu, 25 Apr 2024 13:24:57 +0000 (15:24 +0200)] 
s3/lib: add next helper variable in server_id_watch_*

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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agos4:lib/messaging: fix interaction between imessaging_reinit and irpc_destructor
Stefan Metzmacher [Tue, 17 Sep 2024 06:29:42 +0000 (08:29 +0200)] 
s4:lib/messaging: fix interaction between imessaging_reinit and irpc_destructor

This was missing in commit 0d096931196524a2d1bf59470bc629dc9231131e.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Sep 18 19:45:56 UTC 2024 on atb-devel-224

10 months agos4: torture: Add a new test lease_rename_with_overwrite.
Jeremy Allison [Tue, 17 Sep 2024 18:47:31 +0000 (11:47 -0700)] 
s4: torture: Add a new test lease_rename_with_overwrite.

Creates and opens two files with leases, then tries
rename-with-overwrite on file_src -> file_dst.

Ensures we get a lease break on file_dst before
getting the access denied response.

Passes against Windows, fails against Samba.

Add knownfail.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Sep 18 05:42:15 UTC 2024 on atb-devel-224

10 months agosync machine password to keytab: handle FreeIPA use case
Alexander Bokovoy [Tue, 3 Sep 2024 05:48:24 +0000 (08:48 +0300)] 
sync machine password to keytab: handle FreeIPA use case

FreeIPA uses own procedure to retrieve keytabs and during the setup of
Samba on FreeIPA client the keytab is already present, only machine
account needs to be set in the secrets database.

'sync machine password to keytab' option handling broke this use case by
always attempting to contact a domain controller and failing to do so
(Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=2309199).

The original synchronizing machine account password to keytab feature
did not have a mechanism to disable its logic at all.

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Fri Sep 13 13:16:09 UTC 2024 on atb-devel-224

10 months agodocs_xml/vfs_ceph_new: Add new proxy option
Anoop C S [Thu, 5 Sep 2024 06:15:19 +0000 (11:45 +0530)] 
docs_xml/vfs_ceph_new: Add new proxy option

Update man page to describe new 'proxy' module option.

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

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Sep 12 16:51:14 UTC 2024 on atb-devel-224

10 months agowscript_build: Do not link vfs_ceph_new against libcephfs
Anoop C S [Sun, 8 Sep 2024 07:22:59 +0000 (12:52 +0530)] 
wscript_build: Do not link vfs_ceph_new against libcephfs

vfs_ceph_new dynamically loads the appropriate libcephfs shared
libraries which means that we don't statically link against it.

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

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agovfs_ceph_new: Use function pointers for API calls
Anoop C S [Thu, 5 Sep 2024 09:50:28 +0000 (15:20 +0530)] 
vfs_ceph_new: Use function pointers for API calls

Replace direct function calls with pointers holding their equivalent
addresses.

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

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agovfs_ceph_new: Pass module config to userperm helpers
Anoop C S [Thu, 5 Sep 2024 09:46:54 +0000 (15:16 +0530)] 
vfs_ceph_new: Pass module config to userperm helpers

userperm helpers will switch to function references instead of direct
invocation of APIs. This would mean the matching config structure is
passed to those helpers.

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

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agovfs_ceph_new: Hold a config reference in vfs_ceph_fh
Anoop C S [Thu, 5 Sep 2024 08:31:37 +0000 (14:01 +0530)] 
vfs_ceph_new: Hold a config reference in vfs_ceph_fh

This is required to perform the cleanup when fsp extension destructor is
called as part of VFS_REMOVE_FSP_EXTENSION where mount information and
function references are to be used in upcoming changes.

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

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agovfs_ceph_new: Call vfs_ceph_userperm_new with handle->conn
Anoop C S [Thu, 5 Sep 2024 09:20:48 +0000 (14:50 +0530)] 
vfs_ceph_new: Call vfs_ceph_userperm_new with handle->conn

vfs_ceph_userperm_new() only need connection structure from handle
for fetching the current unix token. Therefore modify the signature
to accept just handle->conn.

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

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agovfs_ceph_new: Populate function pointers with addresses
Guenther Deschner [Thu, 5 Sep 2024 08:10:27 +0000 (13:40 +0530)] 
vfs_ceph_new: Populate function pointers with addresses

Use dlysm() for assigning addresses to already declared libcephfs
low-level API function pointers.

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

Pair-Programmed-With: Anoop C S <anoopcs@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 months agovfs_ceph_new: Add required function pointers to config
Guenther Deschner [Thu, 5 Sep 2024 08:01:13 +0000 (13:31 +0530)] 
vfs_ceph_new: Add required function pointers to config

Declare necessary libcephfs low-level APIs as function pointers to be
assigned with corresponding loadable addresses.

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

Pair-Programmed-With: Anoop C S <anoopcs@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>