1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

smbd: Fix DBG macro

This augments 5c37615efa, the DBG macros already prepend the the function name

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2023-07-27 00:47:23 +02:00 committed by Jeremy Allison
parent 0c645107cd
commit d40d130b97

View File

@ -608,8 +608,7 @@ static void smbXsrv_tcon_global_verify_record(struct db_record *db_rec,
(ndr_pull_flags_fn_t)ndr_pull_smbXsrv_tcon_globalB); (ndr_pull_flags_fn_t)ndr_pull_smbXsrv_tcon_globalB);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS status = ndr_map_error2ntstatus(ndr_err); NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
DBG_WARNING("smbXsrv_tcon_global_verify_record: " DBG_WARNING("key '%s' ndr_pull_struct_blob - %s\n",
"key '%s' ndr_pull_struct_blob - %s\n",
tdb_data_dbg(key), tdb_data_dbg(key),
nt_errstr(status)); nt_errstr(status));
TALLOC_FREE(frame); TALLOC_FREE(frame);
@ -622,8 +621,7 @@ static void smbXsrv_tcon_global_verify_record(struct db_record *db_rec,
} }
if (global_blob.version != SMBXSRV_VERSION_0) { if (global_blob.version != SMBXSRV_VERSION_0) {
DBG_ERR("smbXsrv_tcon_global_verify_record: " DBG_ERR("key '%s' use unsupported version %u\n",
"key '%s' use unsupported version %u\n",
tdb_data_dbg(key), tdb_data_dbg(key),
global_blob.version); global_blob.version);
NDR_PRINT_DEBUG(smbXsrv_tcon_globalB, &global_blob); NDR_PRINT_DEBUG(smbXsrv_tcon_globalB, &global_blob);
@ -636,8 +634,7 @@ static void smbXsrv_tcon_global_verify_record(struct db_record *db_rec,
exists = serverid_exists(&global->server_id); exists = serverid_exists(&global->server_id);
if (!exists) { if (!exists) {
struct server_id_buf idbuf; struct server_id_buf idbuf;
DBG_NOTICE("smbXsrv_tcon_global_verify_record: " DBG_NOTICE("key '%s' server_id %s does not exist.\n",
"key '%s' server_id %s does not exist.\n",
tdb_data_dbg(key), tdb_data_dbg(key),
server_id_str_buf(global->server_id, &idbuf)); server_id_str_buf(global->server_id, &idbuf));
if (DEBUGLVL(DBGLVL_NOTICE)) { if (DEBUGLVL(DBGLVL_NOTICE)) {
@ -689,7 +686,7 @@ static NTSTATUS smbXsrv_tcon_global_store(struct smbXsrv_tcon_global0 *global)
(ndr_push_flags_fn_t)ndr_push_smbXsrv_tcon_globalB); (ndr_push_flags_fn_t)ndr_push_smbXsrv_tcon_globalB);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err); status = ndr_map_error2ntstatus(ndr_err);
DBG_WARNING("smbXsrv_tcon_global_store: key '%s' ndr_push - %s\n", DBG_WARNING("key '%s' ndr_push - %s\n",
tdb_data_dbg(key), tdb_data_dbg(key),
nt_errstr(status)); nt_errstr(status));
TALLOC_FREE(global->db_rec); TALLOC_FREE(global->db_rec);
@ -699,7 +696,7 @@ static NTSTATUS smbXsrv_tcon_global_store(struct smbXsrv_tcon_global0 *global)
val = make_tdb_data(blob.data, blob.length); val = make_tdb_data(blob.data, blob.length);
status = dbwrap_record_store(global->db_rec, val, TDB_REPLACE); status = dbwrap_record_store(global->db_rec, val, TDB_REPLACE);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
DBG_WARNING("smbXsrv_tcon_global_store: key '%s' store - %s\n", DBG_WARNING("key '%s' store - %s\n",
tdb_data_dbg(key), tdb_data_dbg(key),
nt_errstr(status)); nt_errstr(status));
TALLOC_FREE(global->db_rec); TALLOC_FREE(global->db_rec);
@ -707,8 +704,7 @@ static NTSTATUS smbXsrv_tcon_global_store(struct smbXsrv_tcon_global0 *global)
} }
if (DEBUGLVL(DBGLVL_DEBUG)) { if (DEBUGLVL(DBGLVL_DEBUG)) {
DBG_DEBUG("smbXsrv_tcon_global_store: key '%s' stored\n", DBG_DEBUG("key '%s' stored\n", tdb_data_dbg(key));
tdb_data_dbg(key));
NDR_PRINT_DEBUG(smbXsrv_tcon_globalB, &global_blob); NDR_PRINT_DEBUG(smbXsrv_tcon_globalB, &global_blob);
} }
@ -723,8 +719,7 @@ static int smbXsrv_tcon_destructor(struct smbXsrv_tcon *tcon)
status = smbXsrv_tcon_disconnect(tcon, 0); status = smbXsrv_tcon_disconnect(tcon, 0);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("smbXsrv_tcon_destructor: " DBG_ERR("smbXsrv_tcon_disconnect() failed - %s\n",
"smbXsrv_tcon_disconnect() failed - %s\n",
nt_errstr(status)); nt_errstr(status));
} }
@ -831,8 +826,7 @@ static NTSTATUS smbXsrv_tcon_create(struct smbXsrv_tcon_table *table,
status = smbXsrv_tcon_global_store(global); status = smbXsrv_tcon_global_store(global);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("smbXsrv_tcon_create: " DBG_ERR("global_id (0x%08x) store failed - %s\n",
"global_id (0x%08x) store failed - %s\n",
tcon->global->tcon_global_id, tcon->global->tcon_global_id,
nt_errstr(status)); nt_errstr(status));
TALLOC_FREE(tcon); TALLOC_FREE(tcon);
@ -845,7 +839,7 @@ static NTSTATUS smbXsrv_tcon_create(struct smbXsrv_tcon_table *table,
.info.info0 = tcon, .info.info0 = tcon,
}; };
DBG_DEBUG("smbXsrv_tcon_create: global_id (0x%08x) stored\n", DBG_DEBUG("global_id (0x%08x) stored\n",
tcon->global->tcon_global_id); tcon->global->tcon_global_id);
NDR_PRINT_DEBUG(smbXsrv_tconB, &tcon_blob); NDR_PRINT_DEBUG(smbXsrv_tconB, &tcon_blob);
} }
@ -860,7 +854,7 @@ NTSTATUS smbXsrv_tcon_update(struct smbXsrv_tcon *tcon)
NTSTATUS status; NTSTATUS status;
if (tcon->global->db_rec != NULL) { if (tcon->global->db_rec != NULL) {
DBG_ERR("smbXsrv_tcon_update(0x%08x): " DBG_ERR("update(0x%08x): "
"Called with db_rec != NULL'\n", "Called with db_rec != NULL'\n",
tcon->global->tcon_global_id); tcon->global->tcon_global_id);
return NT_STATUS_INTERNAL_ERROR; return NT_STATUS_INTERNAL_ERROR;
@ -876,8 +870,7 @@ NTSTATUS smbXsrv_tcon_update(struct smbXsrv_tcon *tcon)
status = smbXsrv_tcon_global_store(tcon->global); status = smbXsrv_tcon_global_store(tcon->global);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("smbXsrv_tcon_update: " DBG_ERR("global_id (0x%08x) store failed - %s\n",
"global_id (0x%08x) store failed - %s\n",
tcon->global->tcon_global_id, tcon->global->tcon_global_id,
nt_errstr(status)); nt_errstr(status));
return status; return status;
@ -889,7 +882,7 @@ NTSTATUS smbXsrv_tcon_update(struct smbXsrv_tcon *tcon)
.info.info0 = tcon, .info.info0 = tcon,
}; };
DBG_DEBUG("smbXsrv_tcon_update: global_id (0x%08x) stored\n", DBG_DEBUG("global_id (0x%08x) stored\n",
tcon->global->tcon_global_id); tcon->global->tcon_global_id);
NDR_PRINT_DEBUG(smbXsrv_tconB, &tcon_blob); NDR_PRINT_DEBUG(smbXsrv_tconB, &tcon_blob);
} }
@ -918,7 +911,7 @@ NTSTATUS smbXsrv_tcon_disconnect(struct smbXsrv_tcon *tcon, uint64_t vuid)
ok = chdir_current_service(tcon->compat); ok = chdir_current_service(tcon->compat);
if (!ok) { if (!ok) {
status = NT_STATUS_INTERNAL_ERROR; status = NT_STATUS_INTERNAL_ERROR;
DBG_ERR("smbXsrv_tcon_disconnect(0x%08x, '%s'): " DBG_ERR("disconnect(0x%08x, '%s'): "
"chdir_current_service() failed: %s\n", "chdir_current_service() failed: %s\n",
tcon->global->tcon_global_id, tcon->global->tcon_global_id,
tcon->global->share_name, tcon->global->share_name,
@ -959,7 +952,7 @@ NTSTATUS smbXsrv_tcon_disconnect(struct smbXsrv_tcon *tcon, uint64_t vuid)
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
TDB_DATA key = dbwrap_record_get_key(global_rec); TDB_DATA key = dbwrap_record_get_key(global_rec);
DBG_ERR("smbXsrv_tcon_disconnect(0x%08x, '%s'): " DBG_ERR("disconnect(0x%08x, '%s'): "
"failed to delete global key '%s': %s\n", "failed to delete global key '%s': %s\n",
tcon->global->tcon_global_id, tcon->global->tcon_global_id,
tcon->global->share_name, tcon->global->share_name,
@ -985,7 +978,7 @@ NTSTATUS smbXsrv_tcon_disconnect(struct smbXsrv_tcon *tcon, uint64_t vuid)
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
TDB_DATA key = dbwrap_record_get_key(local_rec); TDB_DATA key = dbwrap_record_get_key(local_rec);
DBG_ERR("smbXsrv_tcon_disconnect(0x%08x, '%s'): " DBG_ERR("disconnect(0x%08x, '%s'): "
"failed to delete local key '%s': %s\n", "failed to delete local key '%s': %s\n",
tcon->global->tcon_global_id, tcon->global->tcon_global_id,
tcon->global->share_name, tcon->global->share_name,
@ -1027,16 +1020,14 @@ static NTSTATUS smbXsrv_tcon_disconnect_all(struct smbXsrv_tcon_table *table,
smbXsrv_tcon_disconnect_all_callback, smbXsrv_tcon_disconnect_all_callback,
&state, &count); &state, &count);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("smbXsrv_tcon_disconnect_all: " DBG_ERR("dbwrap_traverse() failed: %s\n", nt_errstr(status));
"dbwrap_traverse() failed: %s\n",
nt_errstr(status));
return status; return status;
} }
if (!NT_STATUS_IS_OK(state.first_status)) { if (!NT_STATUS_IS_OK(state.first_status)) {
DBG_ERR("smbXsrv_tcon_disconnect_all: " DBG_ERR("count[%d] errors[%d] first[%s]\n",
"count[%d] errors[%d] first[%s]\n", count,
count, state.errors, state.errors,
nt_errstr(state.first_status)); nt_errstr(state.first_status));
return state.first_status; return state.first_status;
} }