ok = g_lock_parse(value.dptr, value.dsize, &lck);
if (!ok) {
DBG_DEBUG("g_lock_parse for %s failed\n",
- hex_encode_talloc(talloc_tos(),
- state->key.dptr,
- state->key.dsize));
+ tdb_data_dbg(state->key));
state->status = NT_STATUS_INTERNAL_DB_CORRUPTION;
return;
}
ok = g_lock_parse(data.dptr, data.dsize, &lck);
if (!ok) {
DBG_DEBUG("g_lock_parse failed for %s\n",
- hex_encode_talloc(talloc_tos(),
- state->key.dptr,
- state->key.dsize));
+ tdb_data_dbg(state->key));
state->status = NT_STATUS_INTERNAL_DB_CORRUPTION;
return;
}
DBG_ERR("Can not lock two share modes "
"simultaneously: existing %s requested %s\n",
file_id_str_buf(share_mode_lock_key_id, &existing),
- hex_encode_talloc(talloc_tos(), key.dptr, key.dsize));
+ tdb_data_dbg(key));
smb_panic(__location__);
return false;
}
#include "lib/util/tevent_ntstatus.h"
#include "lib/util/iov_buf.h"
#include "lib/global_contexts.h"
+#include "source3/include/util_tdb.h"
struct smbXsrv_client_table {
struct {
struct GUID_txt_buf buf;
DBG_DEBUG("Failed to lock guid [%s], key '%s'\n",
GUID_buf_string(client_guid, &buf),
- hex_encode_talloc(talloc_tos(), key.dptr, key.dsize));
+ tdb_data_dbg(key));
}
return rec;
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
DBG_WARNING("key '%s' ndr_pull_struct_blob - %s\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status));
TALLOC_FREE(frame);
return;
if (global_blob.version != SMBXSRV_VERSION_0) {
DBG_ERR("key '%s' use unsupported version %u\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
global_blob.version);
NDR_PRINT_DEBUG(smbXsrv_client_globalB, &global_blob);
TALLOC_FREE(frame);
struct server_id_buf tmp;
DBG_NOTICE("key '%s' server_id %s is already dead.\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
server_id_str_buf(global->server_id, &tmp));
if (DEBUGLVL(DBGLVL_NOTICE)) {
NDR_PRINT_DEBUG(smbXsrv_client_globalB, &global_blob);
struct server_id_buf tmp;
DBG_NOTICE("key '%s' server_id %s does not exist.\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
server_id_str_buf(global->server_id, &tmp));
if (DEBUGLVL(DBGLVL_NOTICE)) {
NDR_PRINT_DEBUG(smbXsrv_client_globalB, &global_blob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
DBG_WARNING("key '%s' ndr_push - %s\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status));
TALLOC_FREE(global->db_rec);
return status;
status = dbwrap_record_store(global->db_rec, val, TDB_REPLACE);
if (!NT_STATUS_IS_OK(status)) {
DBG_WARNING("key '%s' store - %s\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status));
TALLOC_FREE(global->db_rec);
return status;
if (DEBUGLVL(DBGLVL_DEBUG)) {
DBG_DEBUG("key '%s' stored\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize));
+ tdb_data_dbg(key));
NDR_PRINT_DEBUG(smbXsrv_client_globalB, &global_blob);
}
status = dbwrap_record_delete(global->db_rec);
if (!NT_STATUS_IS_OK(status)) {
DBG_WARNING("key '%s' delete - %s\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status));
TALLOC_FREE(global->db_rec);
return status;
}
global->stored = false;
- DBG_DEBUG("key '%s' delete\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize));
+ DBG_DEBUG("key '%s' delete\n", tdb_data_dbg(key));
TALLOC_FREE(global->db_rec);
#include "lib/util/util_tdb.h"
#include "librpc/gen_ndr/ndr_smbXsrv.h"
#include "serverid.h"
+#include "source3/include/util_tdb.h"
struct smbXsrv_open_table {
struct {
if (rec == NULL) {
DBG_DEBUG("Failed to lock global id 0x%08x, key '%s'\n", id,
- hex_encode_talloc(talloc_tos(), key.dptr, key.dsize));
+ tdb_data_dbg(key));
}
return rec;
if (rec == NULL) {
DBG_DEBUG("Failed to lock local id 0x%08x, key '%s'\n", id,
- hex_encode_talloc(talloc_tos(), key.dptr, key.dsize));
+ tdb_data_dbg(key));
}
return rec;
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
DEBUG(1,("smbXsrv_open_global_verify_record: "
"key '%s' ndr_pull_struct_blob - %s\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
TALLOC_FREE(frame);
return;
if (global_blob.version != SMBXSRV_VERSION_0) {
DEBUG(0,("smbXsrv_open_global_verify_record: "
"key '%s' use unsupported version %u\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
global_blob.version));
NDR_PRINT_DEBUG(smbXsrv_open_globalB, &global_blob);
TALLOC_FREE(frame);
struct server_id_buf idbuf;
DEBUG(2,("smbXsrv_open_global_verify_record: "
"key '%s' server_id %s does not exist.\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
server_id_str_buf(global->server_id, &idbuf)));
if (CHECK_DEBUGLVL(2)) {
NDR_PRINT_DEBUG(smbXsrv_open_globalB, &global_blob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
DEBUG(1,("smbXsrv_open_global_store: key '%s' ndr_push - %s\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
TALLOC_FREE(global->db_rec);
return status;
status = dbwrap_record_store(global->db_rec, val, TDB_REPLACE);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1,("smbXsrv_open_global_store: key '%s' store - %s\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
TALLOC_FREE(global->db_rec);
return status;
if (CHECK_DEBUGLVL(10)) {
DEBUG(10,("smbXsrv_open_global_store: key '%s' stored\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize)));
+ tdb_data_dbg(key)));
NDR_PRINT_DEBUG(smbXsrv_open_globalB, &global_blob);
}
DEBUG(0, ("smbXsrv_open_close(0x%08x): "
"failed to delete global key '%s': %s\n",
op->global->open_global_id,
- hex_encode_talloc(global_rec, key.dptr,
- key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
error = status;
}
DEBUG(0, ("smbXsrv_open_close(0x%08x): "
"failed to delete local key '%s': %s\n",
op->global->open_global_id,
- hex_encode_talloc(local_rec, key.dptr,
- key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
error = status;
}
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
DEBUG(1,("Invalid record in smbXsrv_open_global.tdb:"
"key '%s' ndr_pull_struct_blob - %s\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
ndr_errstr(ndr_err)));
status = ndr_map_error2ntstatus(ndr_err);
goto done;
status = NT_STATUS_INTERNAL_DB_CORRUPTION;
DEBUG(1,("Invalid record in smbXsrv_open_global.tdb:"
"key '%s' unsupported version - %d - %s\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
(int)global_blob.version,
nt_errstr(status)));
goto done;
status = NT_STATUS_INTERNAL_DB_CORRUPTION;
DEBUG(1,("Invalid record in smbXsrv_tcon_global.tdb:"
"key '%s' info0 NULL pointer - %s\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
goto done;
}
#include "serverid.h"
#include "lib/util/tevent_ntstatus.h"
#include "lib/global_contexts.h"
+#include "source3/include/util_tdb.h"
struct smbXsrv_session_table {
struct {
if (rec == NULL) {
DBG_DEBUG("Failed to lock global id 0x%08x, key '%s'\n", id,
- hex_encode_talloc(talloc_tos(), key.dptr, key.dsize));
+ tdb_data_dbg(key));
}
return rec;
if (rec == NULL) {
DBG_DEBUG("Failed to lock local id 0x%08x, key '%s'\n", id,
- hex_encode_talloc(talloc_tos(), key.dptr, key.dsize));
+ tdb_data_dbg(key));
}
return rec;
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
DEBUG(1,("smbXsrv_session_global_verify_record: "
"key '%s' ndr_pull_struct_blob - %s\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
TALLOC_FREE(frame);
*is_free = true;
if (global_blob.version != SMBXSRV_VERSION_0) {
DEBUG(0,("smbXsrv_session_global_verify_record: "
"key '%s' use unsupported version %u\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
global_blob.version));
NDR_PRINT_DEBUG(smbXsrv_session_globalB, &global_blob);
TALLOC_FREE(frame);
struct server_id_buf idbuf;
DEBUG(2,("smbXsrv_session_global_verify_record: "
"key '%s' server_id %s does not exist.\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
server_id_str_buf(global->channels[0].server_id,
&idbuf)));
if (DEBUGLVL(2)) {
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
DEBUG(1,("smbXsrv_session_global_store: key '%s' ndr_push - %s\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
TALLOC_FREE(global->db_rec);
return status;
status = dbwrap_record_store(global->db_rec, val, TDB_REPLACE);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1,("smbXsrv_session_global_store: key '%s' store - %s\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
TALLOC_FREE(global->db_rec);
return status;
if (DEBUGLVL(10)) {
DEBUG(10,("smbXsrv_session_global_store: key '%s' stored\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize)));
+ tdb_data_dbg(key)));
NDR_PRINT_DEBUG(smbXsrv_session_globalB, &global_blob);
}
DEBUG(0, ("smbXsrv_session_logoff(0x%08x): "
"failed to delete global key '%s': %s\n",
session->global->session_global_id,
- hex_encode_talloc(global_rec, key.dptr,
- key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
error = status;
}
DEBUG(0, ("smbXsrv_session_logoff(0x%08x): "
"failed to delete local key '%s': %s\n",
session->global->session_global_id,
- hex_encode_talloc(local_rec, key.dptr,
- key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
error = status;
}
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
DEBUG(1,("Invalid record in smbXsrv_session_global.tdb:"
"key '%s' ndr_pull_struct_blob - %s\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
ndr_errstr(ndr_err)));
goto done;
}
if (global_blob.version != SMBXSRV_VERSION_0) {
DEBUG(1,("Invalid record in smbXsrv_session_global.tdb:"
"key '%s' unsupported version - %d\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
(int)global_blob.version));
goto done;
}
if (global_blob.info.info0 == NULL) {
DEBUG(1,("Invalid record in smbXsrv_tcon_global.tdb:"
"key '%s' info0 NULL pointer\n",
- hex_encode_talloc(frame, key.dptr, key.dsize)));
+ tdb_data_dbg(key)));
goto done;
}
#include "lib/util/util_tdb.h"
#include "librpc/gen_ndr/ndr_smbXsrv.h"
#include "serverid.h"
+#include "source3/include/util_tdb.h"
struct smbXsrv_tcon_table {
struct {
if (rec == NULL) {
DBG_DEBUG("Failed to lock global id 0x%08x, key '%s'\n", id,
- hex_encode_talloc(talloc_tos(), key.dptr, key.dsize));
+ tdb_data_dbg(key));
}
return rec;
if (rec == NULL) {
DBG_DEBUG("Failed to lock local id 0x%08x, key '%s'\n", id,
- hex_encode_talloc(talloc_tos(), key.dptr, key.dsize));
+ tdb_data_dbg(key));
}
return rec;
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
DEBUG(1,("smbXsrv_tcon_global_verify_record: "
"key '%s' ndr_pull_struct_blob - %s\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
TALLOC_FREE(frame);
return;
if (global_blob.version != SMBXSRV_VERSION_0) {
DEBUG(0,("smbXsrv_tcon_global_verify_record: "
"key '%s' use unsupported version %u\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
global_blob.version));
NDR_PRINT_DEBUG(smbXsrv_tcon_globalB, &global_blob);
TALLOC_FREE(frame);
struct server_id_buf idbuf;
DEBUG(2,("smbXsrv_tcon_global_verify_record: "
"key '%s' server_id %s does not exist.\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
server_id_str_buf(global->server_id, &idbuf)));
if (DEBUGLVL(2)) {
NDR_PRINT_DEBUG(smbXsrv_tcon_globalB, &global_blob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
DEBUG(1,("smbXsrv_tcon_global_store: key '%s' ndr_push - %s\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
TALLOC_FREE(global->db_rec);
return status;
status = dbwrap_record_store(global->db_rec, val, TDB_REPLACE);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1,("smbXsrv_tcon_global_store: key '%s' store - %s\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
TALLOC_FREE(global->db_rec);
return status;
if (DEBUGLVL(10)) {
DEBUG(10,("smbXsrv_tcon_global_store: key '%s' stored\n",
- hex_encode_talloc(global->db_rec, key.dptr, key.dsize)));
+ tdb_data_dbg(key)));
NDR_PRINT_DEBUG(smbXsrv_tcon_globalB, &global_blob);
}
"failed to delete global key '%s': %s\n",
tcon->global->tcon_global_id,
tcon->global->share_name,
- hex_encode_talloc(global_rec, key.dptr,
- key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
error = status;
}
"failed to delete local key '%s': %s\n",
tcon->global->tcon_global_id,
tcon->global->share_name,
- hex_encode_talloc(local_rec, key.dptr,
- key.dsize),
+ tdb_data_dbg(key),
nt_errstr(status)));
error = status;
}
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
DEBUG(1,("Invalid record in smbXsrv_tcon_global.tdb:"
"key '%s' ndr_pull_struct_blob - %s\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
ndr_errstr(ndr_err)));
goto done;
}
if (global_blob.version != SMBXSRV_VERSION_0) {
DEBUG(1,("Invalid record in smbXsrv_tcon_global.tdb:"
"key '%s' unsupported version - %d\n",
- hex_encode_talloc(frame, key.dptr, key.dsize),
+ tdb_data_dbg(key),
(int)global_blob.version));
goto done;
}
if (global_blob.info.info0 == NULL) {
DEBUG(1,("Invalid record in smbXsrv_tcon_global.tdb:"
"key '%s' info0 NULL pointer\n",
- hex_encode_talloc(frame, key.dptr, key.dsize)));
+ tdb_data_dbg(key)));
goto done;
}