From: Volker Lendecke Date: Tue, 14 May 2024 14:20:03 +0000 (+0200) Subject: smbd: Modernize a few DEBUGs X-Git-Tag: tdb-1.4.11~685 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a99f2f3ae390ddc4d80548a593a3edf50eeb76f3;p=thirdparty%2Fsamba.git smbd: Modernize a few DEBUGs Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/locking/locking.c b/source3/locking/locking.c index fa1c85afe91..25735a3083d 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -158,12 +158,14 @@ bool strict_lock_check_default(files_struct *fsp, struct lock_struct *plock) TALLOC_FREE(br_lck); } - DEBUG(10, ("strict_lock_default: flavour = %s brl start=%ju " - "len=%ju %s for fnum %ju file %s\n", - lock_flav_name(plock->lock_flav), - (uintmax_t)plock->start, (uintmax_t)plock->size, - ret ? "unlocked" : "locked", - (uintmax_t)plock->fnum, fsp_str_dbg(fsp))); + DBG_DEBUG("flavour = %s brl start=%" PRIu64 " " + "len=%" PRIu64 " %s for fnum %" PRIu64 " file %s\n", + lock_flav_name(plock->lock_flav), + plock->start, + plock->size, + ret ? "unlocked" : "locked", + plock->fnum, + fsp_str_dbg(fsp)); return ret; } @@ -583,8 +585,9 @@ bool rename_share_filename(struct messaging_context *msg_ctx, NTSTATUS status; bool ok; - DEBUG(10, ("rename_share_filename: servicepath %s newname %s\n", - servicepath, smb_fname_dst->base_name)); + DBG_DEBUG("servicepath %s newname %s\n", + servicepath, + smb_fname_dst->base_name); status = share_mode_lock_access_private_data(lck, &d); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 90c28158322..5cb2bb6f17c 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -473,8 +473,8 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, */ lck_state.cleanup_fn = close_share_mode_lock_cleanup; - DEBUG(5,("close_remove_share_mode: file %s. Delete on close was set " - "- deleting file.\n", fsp_str_dbg(fsp))); + DBG_INFO("%s. Delete on close was set - deleting file.\n", + fsp_str_dbg(fsp)); /* * Don't try to update the write time when we delete the file @@ -486,10 +486,9 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, { /* Become the user who requested the delete. */ - DEBUG(5,("close_remove_share_mode: file %s. " - "Change user to uid %u\n", - fsp_str_dbg(fsp), - (unsigned int)lck_state.del_token->uid)); + DBG_INFO("file %s. Change user to uid %u\n", + fsp_str_dbg(fsp), + (unsigned int)lck_state.del_token->uid); if (!push_sec_ctx()) { smb_panic("close_remove_share_mode: file %s. failed to push " @@ -510,9 +509,10 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, tmp_status = vfs_stat_fsp(fsp); if (!NT_STATUS_IS_OK(tmp_status)) { - DEBUG(5,("close_remove_share_mode: file %s. Delete on close " + DBG_INFO("file %s. Delete on close " "was set and stat failed with error %s\n", - fsp_str_dbg(fsp), nt_errstr(tmp_status))); + fsp_str_dbg(fsp), + nt_errstr(tmp_status)); /* * Don't save the errno here, we ignore this error */ @@ -523,14 +523,13 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, if (!file_id_equal(&fsp->file_id, &id)) { struct file_id_buf ftmp1, ftmp2; - DEBUG(5,("close_remove_share_mode: file %s. Delete on close " + DBG_INFO("file %s. Delete on close " "was set and dev and/or inode does not match\n", - fsp_str_dbg(fsp))); - DEBUG(5,("close_remove_share_mode: file %s. stored file_id %s, " - "stat file_id %s\n", + fsp_str_dbg(fsp)); + DBG_INFO("file %s. stored file_id %s, stat file_id %s\n", fsp_str_dbg(fsp), file_id_str_buf(fsp->file_id, &ftmp1), - file_id_str_buf(id, &ftmp2))); + file_id_str_buf(id, &ftmp2)); /* * Don't save the errno here, we ignore this error */ @@ -588,9 +587,10 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, * zero. */ - DEBUG(5,("close_remove_share_mode: file %s. Delete on close " + DBG_INFO("file %s. Delete on close " "was set and unlink failed with error %s\n", - fsp_str_dbg(fsp), strerror(errno))); + fsp_str_dbg(fsp), + strerror(errno)); status = map_nt_error_from_unix(errno); }