]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Use file_id_str_buf() in rename_open_files()
authorVolker Lendecke <vl@samba.org>
Mon, 4 Nov 2019 06:39:48 +0000 (07:39 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 6 Nov 2019 20:36:35 +0000 (20:36 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/reply.c

index 98f5e1c27f6d567b0f26c96d1886f3b2a1e2dba2..6c71b57e04661eb7c400c2f38fd33f764055e919 100644 (file)
@@ -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. */