summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-07-08 16:22:44 -0700
committerTim Prouty <tprouty@samba.org>2009-07-08 21:36:04 -0700
commit3a7d372e2eb5ab00986aafe69ac715a68faa077f (patch)
tree2fba0fae51888d6792f8eae16fde5d2d547f5066 /source3/smbd/reply.c
parent83e5ac569577566fa171b8f4288e26e5129015ab (diff)
downloadsamba-3a7d372e2eb5ab00986aafe69ac715a68faa077f.tar.gz
samba-3a7d372e2eb5ab00986aafe69ac715a68faa077f.tar.bz2
samba-3a7d372e2eb5ab00986aafe69ac715a68faa077f.zip
s3: Change the share_mode_lock struct to store a base_name and stream_name
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 483f68947e..837d17dc0b 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -5709,12 +5709,6 @@ static void rename_open_files(connection_struct *conn,
char *fname_dst = NULL;
NTSTATUS status;
- status = get_full_smb_filename(talloc_tos(), smb_fname_dst,
- &fname_dst);
- if (!NT_STATUS_IS_OK(status)) {
- return;
- }
-
for(fsp = file_find_di_first(lck->id); fsp;
fsp = file_find_di_next(fsp)) {
/* fsp_name is a relative path under the fsp. To change this for other
@@ -5728,8 +5722,15 @@ static void rename_open_files(connection_struct *conn,
"(file_id %s) from %s -> %s\n", fsp->fnum,
file_id_string_tos(&fsp->file_id), fsp->fsp_name,
smb_fname_str_dbg(smb_fname_dst)));
+
+ status = get_full_smb_filename(talloc_tos(), smb_fname_dst,
+ &fname_dst);
+ if (!NT_STATUS_IS_OK(status)) {
+ return;
+ }
string_set(&fsp->fsp_name, fname_dst);
did_rename = True;
+ TALLOC_FREE(fname_dst);
}
if (!did_rename) {
@@ -5740,8 +5741,8 @@ static void rename_open_files(connection_struct *conn,
/* Send messages to all smbd's (not ourself) that the name has changed. */
rename_share_filename(smbd_messaging_context(), lck, conn->connectpath,
- fname_dst);
- TALLOC_FREE(fname_dst);
+ smb_fname_dst);
+
}
/****************************************************************************