diff options
| author | Ralph Boehme <slow@samba.org> | 2025-06-14 19:13:44 +0200 |
|---|---|---|
| committer | Ralph Boehme <slow@samba.org> | 2025-08-05 14:52:34 +0000 |
| commit | f97751a110e093e301d24e734d64a2a638dd7c8a (patch) | |
| tree | db745a23906b14338d6e67818872c4782f490438 /source3 | |
| parent | c63d63e36ab83be9a2d4a4df41f59bf7ae1af06a (diff) | |
| download | samba-f97751a110e093e301d24e734d64a2a638dd7c8a.tar.gz samba-f97751a110e093e301d24e734d64a2a638dd7c8a.tar.bz2 samba-f97751a110e093e301d24e734d64a2a638dd7c8a.zip | |
smbd: add some debugging to smbXsrv_open_[lookup|set]_replay_cache()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
| -rw-r--r-- | source3/smbd/smbXsrv_open.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source3/smbd/smbXsrv_open.c b/source3/smbd/smbXsrv_open.c index 00d1fd6109a..e37aab2ce42 100644 --- a/source3/smbd/smbXsrv_open.c +++ b/source3/smbd/smbXsrv_open.c @@ -645,6 +645,12 @@ static NTSTATUS smbXsrv_open_set_replay_cache(struct smbXsrv_open *op) status = ndr_map_error2ntstatus(ndr_err); return status; } + + DBG_DEBUG("Replay Cache: store create_guid [%s]\n", + GUID_buf_string(&op->global->create_guid, &buf)); + if (CHECK_DEBUGLVL(DBGLVL_DEBUG)) { + NDR_PRINT_DEBUG(smbXsrv_open_replay_cache, &rc); + } val = make_tdb_data(blob.data, blob.length); status = dbwrap_store_bystring(db, guid_string, val, TDB_REPLACE); @@ -663,6 +669,9 @@ NTSTATUS smbXsrv_open_purge_replay_cache(struct smbXsrv_client *client, struct GUID_txt_buf buf; NTSTATUS status; + DBG_DEBUG("Replay Cache: purge create_guid [%s]\n", + GUID_buf_string(create_guid, &buf)); + if (client->open_table == NULL) { return NT_STATUS_OK; } @@ -695,6 +704,9 @@ static NTSTATUS smbXsrv_open_clear_replay_cache(struct smbXsrv_open *op) return NT_STATUS_OK; } + DBG_DEBUG("Replay Cache: clear create_guid [%s]\n", + GUID_buf_string(create_guid, &buf)); + status = dbwrap_purge_bystring(db, GUID_buf_string(create_guid, &buf)); if (NT_STATUS_IS_OK(status)) { @@ -1055,6 +1067,11 @@ NTSTATUS smb2srv_open_lookup_replay_cache(struct smbXsrv_connection *conn, if (val.dsize == 0) { uint8_t data[SMBXSRV_OPEN_REPLAY_CACHE_FIXED_SIZE]; + DBG_DEBUG("Fresh replay-cache record\n"); + if (CHECK_DEBUGLVL(DBGLVL_DEBUG)) { + NDR_PRINT_DEBUG(smbXsrv_open_replay_cache, &rc); + } + blob = data_blob_const(data, ARRAY_SIZE(data)); ndr_err = ndr_push_struct_into_fixed_blob(&blob, &rc, (ndr_push_flags_fn_t)ndr_push_smbXsrv_open_replay_cache); @@ -1092,7 +1109,14 @@ NTSTATUS smb2srv_open_lookup_replay_cache(struct smbXsrv_connection *conn, TALLOC_FREE(frame); return status; } + + DBG_DEBUG("Found smbXsrv_open_replay_cache record\n"); + if (CHECK_DEBUGLVL(DBGLVL_DEBUG)) { + NDR_PRINT_DEBUG(smbXsrv_open_replay_cache, &rc); + } + if (rc.local_id != 0) { + DBG_DEBUG("Found replay-cache record with local_id\n"); if (GUID_equal(&rc.holder_req_guid, &caller_req_guid)) { /* * This should not happen @@ -1136,6 +1160,7 @@ NTSTATUS smb2srv_open_lookup_replay_cache(struct smbXsrv_connection *conn, } if (GUID_equal(&rc.holder_req_guid, &caller_req_guid)) { + DBG_DEBUG("Still the holder\n"); /* * We're still the holder */ |
