From: Ralph Boehme Date: Tue, 5 Aug 2025 17:06:39 +0000 (+0200) Subject: smbd: make smbXsrv_open_global_lookup() public X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=473941cf7fe362cea17eebbab90dbf131070dc59;p=thirdparty%2Fsamba.git smbd: make smbXsrv_open_global_lookup() public The scavenger needs this to fetch the record from smbXsrv_open_global.tdb. Signed-off-by: Ralph Boehme Reviewed-by: Anoop C S --- diff --git a/source3/smbd/smbXsrv_open.c b/source3/smbd/smbXsrv_open.c index f19978c4d8a..f97a6920848 100644 --- a/source3/smbd/smbXsrv_open.c +++ b/source3/smbd/smbXsrv_open.c @@ -315,8 +315,7 @@ static void smbXsrv_open_global_lookup_fn(struct db_record *rec, &state->global); } -static NTSTATUS smbXsrv_open_global_lookup( - struct smbXsrv_open_table *table, +NTSTATUS smbXsrv_open_global_lookup( TALLOC_CTX *mem_ctx, uint32_t open_global_id, const struct smbXsrv_open_global0 **_global) @@ -328,7 +327,7 @@ static NTSTATUS smbXsrv_open_global_lookup( }; NTSTATUS status; - status = dbwrap_do_locked(table->global.db_ctx, + status = dbwrap_do_locked(smbXsrv_open_global_db_ctx, key, smbXsrv_open_global_lookup_fn, &state); @@ -1210,8 +1209,7 @@ NTSTATUS smb2srv_open_lookup_replay_cache(struct smbXsrv_connection *conn, } TALLOC_FREE(db_rec); - status = smbXsrv_open_global_lookup(table, - frame, + status = smbXsrv_open_global_lookup(frame, open_global_id, &global); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/smbd/smbXsrv_open.h b/source3/smbd/smbXsrv_open.h index 5e47817e7a8..a0b30fae76b 100644 --- a/source3/smbd/smbXsrv_open.h +++ b/source3/smbd/smbXsrv_open.h @@ -53,6 +53,10 @@ NTSTATUS smb2srv_open_lookup(struct smbXsrv_connection *conn, uint64_t volatile_id, NTTIME now, struct smbXsrv_open **_open); +NTSTATUS smbXsrv_open_global_lookup(TALLOC_CTX *mem_ctx, + uint32_t open_global_id, + const struct smbXsrv_open_global0 **global); + NTSTATUS smbXsrv_open_purge_replay_cache(struct smbXsrv_client *client, const struct GUID *create_guid); NTSTATUS smb2srv_open_lookup_replay_cache(struct smbXsrv_connection *conn,