]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: make smbXsrv_open_global_lookup() public
authorRalph Boehme <slow@samba.org>
Tue, 5 Aug 2025 17:06:39 +0000 (19:06 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 17 Jul 2026 10:18:36 +0000 (10:18 +0000)
The scavenger needs this to fetch the record from smbXsrv_open_global.tdb.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/smbd/smbXsrv_open.c
source3/smbd/smbXsrv_open.h

index f19978c4d8acde43a97363cb3768693258dbcc67..f97a692084835b807d59f27df459c9e895bb8614 100644 (file)
@@ -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)) {
index 5e47817e7a80fa2030ff54f613228aeea8952532..a0b30fae76b70ee7e9fede35d6a2663178dd3442 100644 (file)
@@ -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,