mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
smbd: Use file_id_str_buf() in rename_open_files()
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
1bbdae2234
commit
d04581bfe9
@ -6768,6 +6768,7 @@ static void rename_open_files(connection_struct *conn,
|
||||
|
||||
for(fsp = file_find_di_first(conn->sconn, id); fsp;
|
||||
fsp = file_find_di_next(fsp)) {
|
||||
struct file_id_buf idbuf;
|
||||
/* fsp_name is a relative path under the fsp. To change this for other
|
||||
sharepaths we need to manipulate relative paths. */
|
||||
/* TODO - create the absolute path and manipulate the newname
|
||||
@ -6778,10 +6779,12 @@ static void rename_open_files(connection_struct *conn,
|
||||
if (fsp->name_hash != orig_name_hash) {
|
||||
continue;
|
||||
}
|
||||
DEBUG(10, ("rename_open_files: renaming file %s "
|
||||
"(file_id %s) from %s -> %s\n", fsp_fnum_dbg(fsp),
|
||||
file_id_string_tos(&fsp->file_id), fsp_str_dbg(fsp),
|
||||
smb_fname_str_dbg(smb_fname_dst)));
|
||||
DBG_DEBUG("renaming file %s "
|
||||
"(file_id %s) from %s -> %s\n",
|
||||
fsp_fnum_dbg(fsp),
|
||||
file_id_str_buf(fsp->file_id, &idbuf),
|
||||
fsp_str_dbg(fsp),
|
||||
smb_fname_str_dbg(smb_fname_dst));
|
||||
|
||||
status = fsp_set_smb_fname(fsp, smb_fname_dst);
|
||||
if (NT_STATUS_IS_OK(status)) {
|
||||
@ -6791,9 +6794,11 @@ static void rename_open_files(connection_struct *conn,
|
||||
}
|
||||
|
||||
if (!did_rename) {
|
||||
DEBUG(10, ("rename_open_files: no open files on file_id %s "
|
||||
"for %s\n", file_id_string_tos(&id),
|
||||
smb_fname_str_dbg(smb_fname_dst)));
|
||||
struct file_id_buf idbuf;
|
||||
DBG_DEBUG("no open files on file_id %s "
|
||||
"for %s\n",
|
||||
file_id_str_buf(id, &idbuf),
|
||||
smb_fname_str_dbg(smb_fname_dst));
|
||||
}
|
||||
|
||||
/* Send messages to all smbd's (not ourself) that the name has changed. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user